So8res wrote:
> Many filetypes use &sw in their indent files. Most prominent among
> these is the vim indent file itself.
>
> If you use the new feature that allows sw to be 0 (causing it to fall
> back to tabstop) then indentation in all of these filetypes breaks.
>
> According to a simple grep, the following filetypes are affected:
>
> ada
[...]
> zimbu
>
> I haven't updated my usr/local/share/vim/vim73 files since adding in
> this patch, are there updated vimfiles that I should be using? If not,
> is there a plan to update these indent files?
>
> If not, is there a way to make the change less breaking? It seems like
> there should be a "indent_level()" function of some sort for indenters
> to use now that &sw can no longer be trusted.
I don't see a way to avoid using a zero shiftwidth breaking scripts that
use the value of shiftwidth.
We could make &sw return the effective value, but that smells like a
hack. And it would require a way to get the real value, for where the
value is saved and restored.
Using a function to get the effective value of shiftwidth seems like the
best long term solution. It does require changing all the scripts that
now use &sw.
--
No man may purchase alcohol without written consent from his wife.
[real standing law in Pennsylvania, United States of America]
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php