Skip to content

Commit

Permalink
Plugins vim-easytags and tagbar
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jez committed Nov 12, 2016
1 parent 0f2a776 commit 0706f73
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions vimrc.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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 <silent> <leader>b :TagbarToggle<CR>
" Uncomment to open tagbar automatically whenever possible
"autocmd BufEnter * nested :call tagbar#autoopen(0)

1 comment on commit 0706f73

@jez
Copy link
Owner Author

@jez jez commented on 0706f73 Nov 13, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.