Vim 7.4 Installation nerdtree display file directory tree

Source: Internet
Author: User
Tags parent directory






Nerdtree All Versions:



http://www.vim.org/scripts/script.php?script_id=1658









My version of Vim


[[email protected] NERD_tree-4.2]$ vim  --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Dec 21 2016 17:06:34)
Included patches: 1-207, 209-629





The version I should download is Nerdtree.zip 4.2.0



Download 5.0.0 old error


Download http: / / www.vim. Org / scripts / download? Script. PHP? SRC? Id = 17123
[[email protected] ~]$ mkdir NERDTree
[[email protected] ~]$ cd NERDTree
[[email protected] NERD_tree-4.2]$ unzip nerdtree.zip
[[email protected] NERD_tree-4.2]$ cp plugin/NERD_tree.vim ~/.vim/plugin/
[[email protected] ~]$ cd NERD_tree-4.2/
[[email protected] NERD_tree-4.2]$ vim ~/.vimrc
: nerdtree displays the tree





650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/8E/89/wKioL1jEFmXTlXtuAAEsCajUyQs678.png "style=" float : none; "title=" Nredtree-002.png "alt=" Wkiol1jefmxtlxtuaaescajuyqs678.png "/>






Nerdtree shortcut keys:


CTRL + W + W cursor automatically switches between left and right windows
CTRL + W + R move the layout position of the current window
O expand a directory on the left and click again to merge the directories
O recursively open all directories under the selected node
X collapses the parent directory of the selected node
X recursively collapses all directories under the selected node
Go opens a file in an existing window, but the cursor does not jump to the window
T opens the selected file and jumps to a new window
T open the selected file in the original window
P jumps to the parent directory node
P jumps to the root node
Q close the nerdtree window
I open the selected file, split the screen up and down and jump to the window
GI open the selected file, split up and down the screen, do not jump to the window
S open the selected file, split left and right screens and jump to the window
GS open the selected file, split left and right screens, do not jump to this window
! execute current file
e Edit the current dif
Double clicking is equivalent to nerdtree-o
The middle key pair file is equivalent to nerdtree-i and the directory is equivalent to nerdtree-e
D delete current bookmark
P jumps to root
P jumps to the parent node
K jumps to the first node of the same level in the current directory
J jumps to the last node of the same level in the current directory
K jumps to the previous node of the same level in the current directory
J jumps to the next node of the same level in the current directory
C sets the parent directory of the selected directory or file as the root node
U sets the parent directory of the current root node as the root directory, and becomes the original root node
U sets the parent of the current root as the root, but keeps expanding the original root
R recursively refresh the selected directory
R recursively refresh root
M display file system menu
CD sets CWD as the selected directory
I toggle whether hidden files are displayed
F switch whether to use file filter
F switch whether to display files
B toggle whether bookmarks are displayed
Q close the nerdtree window
? toggle whether quick help is displayed
Toggle tabs
: tabnew [+ + opt option] [+ CMD] file creates a new tab for the specified file
: tabcclose the current tab
: Tabo close all other tabs
: tabs view all open tabs
: tabbpprevious tab
: tab n next tab
In standard mode:
GT previous tab
GT next tab
Macvim can also use shortcut keys to close and switch tabs
CMD + W close the current tab
CMD + {previous tab
Tab after CMD +}
Common configuration of nerdtree in. Vimrc
"Start nerdtree by default when VIM starts (autocmd can be abbreviated to AU)
autocmd VimEnter * NERDTree
"Press F2 to call up / hide nerdtree
map :silent! NERDTreeToggle
"Set nerdtree's window to the right of the VIM window (default is left)
let NERDTreeWinPos="right"
"When you open the nerdtree window, bookmarks are automatically displayed
let NERDTreeShowBookmarks=1





Set up <F5> close open Nerdtree


[[email protected] ~]$ vim ~/.vimrc
"Set < F5 > close open nerdtree
map <F5> :NERDTreeMirror<CR>
map <F5> :NERDTreeToggle<CR> 








This article is from the "Soul Bucket" blog, please be sure to keep this source http://990487026.blog.51cto.com/10133282/1905503



Vim 7.4 Installation nerdtree display file directory tree


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.