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:…
Comby - Structural code search and replace for every language
21–26 of 26 posts
Re: Comby - Structural code search and replace for every language
#22Okay 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.…
Re: Comby - Structural code search and replace for every language
#23Re: Comby - Structural code search and replace for every language
#24No support for Zig :(
> Dedicated parsers refine how Comby understands code, but it also has basic out-of-the-box support for data formats like JSON, recent languages like Zig, or your own DSLs!
Re: Comby - Structural code search and replace for every language
#25Earlier 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?
[1] https://docs.sourcegraph.com/cli [2] https://github.com/sourcegraph/sourcegraph/issues/new?assign...