0

I am trying to disable the arrow keys in the vimrc (previously I was doing it by doing a no-op on the keyboard itself):

"Disable arrow keys inoremap <Left> <Nop> 

However, it seems to be doing nothing, as it seems like the actual keyboard code sent for an arrow key (using insert, ctrl-v) is:

^[OD 

So, is there a way to disable the arrow keys from within vim? Or does this need to be done outside it?

5
  • Does this question answer yours? Commented Jun 10, 2020 at 5:36
  • @Biggybi -- no. I'm already doing noremap <Up> <Nop>, and wondering why that's not working, etc. Commented Jun 10, 2020 at 5:39
  • Not sure what's happening, but you could always remap them to, say, <c-o>echo "Nice try!"<cr> Commented Jun 10, 2020 at 5:52
  • Can't reproduce. Your inoremap <Left> <Nop> works for me in terminal and gui in Vim 8.2 (linux). Commented Jun 10, 2020 at 5:53
  • 1
    Your mapping should work correctly I also reproduce it in a Vim 8.0 and neovim 0.4.3. I think you might be interested in how to debug a mapping and maybe also how to debug my vimrc Commented Jun 10, 2020 at 7:16

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.