Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
April 22, 2011 01:39 am GMT

Vim Essential Plugin: NERDTree


In this episode of Vim Essential Plugins, we’ll review the fantastic NERDTree plugin, which is a much improved replacement for the traditional file explorer.

Subscribe to our YouTube and Blip.tv channels to watch more screencasts.

Usage

Begin by downloading the plugin to your Desktop (or any directory, really), and installing it.

cd ~/Desktopgit clone https://github.com/scrooloose/nerdtree.gitcd nerdtreerake

With those few lines of code, the plugin is now installed! To open a NERDTree panel, in normal mode, we call :NERDTree.

NerdTree

At this point, we can open any file by typing o, or with the more convenient alias, the Enter key. Unlike the default file browser, this will open the new file directly into the buffer to the right of NERDTree, similar to what you might be used to in a program, like TextMate.

If you ever forget what the correct key is for a particular action, press ? to display a quickie help buffer.

Bookmarks

To expedite the process of navigating through your directory structures, NERDTree allows you to conveniently create bookmarks. Do so by moving the cursor to the directory that you wish to bookmark, and then typing:

:bookmark <desired bookmark name>

With this in place, you can now bring up your list of available bookmarks by pressing B. It’s a huge help!

Bookmark Section

Menu

Press the letter m to bring up a menu that will allow you to quickly add, move, copy, and delete nodes (or files). So, for example, if I want to create a new html file within a particular directory, I can type ma newfile.html.

The menu bar

There are plenty more useful shortcuts available, but I’ll leave it to you to discover them. Hint – research the cd and C commands; I use them religiously. Additionally, refer to the screencast above for more shortcuts.


Original Link: http://feedproxy.google.com/~r/nettuts/~3/-nKqzpBf2Js/

Share this article:    Share on Facebook
View Full Article

TutsPlus - Code

Tuts+ is a site aimed at web developers and designers offering tutorials and articles on technologies, skills and techniques to improve how you design and build websites.

More About this Source Visit TutsPlus - Code