Closed axiom closed 9 years ago
That's a super recent addition to Vim, no?
Relatively recent, yes. It was added in version v7-3-703
, which should have been around October 2012 (unless I made some goof in my mercurial digging).
bram 3893 Sun Oct 21 03:02:54 2012 +0200:6122: When zero the 'ts' value will be used. Use the |shiftwidth()|
bram 3893 Sun Oct 21 03:02:54 2012 +0200:6123: function to get the effective shiftwidth value.
That's older than I thought, but I'd still rather have an exists('*shiftwidth')
so that we don't break older versions.
I've added a function exist check now.
Looks good.
Instead of copying the current tabstop value to shiftwidth when hard tabs are used consistently, set shiftwidth to 0. This makes it possible to change the tabstop value manually (e.g. for a file that is highly indented) and shiftwidth will follow automatically.