Hi ! I’m currently working on writing a grammar taken from a language specifications to a format supported by the parser I’m using. In this frame, I often (I have a ~1000 lines file typically) have the same highly repetitive tasks to perform:
- Copy a snippet from the manual
- Paste it into my grammar file
- Replace all the lines starting with
"([a-zA-Z-]+) = "with
"\1: ", so
start-statement = expressionbecomes
- Replace all the quoted strings with their upper case content:
- Replace all the dash-separated identifiers with underscore-separated identifiers:
- And so on, with similar find/replace commands
I’ve thought of using macros, however you can’t use find/replace with them. I can simply use multicursor edition and regexp find/replace by hand, but it is highly repetitive and inefficient.
Can Sublime Text help in improving this kind of tasks ?