0

I am used the vifm's hjkl key maps to navigate and open files. After installing NERDTree , I find it difficult as now the l key wont open file but will just move the pointer to the left( unlike in vifm where it opened the current file) .

So , I want to map some keys of NERDTree to give me vifm experience . How to do that?

3
  • Do you mean hjkl (notice the case)? Based on this manual, I think that is what you mean, but I'm not certain. Oct 27 '20 at 20:37
  • @JakeGrossman , Ya , I meant hjkl. Dont know why I put it in capital letters in the question! . Ya so basically I want to navigate though the files using vifm or ranger like commands
    – Jdeep
    Oct 28 '20 at 7:56
  • @JakeGrossman , No actually my problem is not with vifm. It works fine. My problem is with NERDTree. Say for example I want to open a directory using NERDTree , then I have to press o to open it. But I want to map the o key to l key so that a directory opens when I click on l
    – Jdeep
    Oct 28 '20 at 7:58
0

if you look at the NERDTree manual, there is a section called NERDTreeMappings search for "Default Key: o", doing that will take you that particular mapping's description and the variable to remap that binding, the variable is named after the "Map setting:" part of the corresponding binding, which for "o" is:

Default key: o
Map setting: NERDTreeMapActivateNode

so to remap it you would put this in your .vimrc or init.vim

let NERDTreeMapActivateNode = 'i'

the value can be any binding that you would normally define in a vim map

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.