6 ms·
Especially when renaming variables that are “immune” to normal refactoring. Copilot handles that pretty well and I don’t have to spend all that focus on such a
by heyoni 2y ago
Especially when renaming variables that are “immune” to normal refactoring. Copilot handles that pretty well and I don’t have to spend all that focus on such a menial task.
- eru 2y agoYes, I often find that copilot is pretty good at picking up on the pattern of refactorings that I am doing. Especially those that are a bit tedious and almost mechanical, but not quite mechanical enough to do with a simple search-and-replace.
- skydhash 2y agoVim and text motions should do the trick.
- dartos 2y agoSure, but doing the refactor the first time, without thinking about how to record a vim macro, then just hitting tab to have copilot do the same change over and over is a lower friction experience
- eru 2y agoTotally depends on what kind of refactoring you want to do; and how well vim's commands map to your language's syntax, too. (Or whether your vim has special support for your language's syntax.)
- Semaphor 2y agoSidebar, but what does "“immune” to normal refactoring" mean?
- tomduncalf 2y agoI would guess they mean stuff which isn’t just “rename symbol” or whatever, like changing code from one pattern to another slightly different one. For example, I’ve used LLMs to “change this if statement to a switch”, which I don’t think VS Code can do as an automatic refactor using the native tools.
- Semaphor 2y agoThat’s not variables, though. But maybe it’s something similar, like some variables being used in strings? > which I don’t think VS Code can do as an automatic refactor using the native tools. Yet another point for using an IDE over a texteditor with some bolted on IDE features, because the Jetbrains tools even suggest such refactorings ;)