New ask Hacker News story: Ask HN: How do you usually handle refactoring in VS Code?

Ask HN: How do you usually handle refactoring in VS Code?
3 by lamarcke | 2 comments on Hacker News.
I come from a Jetbrains background. I'm trying to migrate to VS Code, and i've come to appreciate it's modularity and the overall quality of the extensions. One thing that's been bothering, though, is that i see very few refactoring options, and they don't work reliably. For example, i was working with a Typescript project (which is basically the main language of the VS Code ecosystem), and when i tried to move a type definition to another file, i discovered you only have the option to move it to a new file, in the current folder, with the name of symbol. This would mean I'd need to either create a separate file for this type (plus some other symbols if i want to) or handle the import and export changing myself. I won't talk about the error i get if i don't select the symbols' export statement, because this is not discussed anywhere and may be something that only happens to me. I tried doing this said refactor in Webstorm, and it was just a matter of hitting F6 and choosing the target file. I also tried searching for refactoring extensions for Typescript, to no avail. This is really bothering me, changing import statements manually everytime i want to move a symbol sounds like a very tedious task. So, I'm wondering, since a LOT of devs use VS Code, is this just how it is? Do you just get used to manually refactoring? I'm also using the Python extension, and it doesn't even give me any move refactoring options.

Comments