search

Home  >  Q&A  >  body text

After opening NERDTree and entering vim, how can the cursor be placed in the file editing area on the right by default?

After configuring NERDTree to be automatically enabled by default in

.vimrc, every time you enter vim, the cursor is in the NERDTree on the left, and you have to manually ctrl+w+w to the right editing area, which is very troublesome.
I searched online for a while but couldn't find the corresponding configuration. I don't know how the experts configured it. Please give me some advice XD

天蓬老师天蓬老师2773 days ago799

reply all(1)I'll reply

  • 世界只因有你

    世界只因有你2017-05-16 16:43:30

    Can be set as follows:

    autocmd VimEnter * NERDTree
    wincmd w
    autocmd VimEnter * wincmd w
    

    reply
    0
  • Cancelreply