Advertisement
Other

Vim Essential Plugin: NERDTree

by

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 ~/Desktop
git clone https://github.com/scrooloose/nerdtree.git
cd nerdtree
rake

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.

Related Posts
  • Computer Skills
    App Training
    Alfred Workflows for IntermediatesAlfred400
    Welcome back! Since you are reading this, you must have enjoyed the beginner's tutorial. Great! Now, let’s dig a little deeper by making a workflow that will help manage our Downloads folder, as well as a Projects Manager.Read More…
  • Computer Skills
    Productivity
    Why a Finder Replacement is Still a Good IdeaFinder2x
    Until OS X Mavericks, a replacement Finder application was a must for most power users. Basic features like tabs were missing from OS X’s default application, so to get an improved Finder experience you had to turn to third parties. With Mavericks, however, Apple has finally brought tabs to Finder. In this tutorial I’ll show you what replacement Finder applications are out there, what they can still add to your workflow and why they're still worth getting.Read More…
  • Computer Skills
    Productivity
    Improve Productivity With Virtual Desktops From TotalSpaces2Totalspaces400
    TotalSpaces2 from BinaryAge is the, self-described, "ultimate grid spaces manager". It is built on top of OS X's Mission Control and provides a great deal of control over your Mac's work environment. In an earlier tutorial, I taught you about Speeding Up Your Life With Launchbar. In this tutorial I'll show you how to use a grid of spaces to efficiently swap between applications to improve your productivity.Read More…
  • Computer Skills
    App Training
    Firefox for BeginnersFirefoxicon400
    Whether you are a new Mac user or simply wish to try a web browser other than Safari, Firefox will serve you well and is an excellent option for those wanting more flexibility and control. In this tutorial, I will show you how to configure Firefox, browse, bookmark and synchronise your favourite websites, manage your history and install a number of features that will enhance your browsing experience.Read More…
  • Computer Skills
    App Training
    Alfred Workflows for BeginnersAlfred400
    Ever since Alfred 2.0 was in beta, I have been making Alfred workflows for myself and for others. It is a lot of fun and very helpful to my daily workflow. I usually average using Alfred around 130 times a day, with my peak day of 768 times. I am going to show you the basic concepts of workflow design in this tutorial, all the way to the very advanced features that you can use in your own workflows in later tutorials. So, come join the fun!Read More…
  • Computer Skills
    App Training
    Google Chrome for BeginnersChrome400
    In this tutorial I’ll show you how to download and start to use Chrome on your Mac. Chrome is Google’s application for browsing the web and the tutorial is aimed at the beginner or user who has hasn’t used this browser in the past.Read More…