Merge pull request #382 from PhilRunninger/master
Add menu option to display file/directory properties.
This commit is contained in:
commit
b19995b14f
@ -36,6 +36,8 @@ endif
|
|||||||
|
|
||||||
if has("unix") || has("osx")
|
if has("unix") || has("osx")
|
||||||
call NERDTreeAddMenuItem({'text': '(l)ist the current node', 'shortcut': 'l', 'callback': 'NERDTreeListNode'})
|
call NERDTreeAddMenuItem({'text': '(l)ist the current node', 'shortcut': 'l', 'callback': 'NERDTreeListNode'})
|
||||||
|
else
|
||||||
|
call NERDTreeAddMenuItem({'text': '(l)ist the current node', 'shortcut': 'l', 'callback': 'NERDTreeListNodeWin32'})
|
||||||
endif
|
endif
|
||||||
|
|
||||||
"FUNCTION: s:echo(msg){{{1
|
"FUNCTION: s:echo(msg){{{1
|
||||||
@ -211,6 +213,18 @@ function! NERDTreeDeleteNode()
|
|||||||
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
" FUNCTION: NERDTreeListNodeWin32() {{{1
|
||||||
|
function! NERDTreeListNodeWin32()
|
||||||
|
let treenode = g:NERDTreeFileNode.GetSelected()
|
||||||
|
if treenode != {}
|
||||||
|
let metadata = split(system('DIR /Q ' . shellescape(treenode.path.str()) . ' | FINDSTR "^[012][0-9]/[0-3][0-9]/[12][0-9][0-9][0-9]"'), '\n')
|
||||||
|
call s:echo(metadata[0])
|
||||||
|
else
|
||||||
|
call s:echo("No information avaialable")
|
||||||
|
endif
|
||||||
|
|
||||||
|
endfunction
|
||||||
|
|
||||||
" FUNCTION: NERDTreeCopyNode() {{{1
|
" FUNCTION: NERDTreeCopyNode() {{{1
|
||||||
function! NERDTreeCopyNode()
|
function! NERDTreeCopyNode()
|
||||||
let currentNode = g:NERDTreeFileNode.GetSelected()
|
let currentNode = g:NERDTreeFileNode.GetSelected()
|
||||||
@ -250,6 +264,7 @@ function! NERDTreeCopyNode()
|
|||||||
redraw
|
redraw
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
" FUNCTION: NERDTreeQuickLook() {{{1
|
||||||
function! NERDTreeQuickLook()
|
function! NERDTreeQuickLook()
|
||||||
let treenode = g:NERDTreeFileNode.GetSelected()
|
let treenode = g:NERDTreeFileNode.GetSelected()
|
||||||
if treenode != {}
|
if treenode != {}
|
||||||
@ -257,6 +272,7 @@ function! NERDTreeQuickLook()
|
|||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
" FUNCTION: NERDTreeRevealInFinder() {{{1
|
||||||
function! NERDTreeRevealInFinder()
|
function! NERDTreeRevealInFinder()
|
||||||
let treenode = g:NERDTreeFileNode.GetSelected()
|
let treenode = g:NERDTreeFileNode.GetSelected()
|
||||||
if treenode != {}
|
if treenode != {}
|
||||||
@ -264,6 +280,7 @@ function! NERDTreeRevealInFinder()
|
|||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
" FUNCTION: NERDTreeExecuteFile() {{{1
|
||||||
function! NERDTreeExecuteFile()
|
function! NERDTreeExecuteFile()
|
||||||
let treenode = g:NERDTreeFileNode.GetSelected()
|
let treenode = g:NERDTreeFileNode.GetSelected()
|
||||||
if treenode != {}
|
if treenode != {}
|
||||||
@ -271,6 +288,7 @@ function! NERDTreeExecuteFile()
|
|||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
" FUNCTION: NERDTreeListNode() {{{1
|
||||||
function! NERDTreeListNode()
|
function! NERDTreeListNode()
|
||||||
let treenode = g:NERDTreeFileNode.GetSelected()
|
let treenode = g:NERDTreeFileNode.GetSelected()
|
||||||
if treenode != {}
|
if treenode != {}
|
||||||
|
Loading…
Reference in New Issue
Block a user