Everyone crossing, welcome to listen to the large-scale couplet science fiction: Vim. Last time we introduced the TagList in vim.
Plug - ins.. This time, let's continue to talk about Vim's plugin, but we're talking about another plugin: Nerdtree. Well, that's the same thing.
Gossip Hugh, words return to the positive. Let's talk about vim together!
Crossing, the so-called Nerdtree is to display a directory and files or subdirectories in a directory in a tree-like form. IT and Taglis
, is a plugin. Let's start by talking about how to install Nerdtree.
Download the plugin to http://www.vim.org/scripts/script.php?script_id=1658 this URL. The size is more than 40 KB, so it can be downloaded locally soon.
Unzip the downloaded compressed package. Then copy the Nerd_tree.vim, Fs_menu.vim, and Exec_menuitem.vim in the plugin and Nerdtree_plugin directories to the VIM plugin directory, path:/usr/share/vim/ vim74/plugin/.
Then copy the Nerdtree.vim in the syntax directory to the syntax directory of VIM. This completes the installation of the plug-in. Because Nerdtree is a plugin, it is only necessary to copy the relevant files into the corresponding directory of VIM. This and ctags and other plug-in installation method is different, but with the last time we said TagList installation method.
3. Using plugins:
Use Vim to open a source code file. In command mode, enter: Nerdtree. When you press ENTER, you will be at the left of vim.
Side to create a new window. The window displays subdirectories and files in the current directory. Here is the specific one.
Crossing can see the entire Vim window is divided into two parts, the right is the source code file, on the left is the directory information of the file. You can use K,j to move up and down the cursor in the Catalog window. The cursor in the current diagram is moved to a file named Calibrate.c. You can then press the O key and the file will open in the right window. In the diagram, open a Linux source code in a file, crossing can see Linux source code is more, use this plug-in can easily browse the Linux source under the various directories and files, and it put the directory in the form of a directory tree, appear more image.
Crossing can configure nerdtree according to their own habits. The configuration method is written in the Help file in detail and is not covered here. When configured
Modify the VIM configuration file according to the method in the Help file. This is the same as the TagList configuration method.
You crossing, about the Vim plugin: Nerdtree, today, so far. In the back of the chapter, we will also say that other vim
Plug - ins. Do you want to know what plugins are in the future? and listen to tell.
Talk vim together (20th: Nerdtree of Vim plugin)