On 09/07/10 21:52, Ben Fritz wrote:
On Jul 8, 12:48 am, Martin Trautmann<[email protected]> wrote:
how do I map s/ to s/\v in order to use "very magic" regular expression
handling as a default?
I know that
:nnoremap / /\v
does work, but I do not really understand the map variations.
This will work fine for normal mode. You probably also want to define
an xnoremap and an onoremap version.
See :help map-modes for more info.
Or were you missing the distinction between :nmap and :nnoremap, for
example? These two commands are different only in that the first will
expand mappings when executing (in your example, creating a recursive
mapping), whereas the second will not expand mappings, which is what
you want in this case.
From :help recursive-mapping
[...] There is one
exception: If the {rhs} starts with {lhs}, the first character is not mapped
again (this is Vi compatible).
For example: >
:map ab abcd
will execute the "a" command and insert "bcd" in the text. The "ab" in the
{rhs} will not be mapped again.
so in this case the "nore" may be omitted, the mapping will still not be
recursive.
Best regards,
Tony.
--
Renning's Maxim:
Man is the highest animal. Man does the classifying.
--
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