Add menu option to display file/directory properties.
This commit is contained in:
parent
4f1e6ecb05
commit
6ccf83df24
@ -23,6 +23,7 @@ endif
|
||||
call NERDTreeAddMenuItem({'text': '(a)dd a childnode', 'shortcut': 'a', 'callback': 'NERDTreeAddNode'})
|
||||
call NERDTreeAddMenuItem({'text': '(m)ove the current node', 'shortcut': 'm', 'callback': 'NERDTreeMoveNode'})
|
||||
call NERDTreeAddMenuItem({'text': '(d)elete the current node', 'shortcut': 'd', 'callback': 'NERDTreeDeleteNode'})
|
||||
call NERDTreeAddMenuItem({'text': 'show (p)roperties of the current node', 'shortcut': 'p', 'callback': 'NERDTreeNodeProperties'})
|
||||
|
||||
if has("gui_mac") || has("gui_macvim")
|
||||
call NERDTreeAddMenuItem({'text': '(r)eveal in Finder the current node', 'shortcut': 'r', 'callback': 'NERDTreeRevealInFinder'})
|
||||
@ -206,6 +207,12 @@ function! NERDTreeDeleteNode()
|
||||
|
||||
endfunction
|
||||
|
||||
" FUNCTION: NERDTreeNodeProperties() {{{1
|
||||
function! NERDTreeNodeProperties()
|
||||
let currentNode = g:NERDTreeFileNode.GetSelected()
|
||||
call s:echo(getfsize(currentNode.path.str())." bytes modified on ".strftime("%A %Y-%m-%d %H:%M:%S", getftime(currentNode.path.str())))
|
||||
endfunction
|
||||
|
||||
" FUNCTION: NERDTreeCopyNode() {{{1
|
||||
function! NERDTreeCopyNode()
|
||||
let currentNode = g:NERDTreeFileNode.GetSelected()
|
||||
|
Loading…
Reference in New Issue
Block a user