Arindam Paul
Arindam Paul

Reputation: 388

NERDTree opens up everytime I hit return in Normal Mode

This is getting really annoying for me. I only have this line for my NERDTree in my .vimrc file,

nmap <silent> <c-o> :NERDTreeToggle <CR> 

Every time I hit return key in my Vim window in normal mode (Command Mode). NERDTree pops up.

Can anyone help me out with this problem?

Upvotes: 0

Views: 241

Answers (2)

riza salahuddin
riza salahuddin

Reputation: 31

I had this issue when i mapped

<C-m>

to NERDTree. Fixed it by changing to something else which didn't involve ctrl key

Upvotes: 1

John Hinnegan
John Hinnegan

Reputation: 5962

Here's generally what I use.

:noremap <Leader>n :NERDTreeToggle<CR>

autocmd VimEnter * exe 'NERDTree' | wincmd l

starts up nerdtree on start and give me ',n' as my toggle

Upvotes: 1

Related Questions