Re: abbr and expandtab
Any plans to support these in the future ? I'd at love to see at least abbr.
thanks !
-amol
You are not logged in. Please login or register.
Any plans to support these in the future ? I'd at love to see at least abbr.
thanks !
-amol
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.
no worries, your explanation makes sense to me.
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:
int.fn().{
..if.(i.==.0)
....return.-1;.........//Oops an error
..return.j;
}
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)
Hi,
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).
Regards,
Jon
I did help = but got nothing. you mention this operator in you last post. what does it do please?
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).
Cheers,
Jon
thanks, that is another tool to add to my arsenal.
You're welcome - vi/vim/viemu are full of secrets like that
Currently installed 3 official extensions. Copyright © 2003–2009 PunBB.
[ Generated in 0.028 seconds, 11 queries executed ]