Vim plugin: nerdtree[Tree directory]__vim

Source: Internet
Author: User
Vim plugin: nerdtree[Tree Catalog]

The Nerdtree Tree directory plug-in can browse through all file system files under Vim and can open files. You can also filter some files by configuring Nerdtree to not be browsed by a tree structure.

Github:the NERD tree. installation

Bundle ' Scrooloose/nerdtree '
Use

When you open a file, open the directory Retrieval tree with a custom shortcut key to facilitate viewing of the file.

Example:

Final Configuration

Bundle ' Scrooloose/nerdtree ' "Join Nerdtree" close Nerdtree Shortcut "map <leader>t:NERDTreeToggle<CR> map <C-n> :nerdtreetoggle<cr> "Show line number let Nerdtreeshowlinenumbers=1 let Nerdtreeautocenter=1" show hidden files let Nerdtreeshowhidde N=1 "Set width let nerdtreewinsize=30" in the terminal to start vim, sharing nerdtree let g:nerdtree_tabs_open_on_console_startup=1 "ignore the file display let NER dtreeignore=[' \.pyc ', ' \~$ ', ' \.SWP '] "Show bookmark list Let Nerdtreeshowbookmarks=1" Vim does not specify specific file open Yes, automatically use Nerdtree "Autocmd" Stdinreadpre * Let s:std_in=1 "autocmd vimenter * if argc () = = 0 &&!exists (" s:std_in ") | Nerdtree | endif "When Vim opens a directory, Nerdtree automatically uses" autocmd Stdinreadpre * Let s:std_in=1 "autocmd vimenter * if argc () = = 1 && i Sdirectory (argv () [0]) &&!exists ("s:std_in") | EXE ' Nerdtree ' argv () [0] | Wincmd p | Ene | endif "When there are no other files in vim, the value is left Nerdtree automatically closes the window autocmd bufenter * if (WINNR (" $ ") = = 1 && exists (" B:nerdtree ") &&am P B:nerdtree.istabtree ()) | Q | endif "Change the nerdtree arrow let G:NERDTReedirarrowexpandable = ' ▸ ' let g:nerdtreedirarrowcollapsible = ' ▾ '

 
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.