Re: abbr and expandtab

Any plans to support these in the future ? I'd at love to see at least abbr.
thanks !


Re: abbr and expandtab

Amol, I plan to implement :abbr some time in the future.

On the other hand, 'expandtab' mode, as in using spaces instead of tabs, is supported - but it honors the VS setting assigned to the tab size, as set in Tools|Options|Text Editor|Favorite language|Tabs. Given than when autoindenting and in insert mode there is no way to divorce tab's behavior from VS's setting (it would break Intellisense), I think it's best to respect that setting also in normal mode (the > operator, etc).

It would be possible to support the expandtab/shiftwidth interface, but they'd have to change the filetype-wide setting instead of being a buffer local setting.

Let me know if you think something else makes more sense.


Re: abbr and expandtab

no worries, your explanation makes sense to me.


Re: abbr and expandtab

Sorry to pull this one from the grave.  I recently purchased ViEmu and love it a bunch.  However, I miss one feature above all others.  I don't know if it is expandtab, or shiftwidth, but Vim allows treating spaces as though they are tabs.   Consider the snippet below, where periods are actually spaces:

....return.-1;.........//Oops an error

Assuming tabstop=2 and shiftwidth=2, Vim treats each group of two spaces as a tab.  This means that it takes one delete to move the "if" line to the first column.  It means that it takes one delete to move the "return -1;" two columns to the left.

I'm not sure about the behavior after the start of the line.  So, I'm not sure the spaces before the comment are handled.  I'm pretty sure they are collapsed too.

Is this feature accounted for?  Can it be added?

Last edited by AngryLlama (2007-06-26 15:24:56)


Re: abbr and expandtab


I didn't even know about the feature. I will have a look, try to understand what vim provides, and have a look at implementing it in ViEmu. I always use spaces, but I haven't noticed vim deleting multiple spaces with a single keystroke (I usually use <<, >> and Ctrl-T/Ctrl-D while typing to move stuff around, plus the = operator for full regions).




Re: abbr and expandtab

I did help = but got nothing. you mention this operator in you last post. what does it do please?


Re: abbr and expandtab

Hi kroiz,

The = operator re-auto-indents a region of code. == adjust the indentation of the current line, but =aB will adjust the indentation of all the current brace block. I sometimes go to the beginning of the function ([[ motion), and then do =]], which fixes the indentation of the whole function.

This invokes the underlying VS autoindent system, "proper indentation" is VS's understanding of it (I mostly agree, with the exception of switch 'case' labels).




Re: abbr and expandtab

thanks, that is another tool to add to my arsenal.


Re: abbr and expandtab

You're welcome - vi/vim/viemu are full of secrets like that smile