nerd fix
This commit is contained in:
parent
407143e842
commit
578729dd88
@ -56,11 +56,14 @@ let g:netrw_keepdir = 0
|
|||||||
|
|
||||||
|
|
||||||
" Mirror the NERDTree before showing it. This makes it the same on all tabs.
|
" Mirror the NERDTree before showing it. This makes it the same on all tabs.
|
||||||
nnoremap <silent> <leader>n :NERDTreeMirror<CR>:NERDTreeToggle<CR>
|
nnoremap <silent> <leader>nn :NERDTreeMirror<CR>:NERDTreeToggle<CR>
|
||||||
|
|
||||||
|
" Toggle focus
|
||||||
|
nnoremap <silent> <leader>nf :wincmd p<CR>
|
||||||
|
|
||||||
" Start NERDTree when Vim is started without file arguments.
|
" Start NERDTree when Vim is started without file arguments.
|
||||||
autocmd StdinReadPre * let s:std_in=1
|
autocmd StdinReadPre * let s:std_in=1
|
||||||
autocmd VimEnter * if argc() == 0 && !exists('s:std_in') | NERDTree | endif
|
autocmd VimEnter * if argc() == 0 && !exists('s:std_in') | NERDTree | wincmd p | endif
|
||||||
|
|
||||||
" Exit Vim if NERDTree is the only window remaining in the only tab.
|
" Exit Vim if NERDTree is the only window remaining in the only tab.
|
||||||
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
|
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user