I'm a Colemak keyboard layout user and I recently started to learn and use Vim.

I was able to map the arrow keys in the normal mode by putting custom mappings such as noremap u k in .vimrc (because the keys h, j, k, and i are in different places in the Colemak layout).

However, when I tried to use NERDTree, navigating through the NERDTree menu became very hard for me for I have to reach j and k key to navigate up and down (those keys are y and k in QWERTY).

Is there a way to map those two keys into other keys?

I would really appreciate any help!


if you look at the documentation (:help NERDTree-t), you'll see that each of the command have a name and a default key.

To remap for example NERDTreeMapUpdir to the 'a' key, you just have to add to you .vimrc:

let NERDTreeMapUpdir='a'
  • It worked! Thank you so much! It wasn't working when I tried to set let NERDTreeMenuDown = "e" and the reason was that the key e has been bound to something else, so by setting the NERDTreeMapOpenExpl to some other key solved the issue. – David Apr 20 at 20:18

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.