preservim / tagbar

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

[wish-list] refactor code from sidebar #790

Closed goffi-contrib closed 2 years ago

goffi-contrib commented 2 years ago

Hello,

thank you for this really useful plugin.

I'm not sure if it's possible, but it would be great to be able to refactor code from TagBar's sidebar. Indeed there the code (or document, I see that it's working well with reStructuredText too) is already split in methods (or sections), it would be awesome to be able to select a method in visual mode and move it up or down, while this is reproduced in the actual code buffer.

Regards

alerque commented 2 years ago

I understand what this request is about, but realistically that isn't a good fit for this plugin and never will be. It relies on a specific subset of data parsed out for it by 3rd party tools, and none of those tools are even close to providing the kind of data that would be necessary.

There are some systems out there that will do this: some of the LSP implementations include a complete enough understanding the language in question to allow hooks for refactoring. If this is really the kind of thing you want, you need to look in that direction.

goffi-contrib commented 2 years ago

sure makes sense. Thanks for the feedback and this nice plugin.