Closed mbriggs closed 12 years ago
@mbriggs I hadn't noticed that behavior before - it also happens with other messages. I'll look into it.
By the way, if you're referencing globals foo
and bar
from another file, you can add the line:
/* global foo bar */
As the first line of your js file, and js3-mode will recognize them as declared. This is the same syntax JSLint uses.
Awesome :D
just want to say that after a day of using it, I totally love /* global */. It gives a nice documentation of globals being used in that file, and if that line gets too long, its a great code smell indicating the stuff in that file is probably doing too much.
Can you add this /* global ... */ syntax to the wiki docs? It is super handy, but I keep forgetting it and have to either grep or find this page...
@jmarca Sure thing: Features
This may just be because im a noob and don't know what I'm doing, but messages like "Undeclared Variable" (which show up pretty much all the time if you are using 3rd party libraries and referencing globals from them) tend to clobber c-s in the minibuffer, meaning that i can search for things, but the message will flicker every time i add or remove a char. Note that this doesn't seem to bother find-file or m-x or anything else really