114183Re: Which is the best way of doing some mapping reuse?
- May 2 5:16 AMOn May 2, 10:45 pm, Raúl Núñez de Arenas Coronado <raul...@...>
> First one is copying and pasting the map...How about a level of indirection using :exe :
let mapped = "<silent><buffer> <LocalLeader>KEY "
let mapping = "m'gg\"+yG\""
exe 'nnoremap ' . mapped . mapping
exe 'inoremap ' . mapped . '<esc>' . mapping . 'i'
I don't know how usable this is, I just checked :map output to see
that the mappings had been made.
You could extend this to a general function, f. ex.
call Makemaps(mapped, mapping, modes)
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
- << Previous post in topic Next post in topic >>