vim: nerdtree
This commit is contained in:
parent
068715e8f0
commit
08fecd20c2
1 changed files with 11 additions and 1 deletions
12
.vimrc
12
.vimrc
|
@ -192,7 +192,7 @@ nmap Y y$
|
|||
nnoremap <Leader>sr :%s/<C-r><C-w>//gc<Left><Left><Left>
|
||||
vnoremap <Leader>sr y:%s/<C-R>"//gc<Left><Left><Left>
|
||||
" Toggle NERDTree
|
||||
nnoremap <F2> :NERDTreeToggle<CR>
|
||||
nnoremap <F2> :call ToggleNERDTreeFind()<CR>
|
||||
" toogle floaterm
|
||||
let g:floaterm_keymap_toggle = '<F3>'
|
||||
|
||||
|
@ -216,3 +216,13 @@ autocmd BufWritePre * :%s/\s\+$//e
|
|||
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
|
||||
" NERDTree - show hidden files
|
||||
let NERDTreeShowHidden=1
|
||||
|
||||
" NERDTREE - Find file or close
|
||||
" https://stackoverflow.com/questions/14964020/is-it-possible-to-configure-behaviour-of-nerdtreetoggle-to-use-nerdtreefind-When
|
||||
function! ToggleNERDTreeFind()
|
||||
if g:NERDTree.IsOpen()
|
||||
execute ':NERDTreeClose'
|
||||
else
|
||||
execute ':NERDTreeFind'
|
||||
endif
|
||||
endfunction
|
||||
|
|
Loading…
Reference in a new issue