Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Go to Symbol" and functions in hashes #20

Closed
TrevorBurnham opened this issue Jan 28, 2011 · 1 comment
Closed

"Go to Symbol" and functions in hashes #20

TrevorBurnham opened this issue Jan 28, 2011 · 1 comment

Comments

@TrevorBurnham
Copy link

I've started to find the "Go to Symbol" prompt to be extremely useful. Unfortunately, there are a lot of problem cases with it. It seems to treat : and = interchangeably everywhere (not just in a class), so

a = -> b: ->

gives you

a
  b

but

c = -> {d: ->}

gives you

c
d

Neither seems very sensible to me; functions in objects (other than class prototypes) should be ignored, the way that functions given as callbacks are. Don't you think? Or is it more important to list every function that's assigned a symbol than to present a clean hierarchy? Keep in mind that the current behavior means that if you write

$('#item1').bind click: -> false
$('#item2').bind click: -> false
$('#item3').bind click: -> false
$('#item4').bind click: -> false
$('#item5').bind click: -> false

then you'll see "click" 5 times in the "Go to Symbol" list.

@jashkenas
Copy link
Owner

That's a really good question, and unfortunately one that depends greatly on the style of JavaScript you're going to be writing. I think that showing every function with a name in the symbol list by default is a good start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants