Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Yes, 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.


Vim and text motions should do the trick.


Sure, 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


Totally 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.)


Sidebar, but what does "“immune” to normal refactoring" mean?


I 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.


That’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 ;)




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: