On 19/04/11 18:23, Randy Morris wrote:
On Tue, Apr 19, 2011 at 05:14:38PM +0200, Christian Brabandt wrote:
On Tue, April 19, 2011 4:30 pm, Randy Morris wrote:
I may have found a bug in indenting behavior depending on whether or not
'list' is set. Can someone try to reproduce and/or explain what is
happening if it's not a bug?
<snip>
That looks like some obscure vi behaviour, that is triggered in
'compatible' mode. That should go away, if you start vim with the
-N argument (meaning to no start vim in vi-compatible mode).
This behaviour is mentioned briefly in the help at
:h cpo-L
Looking at the help I don't know, whether this is a feature or a bug.
At least it is not clear to me, how this is supposed to work.
That explains it. I forgot that nocompatible is not set when you start
vim with -u. Usually the presence of .vimrc takes care of setting that
for me.
I'll chalk this one up to a briefly documented oddity. I'm not sure why
one would ever want this behavior.
Thanks.
I think it is an explainable consequence of having 'list' on but no
"tab:xy" part in 'listchars'. In that particular case, hard tab are
displayed as ^I which gives them a constant virtual width of two cells.
So two tabs have then the same virtual width as four spaces, and your
indent "aligns". Not sure whether to call it a bug or a feature.
In all other cases, including when 'list' is on but 'listchars' defines
how to display hard tabs, the virtual width of a hard tab is variable
between a minimum of 1 and a maximum of 'tabstop'. For instance, try
:set list lcs+=tab:\|_
and you'll see tabs shown as
|_______|_______|_______|_______this line is indented by four tabs
Your line indented by "half a hard tab's width" will then again be shown
indented by four spaces.
Best regards,
Tony.
--
The cure for boredom is curiosity. There is no cure for curiosity.
--
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