1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-02 22:40:06 +08:00

Fix yarked action

This commit is contained in:
Shidong Wang 2019-03-23 21:44:27 +08:00
parent 5e8a168add
commit 724c73a8cf

View File

@ -121,8 +121,7 @@ function! s:defx_init()
\ defx#do_action('remove')
nnoremap <silent><buffer><expr> r
\ defx#do_action('rename')
nnoremap <silent><buffer><expr> yy
\ defx#do_action('yank_path')
nnoremap <silent><buffer><expr> yy defx#do_action('call', 'DefxYarkPath')
nnoremap <silent><buffer><expr> .
\ defx#do_action('toggle_ignored_files')
nnoremap <silent><buffer><expr> ~
@ -160,6 +159,12 @@ function! DefxSmartH(_)
call defx#call_action('close_tree')
endfunction
function! DefxYarkPath(_) abort
let candidate = defx#get_candidate()
let @+ = candidate['action__path']
echo 'yarked: ' . @+
endfunction
function! s:trim_right(str, trim)
return substitute(a:str, printf('%s$', a:trim), '', 'g')
endfunction