The Nerdtree installation method circulated online is not very practical, because nerdtree is dependent on the pathogen plugin manager. If you do not install pathogen, the direct installation nerdtree is a statement of the function of the error pathogen
Let's first introduce the plugin--pathogen for managing Plug-ins. Download Address
Project Address Https://github.com/tpope/vim-pathogen
Official website http://www.vim.org/scripts/script.php?script_id=2332 function Description
A plug-in package often has a variety of functions, each file according to the path of vim will be placed in a different directory, the common plug-ins put into the plugin, syntax highlighting plug-ins placed under the syntax, automatic loading plug-ins placed under the AutoLoad, file type Plug-ins placed under Ftplugin, The coded format plugin is placed under indent ... If you are a heavy plugin user, you will find in the. Vim home Directory There will be a bunch of folders, whether you want to install new plug-ins, or want to remove old plug-ins, are very troublesome, you have to find the relevant vim files in each folder.
Pathogen is a plug-in to manage plug-ins, mainly to solve the above problems. Pathogen uses the concept of bundle to manage plug-ins, and if you are familiar with OSGi or OS X, then you are not unfamiliar with bundle. OSGi encapsulates Java programs and resource files in bundle, and most applications in OS X are bundle, and it is the bundle concept that allows OSGi to dynamically manage Java components, and most of the OS X installations are "green installations."
Pathogen creates a bundle file under the. Vim directory, and all Plug-ins are managed under that directory. When Vim starts, it automatically executes the Vim script under the folder contained in the Runtimepath (RTP) list, and pathogen loads the plugins in the folder under/vim/bundle in a certain order to RTP, so that when Vim starts, The plug-ins that are managed through pathogen are effective.
After the pathogen, the general. Vim folder has only three folders: AutoLoad, Bundle, and Doc, and other plug-ins will be installed under the bundle folder
Create AutoLoad and bundle directories under the. Vim folder
Get the Pathogen.vim file from the download address and copy it to the AutoLoad directory
Add the following code in the. vimrc file:
Call Pathogen#infect ()
In fact, it is good to Pathogen.vim CP to ~/.vim/autoload. Attention Matters
After the new plug-in is installed in the bundle directory, if the plugin contains doc, you need to run it in vim: helptags to generate online help tags. nerdtree Directory Browsing plugin Download Address
Official website http://www.vim.org/scripts/script.php?script_id=1658
Project Https://github.com/scrooloose/nerdtree Function Description
Vim is one of the most commonly used plug-ins, can be displayed in the Vim runtime directory and file structure, similar to the textmate to the left of the file browser, but more convenient to operate, you can in hand without leaving the keyboard in the case of fast browsing files, and between files and folders to switch. installation
Method 1, this is the installation method given on Git
# #Installation
# #pathogen. Vim is the recommended way to install Nerdtree.
CD ~/.vim/bundle
git clone https://github.com/scrooloose/nerdtree.git
# #Then Reload vim, Run:helptags, and Check Out:help # #NERD_tree. txt.
After the download is complete, a Nerdtree folder will be created under bundle and all relevant plug-ins are in the folder
Running in vim: helptags to generate Nerdtree's online Help tags
4, the use of instructions
Open Vim, enter: Nerdtree, you can exhale the implementation of the VIM command in the current directory file directory. For ease of use, I have defined shortcuts in. VIMRC, you can use Ctrl+t to open nerdtree, you can define your own custom shortcut keys.
Nerdtree provides a wealth of keyboard operations to browse and open files, and I'll briefly introduce some of the most commonly used shortcut keys:
As with edit file, move cursor positioning via H J k L
o Open closed file or directory, if file, cursor appears in open file
The go effect is the same, but the cursor remains in the file directory, similar to the Preview file content function
I and S can split the window horizontally or vertically to open the file, the front plus g like go function
T opens in the tab page
T opens in the Background tab page
p to Upper Directory
P to root directory
K to the first node in the same directory
J to the last node in the same directory
m displays the File system menu (add, delete, move operation)
? Help
Q Turn off configuration instructions
Loaded_nerd_tree does not use Nerdtree script
Nerdchristmastree lets tree decorate itself with colorful bright spots
Nerdtreeautocenter control when the cursor moves over a certain distance, Whether to automatically adjust the focus to the screen center
Nerdtreeautocenterthreshold with Nerdtreeautocenter
Nerdtreecasesensitivesort is case sensitive when sorting
Nerdtreechdirmode determine whether to change Vim's CWD
Nerdtreehighlightcursorline whether to highlight the line where the cursor is located
nerdtreehijacknetrw whether to use: The edit command opens the second nerdtree
Nerdtreeignore the default ignore file
Nerdtreebookmarksfile Specifies the bookmark file
Nerdtreemousemode Specifies mouse mode (1. Double-click to open; 2. single directory dual files; 3. Click to open)
Nerdtreequitonopen closes nerdtree window after opening file
Nerdtreeshowbookmarks whether the list of bookmarks is displayed by default
Nerdtreeshowfiles whether the default display file
Nerdtreeshowhidden whether to show hidden files by default
Nerdtreeshowlinenumbers whether the default display line number
Nerdtreesortorder Collation
Nerdtreestatusline window status bar
Nerdtreewinpos window position (' left ' or ' right ')
nerdtreewinsize window width /p>