Christian Brabandt <cbli...@256bit.org> a écrit:
> 
> Hi Paul!
> 
> On Di, 10 Jan 2012, Paul Isambert wrote:
> 
> > Hello there,
> > 
> > Given the mapping:
> > 
> >   map <Tab> fXa
> > 
> > where X stands for any character, if X appears on the line, <Tab>
> > goes to Insert mode after that character, as expected; but if the
> > character doesn't appear on the line, the cursor shouldn't move but it
> > should still switch to Insert mode -- and that doesn't happen; it
> > stays in Normal mode. For instance "map <Tab> fza" stays in Normal
> > mode on a line with no "z".
> > 
> > Also (I suppose it is related):
> > 
> >   map <Tab> fX<l>a
> > 
> > where <l> denotes one or more "l", encounters the same problem if X
> > appears on the line but there is less characters than "l"'s in <l>; e.g.:
> > 
> >   map <Tab> fzlla
> > 
> > works well for the first "z" in a line made of "xxxz12z1", but not for
> > the second (the cursor stays on the "1" in Normal mode)
> > 
> > What am I missing?
> 
> When an error occurs, while the mapping is executed, the rest of the 
> mapping is discarded. This is IIRC, vi-compatible.

Thank you, Christian. It is indeed mentionned at the end of section 1.6
of map.txt, I'd just never read it (and I suppose I wouldn't have thought
of not finding a character as an error). As far as I'm concerned, I
wouldn't mind if that compatibility were turned off with an option.

Best,
Paul

-- 
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

Reply via email to