Merge pull request #816 from kutsan/master
Add new variable g:NERDTreeRemoveFileCmd
This commit is contained in:
commit
b702500f77
@ -694,6 +694,12 @@ NERD tree. These options should be set in your vimrc.
|
|||||||
|'NERDTreeCreatePrefix'| Specify a prefix to be used when creating the
|
|'NERDTreeCreatePrefix'| Specify a prefix to be used when creating the
|
||||||
NERDTree window.
|
NERDTree window.
|
||||||
|
|
||||||
|
|'NERDTreeRemoveFileCmd'| Specify a custom shell command that will used
|
||||||
|
when deleting files with delete action. Note
|
||||||
|
that, it should be one space character at the
|
||||||
|
end of the command and it applies only for files.
|
||||||
|
See |g:NERDTreeRemoveDirCmd| for directories.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
3.2. Customisation details *NERDTreeOptionDetails*
|
3.2. Customisation details *NERDTreeOptionDetails*
|
||||||
|
|
||||||
|
@ -246,7 +246,13 @@ function! s:Path.delete()
|
|||||||
throw "NERDTree.PathDeletionError: Could not delete directory: '" . self.str() . "'"
|
throw "NERDTree.PathDeletionError: Could not delete directory: '" . self.str() . "'"
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
let success = delete(self.str())
|
if exists('g:NERDTreeRemoveFileCmd')
|
||||||
|
let cmd = g:NERDTreeRemoveFileCmd . self.str({'escape': 1})
|
||||||
|
let success = system(cmd)
|
||||||
|
else
|
||||||
|
let success = delete(self.str())
|
||||||
|
endif
|
||||||
|
|
||||||
if success != 0
|
if success != 0
|
||||||
throw "NERDTree.PathDeletionError: Could not delete file: '" . self.str() . "'"
|
throw "NERDTree.PathDeletionError: Could not delete file: '" . self.str() . "'"
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user