3 ms·
Can vim and/or emacs do refactoring? That is a feature that I use daily and couldn’t live without
by kioleanu 4y ago
Can vim and/or emacs do refactoring? That is a feature that I use daily and couldn’t live without
- kstrauser 4y agoYes. Well, Emacs definitely can, and I have no doubt Vim can with the same tooling. For example, Emacs has excellent support for LSP. If a language server exists for your favorite language, and it supports refactoring, then so does Emacs.
- aidos 4y agoYou’ll find that most of what happens behind the scenes in vscode is available in neovim (and probably vim and emacs). The heavy lifting is done by lsps these days. One notable exception is that neovim has treesitter, so you get immediate semantic analysis on your code which allows for much more flexible refactoring. Like everything in vim, you need to spend time setting these things up to streamline your common workflows.
- Keyframe 4y agoOf course, both coc and lsp are your friends there. Want to change variable or function of class name or whatever? No problem. Take this piece of code and wrap it into a function, and where it once stood just place the function call? No problem. Etc.
- renox 4y agoNote that refactoring only exist for some language: for Java it exists in some IDE, for C++ no.
- Liquid_Fire 4y agoCLion absolutely has refactoring for C++ (perhaps not as powerful as for Java, but there is plenty).