I have this line in my .vimrc:
nmap <silent> <Leader>p :NERDTreeToggle<CR>
So what is the hotkey for toggling NERDTree?
How do I remap it to CTRL-D?
what is the difference between nmap
, map
, nnoremap
, inoremap
, etc?
I have this line in my .vimrc:
nmap <silent> <Leader>p :NERDTreeToggle<CR>
So what is the hotkey for toggling NERDTree?
How do I remap it to CTRL-D?
what is the difference between nmap
, map
, nnoremap
, inoremap
, etc?
to remap in normal mode use
nmap <silent> <C-D> :NERDTreeToggle<CR>
nmap
means map in normal mode
imap
means map in insert mode
the nore
part in nnoremap
and its friends prevent expanding the mapping recursively. For example, i use to also hide search string so, in my vimrc I have
nnoremap <silent> <C-L> :noh<CR><C-L>
Without the nore
, the above mapping will loop.
@fcuk122 - try this nmap :NERDTreeToggle I think CTRL + D is already used in system try CRTL + T or any other convenient key and which not used by terminal or VIM. may work for you.
© 2022 - 2024 — McMap. All rights reserved.