vim: nerdtree

This commit is contained in:
Michael Grote 2022-07-31 19:48:37 +02:00
parent 068715e8f0
commit 08fecd20c2

12
.vimrc
View file

@ -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