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

Some improvements to snippets code and to syntax highlighting #5

Merged
merged 6 commits into from
Oct 25, 2015

Conversation

s0ber
Copy link
Contributor

@s0ber s0ber commented Oct 25, 2015

@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.

@s0ber
Copy link
Contributor Author

s0ber commented Oct 25, 2015

@isRuslan Maybe we can add indentation rules as a submodule from vim-javascript.

@isRuslan
Copy link
Owner

Wow, what are nice and useful changes, thanks @s0ber 👍
We need indentation support here, to not be depend on other javascript-like vim-plugins, that's true.
So vim-javascript/indent be copy pasted here for a while, then I'll refresh it.
Thank for PR, this will be published as v2.1

isRuslan added a commit that referenced this pull request Oct 25, 2015
snippets: improvements to snippets code and to syntax highlighting
@isRuslan isRuslan merged commit 8e8fb16 into isRuslan:master Oct 25, 2015
@s0ber
Copy link
Contributor Author

s0ber commented Oct 25, 2015

@isRuslan Thank you too! This is the best es6 plugin so far! :)

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

Successfully merging this pull request may close these issues.

2 participants