Merge pull request #502 from JESii/master
Add ability to list file metadata...
This commit is contained in:
commit
3092ddf831
@ -34,6 +34,10 @@ if g:NERDTreePath.CopyingSupported()
|
|||||||
call NERDTreeAddMenuItem({'text': '(c)opy the current node', 'shortcut': 'c', 'callback': 'NERDTreeCopyNode'})
|
call NERDTreeAddMenuItem({'text': '(c)opy the current node', 'shortcut': 'c', 'callback': 'NERDTreeCopyNode'})
|
||||||
endif
|
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){{{1
|
||||||
function! s:echo(msg)
|
function! s:echo(msg)
|
||||||
redraw
|
redraw
|
||||||
@ -267,4 +271,14 @@ function! NERDTreeExecuteFile()
|
|||||||
endif
|
endif
|
||||||
endfunction
|
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:
|
" vim: set sw=4 sts=4 et fdm=marker:
|
||||||
|
Loading…
Reference in New Issue
Block a user