Sunday, February 28, 2010

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

John Beckett schrieb am 01.03.2010 um 11:25:35 (+1100):
> Michael Ludwig wrote:
> > For indenting at the beginning of the line, I want tabs.
> > But in mid-line, I want them to be expanded to spaces.
>
> The first has general principles; the second is on your point:
> http://vim.wikia.com/wiki/Indenting_source_code
> http://vim.wikia.com/wiki/Indent_with_tabs,_align_with_spaces

Thanks! I had read the first but not the second. Excellent
documentation!

Smart Tabs (ctab.vim) 1.4.1 does exactly what I want.

The newer version 2.1, however, seems to be less robust. I got
the following error messages right after hitting "o" to insert
lines:

=<SNR>12_CheckAlign(line('.'))."\<END>"
Error detected while processing function <SNR>12_CheckAlign:
line 25:
E121: Undefined variable: inda
Press ENTER or type command to continue
Error detected while processing function <SNR>12_CheckAlign:
line 25:
E15: Invalid expression: inda / 50
Press ENTER or type command to continue
Error detected while processing function <SNR>12_CheckAlign:
line 26:
E121: Undefined variable: inda
Press ENTER or type command to continue
Error detected while processing function <SNR>12_CheckAlign:
line 26:
E15: Invalid expression: inda % 50
Press ENTER or type command to continue
Error detected while processing function <SNR>12_CheckAlign:
line 28:
E121: Undefined variable: indatabs
Press ENTER or type command to continue
Error detected while processing function <SNR>12_CheckAlign:
line 28:
E15: Invalid expression: indatabs*&tabstop + indaspace == indb
Press ENTER or type command to continue

Posting this only for informative purposes - so far, I'm happy
with version 1.4.1.

Thanks again!
--
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:

Post a Comment