←back to thread

2127 points bakugo | 6 comments | | HN request time: 0s | source | bottom
1. galaxyLogic ◴[] No.43165884[source]
The thing I would like automated is highlighting a function in my code then ask the AI to move it to a new module-file and import that new module.

I would like this to happen easily like hitting a menu or button without having to write an elaborate "prompt" every time.

Is this possible?

replies(1): >>43166081 #
2. Aeolun ◴[] No.43166081[source]
I think most language servers have a feature like this right?
replies(1): >>43166326 #
3. hassleblad23 ◴[] No.43166326[source]
Moving a function or class? Yes. But moving arbitrary lines of code into their own function in a new module is still a PITA, particularly when the lines of code are not consecutive.
replies(1): >>43177802 #
4. galaxyLogic ◴[] No.43177802{3}[source]
So is moving a function or class possible? What actions you need to take to accomplish that? Thanks
replies(1): >>43219860 #
5. hassleblad23 ◴[] No.43219860{4}[source]
This is supported natively by most IDEs today.
replies(1): >>43231985 #
6. hassleblad23 ◴[] No.43231985{5}[source]
At least Pycharm is good at it.