Skip to content

Commit

Permalink
Update plugin/NERD_tree-ag.vim
Browse files Browse the repository at this point in the history
  • Loading branch information
vsushkov committed Oct 17, 2012
1 parent a2be9c0 commit 2874499
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions plugin/NERD_tree-ag.vim
Expand Up @@ -12,19 +12,19 @@


" don't load multiple times
if exists("g:loaded_nerdtree_ag")
if exists("g:loaded_nerdtree_ag_ack")
finish
endif

let g:loaded_nerdtree_ag = 1
let g:loaded_nerdtree_ag_ack = 1

" add the new menu item via NERD_Tree's API
call NERDTreeAddMenuItem({
\ 'text': '(s)earch directory',
\ 'shortcut': 's',
\ 'callback': 'NERDTreeAg' })
\ 'callback': 'NERDTreeAgAck' })

function! NERDTreeAg()
function! NERDTreeAgAck()
" get the current dir from NERDTree
let path = g:NERDTreeDirNode.GetSelected().path
if path.isSymLink
Expand All @@ -43,5 +43,5 @@ function! NERDTreeAg()
" display first result in the last window
wincmd w

exec "Ag -a -S --nocolor -f ".pattern." ".cd
exec "Ack ".pattern." ".cd
endfunction

0 comments on commit 2874499

Please sign in to comment.