Sunday, February 14, 2016

problem with a map

I'm using vim 7.4.1317 on Windows 7.

I often use the following command:
:g/^\d\+\.$/normal O jVjjJ

and I'd like to use it in a map. How can do it?

I tried with:
map ,p :g/^\d\+\.$/normal O jVjjJ

but it doesn't work.

I also noted that
exe "g/^\\d\\+\\.$/normal O\<Esc>jVjjJ"
works, but not when it is inside a map, as in:
map ,p exe "g/^\\d\\+\\.$/normal O\<Esc>jVjjJ"


Many thanks in advance,

--
Cesar

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment