1 Mar 2010 09:32
Incremental Sequences for Replacement
Hi, Allan- Following up from IRC... My text editor of choice on Windows was TextPad, and it supported a handy way to insert sequential numbers for "replace all" operations. This was useful, for example, when inserting line numbers, creating unique ids, etc. I don't know if the syntax was unique to TextPad, or if it is part of some standard regex syntax, but it was pretty simple and effective: \i(<start_index>,<increment>) \i Replace with numbers starting from 1, incrementing by 1. \i(10) Replace with numbers starting from 10, incrementing by 1. \i(0,10) Replace with numbers starting from 0, incrementing by 10. \i(100,-10) Replace with numbers starting from 100, decrementing by -10. Any chance this (or something similar) could be added to TextMate? Thanks- -Doug _______________________________________________ textmate mailing list textmate@... http://lists.macromates.com/listinfo/textmate(Continue reading)
RSS Feed