Wednesday, January 18, 2023
Show HN: Codex – Find and Replace for Code https://ift.tt/C1E9NHp
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/hW07ltY ) 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/hW07ltY January 18, 2023 at 02:26PM
Share this
Trending
Label
4 TIPS FOR FINDING THE BEST RUBBER SEALS FOR YOUR APPLICATIONS
A CONTRACTOR’S GUIDE TO FREELANCING
Amazon Prime Video
FOUR REAL ESTATE MISTAKES THAT BANKRUPT LOTTERY WINNERS
FOX NEWS
Golden Globes 2020 nominations full list: The Crown gets 4 nods
Grey Group’s Anusha Shetty elevated as Chairperson & Group CEO
Hacker News
HOW CAN INDIAN TECH FIRMS BEST LOCALIZE CONTENT TO OPEN NEW GLOBAL MARKETS?
HOW TO MAKE MONEY PLAYING PUBG
HOW TO RECOVER DELETED TEXT MESSAGES ON IPHONE WITH/WITHOUT BACKUPS?
HOW TO RUN A SUCCESSFUL PROMOTIONAL EVENT
IBF disappointed by TRAI’s amendment of NTO and interconnection regulations
IFTTT
Independence Day
Marriage Story leads with 6
MAXIMIZING NETWORK TOPOLOGY THROUGH TYPES MOST APPROPRIATE TO YOUR OPERATION
MICROSOFT CLOUD CERTIFICATIONS EXPLAINED
NTO 2.0: Brace for another round of disruption
NYT
Our vision is to serve consistently and creatively: Vijay Subramaniam
Publicis India appoints Ranadeep Dasgupta as Executive Creative Director - North
RECOVER ALL YOUR DELETED DATA WITH IBEESOFT DATA RECOVERY
say broadcasters
SFMTA
SUBMITTING A PERSONAL INJURY CLAIM: 5 EXPERT TIPS
THE ART OF MANAGING SMALL PROJECTS
WHAT STEPS ARE NEEDED TO START AN ONLINE BUSINESS
Where to watch Golden Globes 2020 live in India?