Merge pull request #502 from JESii/master

Add ability to list file metadata...
This commit is contained in:
Martin Grenfell 2015-11-12 14:21:54 +00:00
commit 3092ddf831

View File

@ -34,6 +34,10 @@ if g:NERDTreePath.CopyingSupported()
call NERDTreeAddMenuItem({'text': '(c)opy the current node', 'shortcut': 'c', 'callback': 'NERDTreeCopyNode'})
endif
if has("unix") || has("osx")
call NERDTreeAddMenuItem({'text': '(l)ist the current node', 'shortcut': 'l', 'callback': 'NERDTreeListNode'})
endif
"FUNCTION: s:echo(msg){{{1
function! s:echo(msg)
redraw
@ -267,4 +271,14 @@ function! NERDTreeExecuteFile()
endif
endfunction
function! NERDTreeListNode()
let treenode = g:NERDTreeFileNode.GetSelected()
if treenode != {}
let metadata = split(system('ls -ld ' . shellescape(treenode.path.str())), '\n')
call s:echo(metadata[0])
else
call s:echo("No information avaialable")
endif
endfunction
" vim: set sw=4 sts=4 et fdm=marker: