Vim initialization files are processed in this order (simplified; see
The problem is that MacVim maps M-Right and M-Left (and several other key combinations) in its
…/MacVim.app/Contents/Resources/vim/gvimrc); this will override any mappings you have made on those key combinations in
If you examine this startup file (i.e.
:view $VIM/gvimrc), you will find that these particular mappings can be inhibited by setting the special variable
macvim_skip_cmd_opt_movement (to any value) in your
let macvim_skip_cmd_opt_movement = 1
This will inhibit ten default MacVim mappings (Command and Option for each of Left, Right, Up, Down, and BS).
Alternatively, you could just put your mappings in your
$HOME/.gvimrc (where they will override the default MacVim mappings even if you have not inhibited them with