diff --git a/config/plugins/nerdtree.vim b/config/plugins/nerdtree.vim index fe885458d..1f6b31870 100644 --- a/config/plugins/nerdtree.vim +++ b/config/plugins/nerdtree.vim @@ -29,6 +29,7 @@ function! s:nerdtreeinit() abort nnoremap h :call nerdtree_h() nnoremap l :call nerdtree_l() nnoremap N :call NERDTreeAddNode() + nnoremap . :call nerdtree_dot() endfunction function! s:paste_to_file_manager() abort @@ -55,9 +56,9 @@ endfunction function! s:nerdtree_h() abort " let path = g:NERDTreeFileNode.GetSelected().path.str() " if isdirectory(path) - " let path = s:FILE.unify_path(path, ':p:h:h') + " let path = s:FILE.unify_path(path, ':p:h:h') " else - " let path = s:FILE.unify_path(path, ':p:h') + " let path = s:FILE.unify_path(path, ':p:h') " endif " exe 'NERDTreeFind ' . path call g:NERDTreeKeyMap.Invoke('p') @@ -77,3 +78,7 @@ function! s:nerdtree_l() abort call g:NERDTreeKeyMap.Invoke('o') endif endfunction + +function! s:nerdtree_dot() abort + call g:NERDTreeKeyMap.Invoke('I') +endfunction