diff --git a/nerdtree_plugin/fs_menu.vim b/nerdtree_plugin/fs_menu.vim index e99a85b..7caa6cc 100644 --- a/nerdtree_plugin/fs_menu.vim +++ b/nerdtree_plugin/fs_menu.vim @@ -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: