I have added this to my .vimrc:

nnoremap <up> <nop>
nnoremap <down> <nop>
nnoremap <left> <nop>
nnoremap <right> <nop>
inoremap <up> <nop>
inoremap <down> <nop>
inoremap <left> <nop>
inoremap <right> <nop>

This works in normal and visual mode, but I can still use arrows in insert mode.

I'm using Janus to set up my vim.

I'm a two-week convert, so my vim foo is limited. Is this a MacVim-related issue? Is Janus' configuration somehow getting in the way?

1 Answer 1


The first thing to do is to try to determine if your mappings are defined as you expect:

:verbose imap <up>
:verbose imap <down>


This will show you what the current insert mode mapping is for your keys, and—if they are somehow being overridden—where they were defined.

  • This is a sample output I get. Not sure what to make of it. Is the autoclose plugin the culprit? i <Down> *@<C-R>=<SNR>23_FlushBuffer()<CR><Down> Last set from ~/.vim/plugin/autoclose.vim i <Down> * <Nop> Last set from ~/.vimrc.local Press ENTER or type command to continue Nov 16, 2010 at 3:15
  • Yes, this shows that the autoclose plugin is resetting the mappings. You can probably safely edit that file and comment out the lines that define the arrow key mappings, using a leading double quote character.
    – Heptite
    Nov 16, 2010 at 18:53
  • Thanks! Note to Janus users: Move remapping to .gvimrc.local. Nov 18, 2010 at 14:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.