[NCLUG] Looking at programming languages...
Wirt
wirtwolff at comcast.net
Mon Jan 21 14:58:49 MST 2008
Chad Perrin wrote:
> On Sun, Jan 20, 2008 at 08:30:52PM -0700, Sean Reifschneider wrote:
>
>> So, if it's important to you, you might be able to do that. Maybe the
>> easiest would be to have a macro that runs that just sets expandtab based
>> on whether the current line has tabs in the beginning or not.
>>
> <snip>
> It strikes me as the logical way to handle things -- more so than any of
> the options that are currently available. Why must Vim assume that you
> don't know what you want, and change things -- either changing tabs you
> entered into spaces or changing spaces into tabs?
>
> Am I the only person who thinks this doesn't make much sense?
>
Well, it does make sense now that you bring it up. I'd never thought of
it before since everything I "publish" needs to either be pure spaces or
pure tabs. You might be able to steal some vimscript from the
'DetectIndent' script
http://www.vim.org/scripts/script.php?script_id=1171 or find a script
snippet pre-made that does what you're looking for. Surely others have
wanted the same behaviour you prefer. Someone on irc #vim might have the
code at their fingertips, too. Hope there's a simple solution for you.
More information about the NCLUG
mailing list