NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Easy (Score:1)
Re: (Score:1)
I already have
:set backspace=indent,eol,start. That's still not everything I want. Backspace does back up past autoindent, which is okay, but that's not the only thing I want. I want Vim to treat tabs as four spaces when it saves the file, but as single characters when I move around in or edit the file.Did I read the help text incorrectly?
Re: (Score:1)
Ah, OK. There’s no builtin way of doing that to my knowledge. I could swear I saw a way to do this with scripting in either the scripts or tips section of vim.org [vim.org], but I can’t unearth it now.
# vim: set ts=8 sts=4 sw=4 noet: (Score:1)
Re:# vim: set ts=8 sts=4 sw=4 noet: (Score:1)
As far as I can tell, the magic here is
'softtabstop' 'sts'I have
expandtabset, andshiftwidth,tabstopet al. are all set to four. Leaving all that constant, and settingsts=4, vim will now backspace over tabs. It won't treat tabs as single chars forx, but you can alwaysI<BS>if you are in a leading tab-grouping and want to delete one tab. Of course, at that point you might as well<<Reply to This
Parent