vimlinux-mintnerdtreepathogen

How to install nerdtree plugin on linuxmint for vim74


I am relatively new to the linux world and have started recently exploring the options it provides and I am fascinated by the power of vim editor.I have recently installed vim74 (the latest version of vim editor for linux)on my mintlinux machine. And tried tutorials that ship along with it and i am pretty comfortable with them.

Now, I want to add a new plugin called NERDTree for vim. I have gone through a lot of examples on google to search for a proper tutorial on the same but I see that they point to a relatively different file structure (Probably those tutorials were made for a different version of vim, if I understand it correctly) and that confuses me.

As I understand there is a plug-in manager called pathogen for vim which has to be placed in autoload directory under vim. But I don’t see any such directory called "autoload".


Solution

  • You don't need a plugin manager; it just makes management and updates easier [when you have several plugins]. The simplest (and still perfectly valid) way is to just unzip the plugin(s) into a ~/.vim directory.

    1. Go to the plugin's GitHub page, and click "Download ZIP".
    2. Unzip to ~/.vim:
    $ mkdir ~/.vim
    $ unzip path/to/nerdtree-master.zip -d /tmp
    $ mv /tmp/nerdtree-master/* ~/.vim/
    $ rmdir /tmp/nerdtree-master
    

    Ensure that the directory structure (autoload, plugin etc.) is directly inside ~/.vim!

    Plugin managers

    A plugin manager will allow you to keep the plugins in separate directories. Pathogen is one of the simplest and earliest. You can use git to directly clone and update from GitHub; Pathogen extends Vim's 'runtimepath' so that these additional directories (called bundles) are considered.

    Other plugin managers include capabilities for automatically locating and downloading plugins (from sources like GitHub, vim.org, etc.) They are more comfortable (especially if you don't know Git well), but also add complexity.