mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
[nvim] add DragOut command
This commit is contained in:
parent
ef1bd7fa6a
commit
9ce4eb6d46
1 changed files with 14 additions and 0 deletions
|
@ -105,6 +105,20 @@ nnoremap <silent><expr> <CR> empty(&buftype) ? ":write<bar>wall\<CR>" : "\<CR>"
|
||||||
command -nargs=* -complete=file -bar EditGlob call s:EditGlob(<f-args>)
|
command -nargs=* -complete=file -bar EditGlob call s:EditGlob(<f-args>)
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
|
" DragOut {{{
|
||||||
|
" Shows a window for draging (-and-dropping) the currently opened file out.
|
||||||
|
function s:DragOut(path)
|
||||||
|
if empty(a:path) | return | endif
|
||||||
|
if !executable('dragon-drag-and-drop')
|
||||||
|
echoerr "Please install <https://github.com/mwh/dragon> for the DragOut command to work."
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
execute '!dragon-drag-and-drop '.shellescape(a:path)
|
||||||
|
endfunction
|
||||||
|
command -nargs=* -complete=file DragOut call s:DragOut(empty(<q-args>) ? expand('%') : <q-args>)
|
||||||
|
" }}}
|
||||||
|
|
||||||
|
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue