Refactoring C/C++ in Vim (e.g. method extraction like in Eclipse)

前端 未结 3 1933
一整个雨季
一整个雨季 2021-02-01 03:50

Are there any plugins or built-in methods in Vim for performing refactoring on C or C++ code, something like the refactoring tools in Eclipse?

I\'m especially keen on th

3条回答
  •  长情又很酷
    2021-02-01 04:03

    I've written a generic refactoring plugin. C++ is one of the primary languages handled (as it's my primary language at work). Method extraction is supported.

    For C++, the plugin is able (thanks to ctags) to deduce most (but unfortunately not always all -- thanks to ctags...) of the variables coming in and out of the extracted function. I still have to write a little dialog box to select how the in/out variables shall be exchanged (const ref, rvalue ref, copy, pointer, tuples, struct, and so on) (BTW, help is welcome as GUIs are not my thing ^^').

提交回复
热议问题