mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 01:40:05 +08:00
Fix yarked action
This commit is contained in:
parent
5e8a168add
commit
724c73a8cf
@ -121,8 +121,7 @@ function! s:defx_init()
|
|||||||
\ defx#do_action('remove')
|
\ defx#do_action('remove')
|
||||||
nnoremap <silent><buffer><expr> r
|
nnoremap <silent><buffer><expr> r
|
||||||
\ defx#do_action('rename')
|
\ defx#do_action('rename')
|
||||||
nnoremap <silent><buffer><expr> yy
|
nnoremap <silent><buffer><expr> yy defx#do_action('call', 'DefxYarkPath')
|
||||||
\ defx#do_action('yank_path')
|
|
||||||
nnoremap <silent><buffer><expr> .
|
nnoremap <silent><buffer><expr> .
|
||||||
\ defx#do_action('toggle_ignored_files')
|
\ defx#do_action('toggle_ignored_files')
|
||||||
nnoremap <silent><buffer><expr> ~
|
nnoremap <silent><buffer><expr> ~
|
||||||
@ -160,6 +159,12 @@ function! DefxSmartH(_)
|
|||||||
call defx#call_action('close_tree')
|
call defx#call_action('close_tree')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! DefxYarkPath(_) abort
|
||||||
|
let candidate = defx#get_candidate()
|
||||||
|
let @+ = candidate['action__path']
|
||||||
|
echo 'yarked: ' . @+
|
||||||
|
endfunction
|
||||||
|
|
||||||
function! s:trim_right(str, trim)
|
function! s:trim_right(str, trim)
|
||||||
return substitute(a:str, printf('%s$', a:trim), '', 'g')
|
return substitute(a:str, printf('%s$', a:trim), '', 'g')
|
||||||
endfunction
|
endfunction
|
||||||
|
Loading…
Reference in New Issue
Block a user