Refactoring in Vim

前端 未结 15 1943
醉梦人生
醉梦人生 2021-01-29 17:44

Of course the fact that you can refactor on IDEs is priceless for many, I hardly ever do it when I am coding but I may try to do it when editing some one else\'s source. How do

15条回答
  •  伪装坚强ぢ
    2021-01-29 18:16

    C-Family

    1. Try the plugin Clighter for rename-refactoring for the c-family. It is based on clang, but there are limitations and the plugin is marked as deprecated.

      Suggested mapping by Clighter is

       nmap  r :call clighter#Rename()
      

      Note, the successor plugin clighter8 has removed the renaming functionality in the commit 24927db42.

    2. If you use neovim, you can take a look at the plugin clamp. It suggests

       nmap  r :call ClampRename()
      

提交回复
热议问题