sponsor Vim development Vim logo Vim Book Ad

NERD_Tree & ack : Adding search capability to NERD_Tree with ack

 script karma  Rating 45/16, Downloaded by 941  Comments, bugs, improvements  Vim wiki

created by
Tudor Barbu
script type
Open NERD_Tree to your project folder, by typing :NERDtree /path/to/project or by using bookmarks. Place the cursor on a folder and type the letter m. In the menu that will pop up you will have the option "(s)earch directory". Select it by pressing s and type your pattern. If your search will yield results, you will see a window in the lower part of your screen, with all the results. Navigate with the keys and press <CR> to jump to a result. The file will be opened in the last working window.
install details
Install NERD_Tree first. Then download this module to ~/.vim/plugin/ or the appropriate location on your system and...you're done.

Install ack (see details at http://betterthangrep.com/ ). Depending on your operating system, you need to type something like "sudo apt-get install ack-grep", "brew install ack" or other. Most of the installers will add ack to your $PATH, so NERD_Tree_Ack.vim won't require additional configuration. If you're weird and don't want to add ack to your $PATH, just add the following line to your .vimrc file:

let g:path_to_search_app = "/full/path/to/ack"

It should work.

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
NERD_tree_ACK.vim 1.0 2010-12-10 7.0 Tudor Barbu Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
OSDN.net Logo