Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b2a4db6
commit 65a2e1b
Showing
3 changed files
with
71 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# How to use CoffeeTags with [TagBar ](https://github.com/majutsushi/tagbar) | ||
|
||
## Config types | ||
|
||
CoffeeTags can work in 2 modes: | ||
|
||
- tags only for functions (default) | ||
- tags for functions and objects containing them | ||
|
||
Second mode is activated by adding --include-vars to command line arguments | ||
|
||
# CoffeeTags + TagBar + Vim | ||
|
||
## Config in vimrc | ||
|
||
You can add the config to your .vimrc (making sure that the old one is removed) | ||
by: | ||
|
||
coffeetags --vim-conf >> ~/.vimrc | ||
|
||
or (for 2nd mode) | ||
|
||
coffeetags --include-vars --vim-conf >> ~/.vimrc | ||
|
||
|
||
## Config as a filetype plugin | ||
|
||
You can generate a special filetype plugin and tagbar will use that | ||
automatically. | ||
|
||
This option is preferable if you want to keep your vimrc short. | ||
|
||
coffeetags --vim-conf > ~/vim/ftplugin/coffee/tagbar-coffee.vim | ||
coffeetags [--include-vars] --vim-conf > ~/vim/ftplugin/coffee/tagbar-coffee.vim | ||
|
||
or if you're using pathogen | ||
|
||
coffeetags [--include-vars] --vim-conf > ~/vim/bundle/coffeetags/ftplugin/coffee/tagbar-coffee.vim | ||
coffeetags --vim-conf > ~/vim/bundle/coffeetags/ftplugin/coffee/tagbar-coffee.vim | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
if executable('coffeetags') | ||
let g:tagbar_type_coffee = { | ||
\ 'ctagsbin' : 'coffeetags', | ||
\ 'ctagsargs' : '<%= include_vars_opt %>', | ||
\ 'kinds' : [ | ||
\ 'f:functions', | ||
\ 'o:object', | ||
\ ], | ||
\ 'sro' : ".", | ||
\ 'kind2scope' : { | ||
\ 'f' : 'object', | ||
\ 'o' : 'object', | ||
\ } | ||
\ } | ||
endif |