Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API

From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
might be a good job for AI for once
don't quote me on that. they'd have to actually design it as a feature and they have not
and you'd still have to go look over every change cuz that thing fucks up so much -
also in vscode you can use regex in search and replace btw
most text editors
I write those all the time but I have only used them in single files not whole codebases -
There's regex
But also, I wish you could write something like
Replace every occurrence of
Pos::Range($range)
with
SourceRange::new($range, $source).pos()
wherein $source is
- the unique variable in the nearest scope of type Sym or
- the unique Sym reachable via member access and parameterless immutable functions from variables in scope or
leave it blank and mark for human review -
cb21910624d@cafecortado yup, worked a lot with regex, just used the caveman version of that tool, when in fact a way more advanced version existed I didn't know about.
-
cb21910624d@jestdotty unfortunately only allowed in a very restricted kind of usage, no in-editor AI for now, whole codebase not allowed as context.
-
retoor87483dCave people, I can select the whole document, do ctrl+I and describe in English an advanced replace and smash enter. No regex needed. It's called AI (Codeium)
Related Rants
So fucking exhausting when you have to change many things in a codebase in a repetitive manner with search and replace and it's not worth the time to write a rool to automate it. One of those special cases where you wish search and replace would support some kind of templating or be variable depending on the search result
rant
exhausted
repetitive task
not worth automation