Live data from Hacker News

Comby - Structural code search and replace for every language

comby.dev

21–26 of 26 posts

Re: Comby - Structural code search and replace for every language

#21
post #13

I believe Sourcegraph uses Comby under the hood to an extent for structural matching as well!

Yep! (Sourcegraph Community Manager here) We use Comby syntax for structural search: https://docs.sourcegraph.com/code_search/reference/structura... We also have a few tutorials to make large-scale code changes across many repositories and code hosts (batch changes) with Comby: - Refactor Go code using Comby: https://docs.sourcegraph.com/batch_changes/tutorials/refacto... - Updating Go import statements using Comby:…

[deleted]

Re: Comby - Structural code search and replace for every language

#22
post #15

Okay wow. I didn't tools like this existed! There's been more than once where I've found myself in a situation like "find all code like this, change if this, delete if this". Regex can only get you so far. Does someone know if this or something similar is available as a VSCode extension? It'd be fun to make one if not!

Sourcegraph Community Manager here. You can use the Sourcegraph extension for VSCode [1] that would allow you to have the structural search powered by Comby (or literal or regular expression search) inside of VSCode. You can't do batch changes[2] inside of VSCode yet, only via the Sourcegraph CLI[3]. We're working on expanding this. [1] https://marketplace.visualstudio.com/items?itemName=sourcegr... [2] https://docs.…

anything similar for vim?

Re: Comby - Structural code search and replace for every language

#25
post #22
post #15

Earlier quoted context omitted.

Sourcegraph Community Manager here. You can use the Sourcegraph extension for VSCode [1] that would allow you to have the structural search powered by Comby (or literal or regular expression search) inside of VSCode. You can't do batch changes[2] inside of VSCode yet, only via the Sourcegraph CLI[3]. We're working on expanding this. [1] https://marketplace.visualstudio.com/items?itemName=sourcegr... [2] https://docs.…

anything similar for vim?

We don't have an extension for Vim yet, but you can use Sourcegraph CLI[1] in your terminal. Feel free to file a feature request[2] though, which should help bump up the prioritization of a proper Vim extension.

[1] https://docs.sourcegraph.com/cli [2] https://github.com/sourcegraph/sourcegraph/issues/new?assign...

Post reply on HN