From 0706f732bfb747571dbb777191e3a246a32c3d14 Mon Sep 17 00:00:00 2001 From: Jacob Zimmerman Date: Wed, 25 Feb 2015 03:46:54 -0500 Subject: [PATCH] Plugins vim-easytags and tagbar There's a tad bit of external setup required here: - Using your package manager, install the program `ctags`. ------------------------------------------------------------------------ There are a number of plugins being installed here. - vim-misc is a dependency of vim-easytags - vim-easytags is a plugin that generates tags files, which is a compiled index of all the functions, variables, and identifies that you use in your project. - tagbar is a plugin that reads the output from ctags and displays the information in an accessible way inside Vim. Most of everything is configured out of the box, and you can press ? inside the tagbar buffer to learn how to use it (after opening it with \b). For more information, - http://majutsushi.github.io/tagbar/ - https://github.com/xolox/vim-easytags - https://github.com/xolox/vim-misc These give you the power to see what kinds of methods, variables, functions, and other types of declarations you have in your files. If in the future you're wondering why `tags` files start showing up in random places, this step is your answer. --- vimrc.vim | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/vimrc.vim b/vimrc.vim index 865c4fc..5e211a6 100644 --- a/vimrc.vim +++ b/vimrc.vim @@ -18,6 +18,9 @@ Plugin 'vim-airline/vim-airline-themes' Plugin 'scrooloose/nerdtree' Plugin 'jistr/vim-nerdtree-tabs' Plugin 'vim-syntastic/syntastic' +Plugin 'xolox/vim-misc' +Plugin 'xolox/vim-easytags' +Plugin 'majutsushi/tagbar' call vundle#end() @@ -88,3 +91,19 @@ augroup mySyntastic augroup END +" ----- xolox/vim-easytags settings ----- +" Where to look for tags files +set tags=./tags;,~/.vimtags +" Sensible defaults +let g:easytags_events = ['BufReadPost', 'BufWritePost'] +let g:easytags_async = 1 +let g:easytags_dynamic_files = 2 +let g:easytags_resolve_links = 1 +let g:easytags_suppress_ctags_warning = 1 + +" ----- majutsushi/tagbar settings ----- +" Open/close tagbar with \b +nmap b :TagbarToggle +" Uncomment to open tagbar automatically whenever possible +"autocmd BufEnter * nested :call tagbar#autoopen(0) +