Adding ctags integration to UltiSnips
What do you think of adding a ctags configuration to UltiSnips? This might not
be terribly useful for the creation of actual tag files, but it's kinda cool
when you integrate it with the Tagbar plugin.
Here's a screenshot of what I am talking about:
oi61.tinypic.
CtrlPTag output. This is available after actually creating a tags file, you see
that I can fuzzy search all available snippets in the snippets directory.
The split buffer on the right shows the Tagbar plugin. No tag file has to be
created for it, the plugin handles the tag creation in realtime and returns a
nicely sorted list of available snippets in the file I am currently watching.
The actual implementation of it is terribly simple.
I added the following lines to my ~/.ctags file:
--langdef=snippets
--langmap=
--regex-
And in my vimrc I defined a tagbar related variable:
let g:tagbar_
\ 'ctagstype' : 'snippets',
\ 'kinds' : [
\ 's:snippets',
\ ]
\ }
So, we could for sure add this information to the Tagbar wiki at
https:/
We could also add a section in
UltiSnips docs to publish the possibility of doing this.
A further help could be to provide a variable like
g:UltiSnipsTagb
define g:tagbar_
One would need to handle the addition to the .ctags file manually of course.
I also thought it would be kinda cool to detect and list global snippets as well, but
that's not really easy to do, as global snippets don't really have an
identifier with them (something like a description). On the tags side this
would need exactly to more lines of code to handle.
Possible outcome: Tagbar users can find out about UltiSnips and start using it too :D
Nothing groundbreaking, but probably a nice addition.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- UltiSnips Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- SirVer
- Solved:
- Last query:
- Last reply: