Monday, May 2, 2011

Re: Remapping Down Arrow

> I want to remap Option+Up/Down to page up/page down. I've done some googling and
> tried the following with no success: "set <M-Dn> <PageDown>", "set <M-Down>
> <PageDown>", "set <M-DA> <PageDown>". Can someone help me out? I'm running Mac OSX
> if it matters.

The main problem is that you want :map not :set.

:map <M-Down> <PageDown>

To make it work in insert mode:

:map! <M-Down> <PageDown>

It's quite probable it won't work in the terminal, though. It should work in
MacVim, though. In terminal, you may find that using <Esc><Down> rather than
<M-Down> works. Except it would also work if you actually press that sequence,
which you probably don't want. On OSX, though, you can also alter your terminal
settings to make the key send a custom sequence, I think, which might be a more
reliable option--actually make Terminal.app send the pageup/pagedown sequences
when you press option-up/down; that would work in other commandline apps too.

Hope this helps,

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

No comments: