Juanjo Gomez Navarro wrote:
>
> On the other hand, it would be great to have a macro which auto
> completes some tasks. For example, I would like that if I press F5 in
> a word, then it is automatically replaced by the text:
>
> \begin{word}
> (the cursor gets this position automatically)
> \end{word}
try this mapping (it's one single line):
:nnoremap <F5> "wciw<cr>\begin{<c-r>w}<cr> <cr>0<c-d>\end{<c-r>w}<cr><up><up><end>
Regards,
Jürgen
--
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)
--
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
No comments:
Post a Comment