I'm in the process of converting some mappings to commands and am having trouble working with marks. Unfortunately "normal" and "command" are too common to yield helpful search results, but I did find this hint link (http://vim.wikia.com/wiki/ Moving_lines_up_or_down_in_a_file) with these mappings:
nmap <M-j> mz:m+<CR>`z== nmap <M-k> mz:m-2<CR>`z== imap <M-j> <Esc>:m+<CR>==gi imap <M-k> <Esc>:m-2<CR>==gi vmap <M-j> :m'>+<CR>gv=`<my`>mzgv`yo`z vmap <M-k> :m'<-2<CR>gv=`>my`<mzgv`yo`z I can convert the normal mappings into commands, i.e. com! -bar -nargs=0 MoveLineDownInNormalMode normal mz:m+<CR>'z== but how can I convert insert and visual mappings into similar command formats? Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
