Works! Thank you :-)

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of Benjamin R. Haskell
Sent: Tuesday, March 13, 2012 6:33 PM
To: [email protected]
Subject: RE: Move current line up

On Tue, 13 Mar 2012, Yannik Sembritzki wrote:

> Thanks for all the answers.
>
> I now mapped the following:
>
> nmap <A-k> :m+<CR>
> imap <A-k> <ESC>:m+<CR>a
> nmap <A-j> :m-2<CR>
> imap <A-j> <ESC>:m-2<CR>a
>
> Somehow, the mapping is not functioning and <A-j> / <A-k> still moves 
> up / down. Is there something I did wrong? When mapping it to another 
> key it is working.

See:

:help :map-alt-keys

Try changing <A-{whatever}> to <Esc>{whatever}, e.g.:

nmap <Esc>k :m+<CR>

--
Best,
Ben

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

Reply via email to