1
0
mirror of https://github.com/amix/vimrc synced 2025-07-09 18:55:01 +08:00
This commit is contained in:
geezus
2021-06-30 12:00:07 -05:00
parent 43c7efba8d
commit 3afe70fe5a
1529 changed files with 3053 additions and 3018 deletions

View File

33
sources_non_forked/nerdtree/nerdtree_plugin/fs_menu.vim Normal file → Executable file
View File

@ -41,11 +41,7 @@ endif
if g:NERDTreePath.CopyingSupported()
call NERDTreeAddMenuItem({'text': '(c)opy the current node', 'shortcut': 'c', 'callback': 'NERDTreeCopyNode'})
endif
<<<<<<< HEAD
call NERDTreeAddMenuItem({'text': (has("clipboard")?'copy (p)ath to clipboard':'print (p)ath to screen'), 'shortcut': 'p', 'callback': 'NERDTreeCopyPath'})
=======
call NERDTreeAddMenuItem({'text': (has('clipboard')?'copy (p)ath to clipboard':'print (p)ath to screen'), 'shortcut': 'p', 'callback': 'NERDTreeCopyPath'})
>>>>>>> 27ad0d07862847896f691309a544a206783c94d6
if has('unix') || has('osx')
call NERDTreeAddMenuItem({'text': '(l)ist the current node', 'shortcut': 'l', 'callback': 'NERDTreeListNode'})
@ -53,6 +49,10 @@ else
call NERDTreeAddMenuItem({'text': '(l)ist the current node', 'shortcut': 'l', 'callback': 'NERDTreeListNodeWin32'})
endif
if exists('*system')
call NERDTreeAddMenuItem({'text': 'Run (s)ystem command in this directory', 'shortcut':'s', 'callback': 'NERDTreeSystemCommand'})
endif
"FUNCTION: s:inputPrompt(action){{{1
"returns the string that should be prompted to the user for the given action
"
@ -376,13 +376,6 @@ endfunction
" FUNCTION: NERDTreeCopyPath() {{{1
function! NERDTreeCopyPath()
let l:nodePath = g:NERDTreeFileNode.GetSelected().path.str()
<<<<<<< HEAD
if has("clipboard")
let @* = l:nodePath
call nerdtree#echo("The path [" . l:nodePath . "] was copied to your clipboard.")
else
call nerdtree#echo("The full path is: " . l:nodePath)
=======
if has('clipboard')
if &clipboard ==# 'unnamedplus'
let @+ = l:nodePath
@ -392,7 +385,6 @@ function! NERDTreeCopyPath()
call nerdtree#echo('The path [' . l:nodePath . '] was copied to your clipboard.')
else
call nerdtree#echo('The full path is: ' . l:nodePath)
>>>>>>> 27ad0d07862847896f691309a544a206783c94d6
endif
endfunction
@ -472,4 +464,21 @@ function! NERDTreeExecuteFileWindows()
call system('cmd.exe /c start "" ' . shellescape(l:node.path.str()))
endfunction
" FUNCTION: NERDTreeSystemCommand() {{{1
function! NERDTreeSystemCommand()
let l:node = g:NERDTreeFileNode.GetSelected()
if empty(l:node)
return
endif
let l:cwd = getcwd()
let l:directory = l:node.path.isDirectory ? l:node.path.str() : l:node.parent.path.str()
execute 'cd '.l:directory
let l:nl = nr2char(10)
echo l:nl . system(input(l:directory . (nerdtree#runningWindows() ? '> ' : ' $ ')))
execute 'cd '.l:cwd
endfunction
" vim: set sw=4 sts=4 et fdm=marker:

0
sources_non_forked/nerdtree/nerdtree_plugin/vcs.vim Normal file → Executable file
View File