Wednesday, January 18, 2023
Show HN: Codex – Find and Replace for Code https://ift.tt/FHCLqT9
Show HN: Codex – Find and Replace for Code Most code editors' find & replace features are still very close to the original design intended for text documents, so they become unwieldy when you need to match across newlines and indentation for example, or when a parse of the code is necessary to capture a particular expression. Codex ( https://ift.tt/nvzhXSa ) is an attempt to rethink what find & replace should look like in a modern code editor. It defines a simple but powerful syntax for describing code modifications, combining plain text, regular expressions and Tree-sitter queries, along with sensible handling of newlines and indentation*. It can be used just like regular plain text find & replace, but allows freely mixing in regexes and Tree-sitter queries as more flexibility is needed. It introduces "line quantifiers" for matching a bunch of lines at the same nesting level, so basic structural changes can be achieved without even using a query (see the JavaScript function example in the link). I designed Codex with a specific use case in mind (the one I show in my demo video: https://www.youtube.com/watch?v=MQ_N0-AJ2Qg ), so any suggestions for other things it should support would be much appreciated, as well as general feedback. *Indentation is relative and space/tab agnostic. https://ift.tt/nvzhXSa January 18, 2023 at 02:26PM
Subscribe to:
Post Comments (Atom)
Show HN: Playwright Best Practices AI SKill https://ift.tt/fodWJZ3
Show HN: Playwright Best Practices AI SKill Hey folks, today we at Currents are releasing a brand new AI skill to help AI agents be really s...
-
Show HN: Stickerbox, a kid-safe, AI-powered voice to sticker printer Bob and Arun here, creators of Stickerbox. If AI were built for kids, w...
-
Show HN: An AI logo generator that can also generate SVG logos Hey everyone, I've spent the past 2 weeks building an AI logo generator, ...
-
Show HN: Music player for big local collections with mpd support mpz is a C++/Qt music player focused on UX, with derectory tree and playlis...
No comments:
Post a Comment