Vim plugin: tagbar[-outline navigation]__vim

Source: Internet
Author: User

Tagbar, you can generate an outline of the file you are editing, including classes/methods/variables, you can select the quick jump to the target location, editing large files is particularly useful. 1. Installation

First of all, vim must be more than 7.0

Installation dependent exuberant Ctags

# ubuntu
sudo apt-get install ctags

# CentOS
sudo yum install ctags

# mac
Brew Install Ctags

Install Tagbar in vim:

Bundle ' Majutsushi/tagbar '
2. Use

In K-vim configure shortcut key for F9, edit file Press F9, enter, move up and down (JK), select return will jump.
If you have Easymotion installed, you can also use its quick jump.

3. Final configuration

 "Tagbar Bundle ' Majutsushi/tagbar ' nmap <F9>:tagbartoggle<cr>" Tagbar default to go to this directory to find ctags,ctags default installation path is also this directory "let g:tagbar_ctags_bin= '/usr/bin/ctags '" Proper ctags-let G:        Tagbar_width=26 "Default is, seems too wide noremap <Leader>y:TagbarToggle<CR> "Display panel with (, y)" starts with the autofocus G:tagbar_autofocus = 1 "For Ruby, delete if don't need let g:tagbar_ Type_ruby = {\ ' kinds ': [\ ' M:modules ', \ ' c:classes ', \ ' D:describes ', \ ' C:contex TS ', \ ' f:methods ', \ ' F:singleton methods ' \] \} 

The

can be further precisely configured for a specific language, which is configured Ruby, and can be replaced with a language that you use frequently, but unfortunately no Python configuration is found. The specific language configuration method is shown in the "Recommendations" section of the document address below. 4. Recommended To configure only one shortcut key, you can customize the specific language Tagbar display content as needed. The document address suggested that the discarded taglist (years of disrepair), Ctrlp+tagbar actual use effect better. If you want to use Tagbar when writing Golang, you need to install Gotags support is important: You can view Tagbar's documentation through Help:tagbar. 5. References: http://www.wklken.me/posts/2015/06/07/vim-plugin-tagbar.html

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.