Sunday, February 28, 2010

Smart expandtab at beginning of line vs in mid-line?

For indenting at the beginning of the line, I want tabs.
But in mid-line, I want them to be expanded to spaces.
Can this be achieved in Vim?

bla.callSomeMethod( eins, zwei ); // jau
bla.callAnotherMethod( eins, zwei, drei ); // jaujau

The reason for this is that while it all looks fine given my
personal tabstop setting of 4, and possibly others for this
particular piece of text; but in general the end-of-line
comments will not look justified for each and every setting
of tabstop. Spaces are more robust here.

Is there a setting in Vim to expand tabs depending on whether
I'm at the beginning of a line (indenting), or in the middle
of the line (formatting)?

--
Michael Ludwig

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: