edited NERD Tree mappings
This commit is contained in:
parent
308694fee1
commit
fc8216c252
1 changed files with 19 additions and 3 deletions
|
@ -81,9 +81,25 @@ let g:NERDTreeWinPos = "right"
|
||||||
let NERDTreeShowHidden=0
|
let NERDTreeShowHidden=0
|
||||||
let NERDTreeIgnore = ['\.pyc$', '__pycache__']
|
let NERDTreeIgnore = ['\.pyc$', '__pycache__']
|
||||||
let g:NERDTreeWinSize=35
|
let g:NERDTreeWinSize=35
|
||||||
map <leader>nn :NERDTreeToggle<cr>
|
" map <leader>nn :NERDTreeToggle<cr>
|
||||||
map <leader>nb :NERDTreeFromBookmark<Space>
|
" map <leader>nb :NERDTreeFromBookmark<Space>
|
||||||
map <leader>nf :NERDTreeFind<cr>
|
" map <leader>nf :NERDTreeFind<cr>
|
||||||
|
|
||||||
|
" Open a NERDTree automatically when vim starts up if no files were specified
|
||||||
|
autocmd StdinReadPre * let s:std_in=1
|
||||||
|
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
|
||||||
|
|
||||||
|
" Open NERDTree automatically when vim starts up on opening a directory
|
||||||
|
autocmd StdinReadPre * let s:std_in=1
|
||||||
|
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | exe 'cd '.argv()[0] | endif
|
||||||
|
|
||||||
|
" Shortcut to open NERDTree
|
||||||
|
map <C-t> :NERDTreeToggle<CR>
|
||||||
|
|
||||||
|
" Close vim if the only window left open is a NERDTree
|
||||||
|
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
Loading…
Reference in a new issue