Some improvements to snippets code and to syntax highlighting #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@isRuslan Hi there! First of all, thanks for your package! It is very handy and useful. I've played with it a little bit, and found some small things, which can be improved. So, there are my changes.
First of all, I've decided to use single quotes everywhere, due to AirBnb codestyle (which is commonly adopted by js community):
https://github.com/airbnb/javascript#6.1
I also removed snippets indenting, which was there by default.
Also, your syntax highlighting is great! But it doesn't solve indentation problems. So, whenever you press "enter", vim cursor will likely be in the beginning of the string. And to solve this, I just copypasted vim-javascript indentations rules. It works ok so far.
Another small issue, that was hurting me —
=>
snippet was not working in the middle of the string. I've fixed this only for UltiSnips snippet. (I've tried to use both of them, UltiSnips and Snipmate, and found out, that UltiSnips is more stable and simple.)And the last thing — there is small improvement to class declaration.
I hope those changes are useful.