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.

regards,
Christian
-- 
Der allgemeine neuere Vulkanismus ist eigentlich ein kühner 
Versuch, die gegenwärtige unbegreifliche Welt an eine vergangene 
unbekannte zu knüpfen.
                -- Goethe, Maximen und Reflektionen, Nr. 921

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