mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 13:00:04 +08:00
fix(nerdtree): Fix .
key binding in nerdtree
Within filetree buffer, the `.` key is used to toggle hidden files
This commit is contained in:
parent
534c2bf815
commit
3354f6e6a7
@ -29,6 +29,7 @@ function! s:nerdtreeinit() abort
|
|||||||
nnoremap <silent><buffer> h :<C-u>call <SID>nerdtree_h()<CR>
|
nnoremap <silent><buffer> h :<C-u>call <SID>nerdtree_h()<CR>
|
||||||
nnoremap <silent><buffer> l :<C-u>call <SID>nerdtree_l()<CR>
|
nnoremap <silent><buffer> l :<C-u>call <SID>nerdtree_l()<CR>
|
||||||
nnoremap <silent><buffer> N :<C-u>call NERDTreeAddNode()<CR>
|
nnoremap <silent><buffer> N :<C-u>call NERDTreeAddNode()<CR>
|
||||||
|
nnoremap <silent><buffer> . :<C-u>call <SID>nerdtree_dot()<CR>
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:paste_to_file_manager() abort
|
function! s:paste_to_file_manager() abort
|
||||||
@ -55,9 +56,9 @@ endfunction
|
|||||||
function! s:nerdtree_h() abort
|
function! s:nerdtree_h() abort
|
||||||
" let path = g:NERDTreeFileNode.GetSelected().path.str()
|
" let path = g:NERDTreeFileNode.GetSelected().path.str()
|
||||||
" if isdirectory(path)
|
" if isdirectory(path)
|
||||||
" let path = s:FILE.unify_path(path, ':p:h:h')
|
" let path = s:FILE.unify_path(path, ':p:h:h')
|
||||||
" else
|
" else
|
||||||
" let path = s:FILE.unify_path(path, ':p:h')
|
" let path = s:FILE.unify_path(path, ':p:h')
|
||||||
" endif
|
" endif
|
||||||
" exe 'NERDTreeFind ' . path
|
" exe 'NERDTreeFind ' . path
|
||||||
call g:NERDTreeKeyMap.Invoke('p')
|
call g:NERDTreeKeyMap.Invoke('p')
|
||||||
@ -77,3 +78,7 @@ function! s:nerdtree_l() abort
|
|||||||
call g:NERDTreeKeyMap.Invoke('o')
|
call g:NERDTreeKeyMap.Invoke('o')
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! s:nerdtree_dot() abort
|
||||||
|
call g:NERDTreeKeyMap.Invoke('I')
|
||||||
|
endfunction
|
||||||
|
Loading…
Reference in New Issue
Block a user