Talk Vim together (20th back: Vim plug-in NerdTree), vimnerdtree

Source: Internet
Author: User

Talk Vim together (20th back: Vim plug-in NerdTree), vimnerdtree


Hello, everyone. You are welcome to join in to hear the story of Zhang huiti: Vim. The last time we introduced taglist in Vim

Plug-in .. In this case, we will continue to talk about the Vim plug-in, but we are talking about another plug-in: NerdTree. Okay, let's say that,

When you leave the rest of your time, your words will go right. Let's talk Vim together!


The so-called NerdTree shows a directory and files or subdirectories in the directory in a tree. It and taglis

Is a plug-in. Next, let's talk about how to install NerdTree.


  • 1. Download the plug-in:

To http://www.vim.org/scripts/script.php? Script_id = 1658 download this plug-in from the URL. The size is more than 40 KB, so you can download it to your local computer soon.


  • 2. Install the plug-in:

Decompress the downloaded package. Copy NERD_tree.vim, fs_menu.vim, and exec_menuitem.vim under the plugin and nerdtree_plugin directories to the vim plugin directory. Path:/usr/share/vim/vim74/plugin /.

Copy nerdtree. vim In the syntax directory to the syntax directory of vim. This completes the installation of the plug-in. Because NerdTree is a plug-in, you only need to copy the relevant files to the Vim directory. This is different from the installation method of ctags and Other plug-ins, but it is the same as the taglist installation method we mentioned in the previous article.


3. Use the plug-in:

Use Vim to open a source code file. In command mode, enter NERDTree. Press enter, and then it will be at the far left of Vim.

Side to create a new window. The sub-directories and files in the current directory are displayed in the window. The following is a specific example.


The viewer can see that the entire Vim window is divided into two parts: the source code file on the right, and the directory information of the file on the left. In the Directory window, you can move k and j up and down to the cursor. The cursor in the current figure is moved to a file named calibrate. c. Press the o key to open the file in the window on the right. In the figure, a file in the Linux source code is opened. You can see that there are many Linux source codes. You can use this plug-in to conveniently browse various directories and files in the Linux source code, in addition, it displays the directory in the form of a directory tree and looks more vivid.


You can configure the NerdTree according to your habits. The configuration method is detailed in the Help file, which is not described here. During configuration

Modify the vim configuration file according to the methods in the Help file. This is the same as the Taglist configuration method.


For more information, see the Vim plug-in NerdTree. In the subsequent chapter, we will also talk about other Vim

Plug-ins. What plug-ins will be available in the future? In addition, the next loop is decomposed.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.