Hi,

I'm having difficultly mapping alt + the arrow keys at startup in MacVim.

So, I have this in my .vimrc in order to move between windows:

map <M-Up> :wincmd k<CR>
map <M-Down> :wincmd j<CR>
map <M-Left> :wincmd h<CR>
map <M-Right> :wincmd l<CR>

But this doesn't work in MacVim at startup, alt+left/right navigate to 
previous/next word and alt+up/down seem to navigate to previous/next paragraph. 
It does work if I do:

:source ~/.vimrc

So somehow if my execute my vimrc after MacVim has started then the mapping 
works correctly. Everything else in my vimrc works normally without having to 
manually source it including other key mappings. I've also tried deleting 
everything else in my vimrc except those 4 lines and it still doesn't work. If 
I change the maps to:

map <C-M-Up> :wincmd k<CR>
map <C-M-Down> :wincmd j<CR>
map <C-M-Left> :wincmd h<CR>
map <C-M-Right> :wincmd l<CR>

Then it works correctly at MacVim startup, but I don't want to have to hold 
both ctrl+alt. Only keybindings with alt alone don't work.

I've tried playing with the macmeta setting, it doesn't make any difference. I 
shouldn't need macmeta anyway according to the help page:

        Note: Some keys (e.g. <M-F1>, <M-Tab>, <M-Return>, <M-Left>) can be
        bound with the Meta flag even when this option is disabled, but this
        is not the case for the majority of keys (e.g. <M-a>, <M-`>).

I'm kind of stumped at this point. Any help is appreciated.

Thanks,
Shaun

-- 
-- 
You received this message from the "vim_mac" 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 because you are subscribed to the Google Groups 
"vim_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to