-
Notifications
You must be signed in to change notification settings - Fork 352
Update javascript.vim #437
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
Conversation
yesterday's commit was still a little buggy, sorry. this should be better
Hope I'm not a pain, but can you outline what this fixes? |
mostly I think my usage of the search pair command was wrong, best to give an example though:
at the moment this 'inMultiVarIndent' function traverses the curly braces of the spells object. I was close yesterday but for search pair you are generally going to have a few bugs. this is what the indent will look now, you can try with yesterday's and see the difference, basically the rest of the file is broken. |
the comma logic is not based on regex anymore so this is safe to remove, this should be good for performance also
by the way, @amadeus , can class declarations be 'chained' like var statements? |
I assume you mean like: var ClassVar = class {}; If so, yes, that is valid JS |
no, like multiple class declarations seperated by commas |
So like: class Test1 {}, class Test2 {}; If so, no, that is not valid JS, you will get a syntax error on the |
and this?
|
chrome dev tools views it as an error at least |
Yeah, that's now allowed. Think of a class definition like named functions: class Durp {}
function Durp(){} They follow the same types of rules - like when you do a named function WITHOUT a var, a |
this is ready! |
any objections? |
Can you squash the commits into one commit? Or at least edit the commit messages to be a bit more descriptive? Otherwise, I am good with this. |
yesterday's commit was still a little buggy, sorry. this should be better