News for hackers. Stuff that matters.
Re:Vim After 15 Years by kioleanu on Wednesday October 26, 2022 @07:29PM (#33351029)
Can vim and/or emacs do refactoring? That is a feature that I use daily and couldn’t live without
Re:Vim After 15 Years by kstrauser on Wednesday October 26, 2022 @07:32PM (#33351047)
Yes. 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.
Re:Vim After 15 Years by aidos on Wednesday October 26, 2022 @08:01PM (#33351302)
You’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.

Re:Vim After 15 Years by Keyframe on Wednesday October 26, 2022 @10:23PM (#33352280)
Of 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.
Re:Vim After 15 Years by renox on Thursday October 27, 2022 @03:26AM (#33354345)
Note that refactoring only exist for some language: for Java it exists in some IDE, for C++ no.
Re:Vim After 15 Years by Liquid_Fire on Thursday October 27, 2022 @05:26AM (#33355207)
CLion absolutely has refactoring for C++ (perhaps not as powerful as for Java, but there is plenty).