preservim / tagbar

Vim plugin that displays tags in a window, ordered by scope
https://preservim.github.io/tagbar
Other
6.14k stars 489 forks source link

Make Tagbar work for new buffers (no file name) #877

Open terminatorul opened 6 months ago

terminatorul commented 6 months ago

It helps to use Tagbar even without a file in the file system, for example I use to load a large diff in Vim from stdin, with a command like:

git diff -w | gvim -

But if there is no file in Vim, then Tagbar no longer works.

Can this be fixed please ? I know tagbar already writes the source file to a temporary location for passing it to ctags. This should help tagbar work with in-memory buffers as well

raven42 commented 6 months ago

We would welcome a pull-request for this if you have the time to implement it. I currently don't have the cycles for something like this though.