mirror of
https://github.com/amix/vimrc
synced 2025-06-17 19:35:00 +08:00
Updated plugins
This commit is contained in:
@ -34,6 +34,10 @@ if executable('xdg-open')
|
||||
call NERDTreeAddMenuItem({'text': '(o)pen the current node with system editor', 'shortcut': 'o', 'callback': 'NERDTreeExecuteFileLinux'})
|
||||
endif
|
||||
|
||||
if nerdtree#runningWindows()
|
||||
call NERDTreeAddMenuItem({'text': '(o)pen the current node with system editor', 'shortcut': 'o', 'callback': 'NERDTreeExecuteFileWindows'})
|
||||
endif
|
||||
|
||||
if g:NERDTreePath.CopyingSupported()
|
||||
call NERDTreeAddMenuItem({'text': '(c)opy the current node', 'shortcut': 'c', 'callback': 'NERDTreeCopyNode'})
|
||||
endif
|
||||
@ -451,4 +455,15 @@ function! NERDTreeExecuteFileLinux()
|
||||
call system('xdg-open ' . shellescape(l:node.path.str()))
|
||||
endfunction
|
||||
|
||||
" FUNCTION: NERDTreeExecuteFileWindows() {{{1
|
||||
function! NERDTreeExecuteFileWindows()
|
||||
let l:node = g:NERDTreeFileNode.GetSelected()
|
||||
|
||||
if empty(l:node)
|
||||
return
|
||||
endif
|
||||
|
||||
call system('cmd.exe /c start "" ' . shellescape(l:node.path.str()))
|
||||
endfunction
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
Reference in New Issue
Block a user