I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
Refactoring for me is generally done inside a single module. The stuff and IDE gives me... if I change the method names that are used externally I have a couple of helper mappings to sort that out for me: I hit // to find uses of the currently-being-edited function in all files and the reciprocal gD to go to its definition. I can then just do a simple search and replace.
That sounds quite tedious. A good name is on average achieved on the 9th try.
I want to rapidly rename methods, classes, variables, etc. so that I and my pair can work through at least half of these 9 tries very quickly.
I guess, instead of thinking about the name for a while, I love to just change it on impulse and then analyze how well it reads in the location where I was renaming it.
Without the need to do additional actions except for typing a new name, I can really iterate quickly through different names as I discuss them with my pair.
Now, what about other refactorings? Like: move method from one object to another, extract variable/method, inline variable/method, extract delegate object, extract parameter object, pull up/pull down methods along the hierarchy chain, etc.?
Hello! My name is Thomas and I'm a nerd. I like tech and gadgets and speculative fiction, and playing around with programming. It's not my day job, but I'm working on making it a side gig :)
Refactoring for me is generally done inside a single module. The stuff and IDE gives me... if I change the method names that are used externally I have a couple of helper mappings to sort that out for me: I hit
//
to find uses of the currently-being-edited function in all files and the reciprocalgD
to go to its definition. I can then just do a simple search and replace.That sounds quite tedious. A good name is on average achieved on the 9th try.
I want to rapidly rename methods, classes, variables, etc. so that I and my pair can work through at least half of these 9 tries very quickly.
I guess, instead of thinking about the name for a while, I love to just change it on impulse and then analyze how well it reads in the location where I was renaming it.
Without the need to do additional actions except for typing a new name, I can really iterate quickly through different names as I discuss them with my pair.
Now, what about other refactorings? Like: move method from one object to another, extract variable/method, inline variable/method, extract delegate object, extract parameter object, pull up/pull down methods along the hierarchy chain, etc.?
Vim can do all of that either out of the box, through plugins, or through custom functions.
The closest thing that I could find is this: github.com/apalmer1377/factorus
It’s bearable but it doesn’t have all of what I need. Are there any other plugins that enable this?
Also, it’s not supported for a lot of languages: JS/TS, Kotlin, Swift, Ruby are missing
There also seem to be this plugin: github.com/Valloric/YouCompleteMe — it looks pretty cool, unfortunately supports only rename refactoring…