-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Use shiftwidth() instead of &sw in indent/vim.vim #578
Conversation
Tyru wrote:
I'll include it, thanks! My sister Cecilia opened a computer store in Hawaii. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \ |
there are many using of Those should be fixed. |
Use `shiftwidth()` instead.
I substituted all 'shiftwidth' references in all indent plugins. (Thanks @mattn) Using shiftwidth() function wrapperI think
Already using shiftwidth() function
Not simply substituted
Other
Misc.
|
Tyro wrote:
By now it should be OK to use shiftwidth() directly. It was added in Please send patches to each maintainer. Those who live by the sword get shot by those who don't. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \ |
Oh, what a hard work... |
@brammool Okay :)
|
@brammool |
@brammool |
Removed a checking code / a wrapper function for shiftwidth(). * bzl.vim * go.vim * html.vim * teraterm.vim * yaml.vim
Tyru wrote:
Normally the user has his preference for 'shiftwidth' and we should Microsoft is to software what McDonalds is to gourmet cooking /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \ |
I agree. And though this is my humble assumption, all indent plugins listed above don't seem to have a enforced indent policy. At least, I suppose you know the reason well for zimbu.vim :) |
Takuya Fujiwara wrote:
Yes, since Zimbu is a new language we can enforce a certain style. hundred-and-one symptoms of being an internet addict: /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \ |
I see. sounds good :) |
2016-01-26 22:10 GMT+03:00 Bram Moolenaar vim-dev-github@256bit.org:
The fact that tabs are banned in the spec justifies only setting
|
can this be closed? |
Change was included for vim.vim. Other files still to be done, but that's not what this issue is for. |
Thanks! I created the list of vim indent plugin maintainers to summarize current status for myself. |
Hi Takuya! On Di, 02 Feb 2016, Takuya Fujiwara wrote:
I'll attach an updated indent script here. @bram, please include the sh.indent script Best, ChristianArgwöhnisch wacht der Mensch über alles, was ihm gehört - nur die Zeit |
Christian Brabandt wrote:
Thanks. I'll update the revision date. hundred-and-one symptoms of being an internet addict: /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \ |
Changes since 1.57: - Check shiftwidth() instead of 'shiftwidth' (will use the 'tabstop' value if 'shiftwidth' is 0) (PR 2072/PHP-Indenting-for-VIm#39) (related to vim#578) - Add support for optional spaces (before only) and double quotes around (Here|Now)Document identifiers (issue 2072/PHP-Indenting-for-VIm#40) - Multi-line indenting could get wrong whenever started on a commented line. (issue 2072/PHP-Indenting-for-VIm#44)
Thanks Bram for fixing this issue completely in 89bcfda. |
With
set shiftwidth=0
,gg=G
infiletype=vim
buffer will result in removing all indents.Because
indent/vim.vim
doesn't useshiftwidth()
instead of accessing&sw
directly.