Skip to content

Use shiftwidth() instead of &sw in indent/javascript.vim #348

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

Merged
merged 1 commit into from
Feb 22, 2016

Conversation

zbinlin
Copy link
Contributor

@zbinlin zbinlin commented Jan 29, 2016

When sw set to 0, shiftwidth() will return tabstop value.

@davidchambers
Copy link
Collaborator

I don't have enough context to review this change. Hopefully one of the other maintainers will chime in. :)

@zbinlin zbinlin changed the title Use shfitwidth() instead of &sw in indent/javascript.vim Use shiftwidth() instead of &sw in indent/javascript.vim Feb 3, 2016
@qstrahl
Copy link
Collaborator

qstrahl commented Feb 3, 2016

This is fine; this is the recommended usage from :help shiftwidth()

I have to wonder why vim doesn't recommend you return &sw ? &sw : &ts if shiftwidth() doesn't exist, but this looks fine to me.

qstrahl added a commit that referenced this pull request Feb 22, 2016
Use shiftwidth() instead of &sw in indent/javascript.vim
@qstrahl qstrahl merged commit 55da36b into pangloss:develop Feb 22, 2016
@zbinlin zbinlin deleted the sw branch February 23, 2016 05:17
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.

3 participants