mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-24 05:30:07 +08:00
Enhance defx config (#2793)
This commit is contained in:
parent
e0ec22db97
commit
98dbadfde4
@ -200,7 +200,7 @@ function! SpaceVim#layers#core#config() abort
|
||||
" TODO: fix all these command
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['f', 't'], 'Defx', 'toggle_file_tree', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['f', 'T'], 'Defx -no-toggle', 'show_file_tree', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['f', 'o'], "Defx -no-toggle -search=`expand('%:p')` `getcwd()`", 'open_file_tree', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['f', 'o'], "Defx -no-toggle -search=`expand('%:p')` `stridx(expand('%:p'), getcwd()) < 0? expand('%:p:h'): getcwd()`", 'open_file_tree', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['b', 't'], 'Defx -no-toggle', 'show_file_tree_at_buffer_dir', 1)
|
||||
endif
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['f', 'y'], 'call zvim#util#CopyToClipboard()', 'show-and-copy-buffer-filename', 1)
|
||||
@ -399,7 +399,7 @@ function! s:split_string(newline) abort
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
let l:connector = a:newline ? "\n" : ""
|
||||
let l:connector = a:newline ? "\n" : ''
|
||||
let l:save_register_m = @m
|
||||
let @m = sep . l:connector . sep
|
||||
normal! "mp
|
||||
@ -442,7 +442,7 @@ function! s:safe_erase_buffer() abort
|
||||
endfunction
|
||||
|
||||
function! s:ToggleWinDiskManager() abort
|
||||
if bufexists("__windisk__")
|
||||
if bufexists('__windisk__')
|
||||
execute 'bd "__windisk__"'
|
||||
else
|
||||
call SpaceVim#plugins#windisk#open()
|
||||
|
Loading…
Reference in New Issue
Block a user