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