Home Download Buy Blog Forum Support

Regex syntax highlighting in the replace field

Regex syntax highlighting in the replace field

Postby pianoben on Wed Mar 04, 2009 5:55 pm

Hi,

Regex search and replace is one of my many favorite features in Sublime, and I find the syntax highlighting in the "Search" field very helpful in apprehending what a given expression is going to do. Unfortunately, the same courtesy is not extended to the "Replace" field.

Would it be possible to have highlighting added to the "Replace" field?

Thanks!
pianoben
 
Posts: 3
Joined: Wed Mar 04, 2009 5:49 pm

Re: Regex syntax highlighting in the replace field

Postby pianoben on Thu Mar 05, 2009 8:05 am

Sublimator,

Thanks - at the risk of asking a foolish question, where do I listen for the Replace window obtaining focus? Sorry, absolute n00b to both Python and Sublime's internals...
pianoben
 
Posts: 3
Joined: Wed Mar 04, 2009 5:49 pm

Re: Regex syntax highlighting in the replace field

Postby jps on Thu Mar 05, 2009 12:23 pm

Making the replace field, use regex syntax highlighting, while easy (it's a matter of adding the syntax sublimator mentioned to Packages/Default/Options/Regex Format Widget.sublime-options), isn't quite correct - the replace string has a different syntax to the search string, and as such, a different syntax definition file is required.

The details of the replace string syntax are available at http://www.boost.org/doc/libs/1_35_0/libs/regex/doc/html/boost_regex/format/perl_format.html

I'll add an item to the todo list to implement this.
jps
Site Admin
 
Posts: 3058
Joined: Wed Mar 19, 2008 12:33 pm


Return to Ideas and Feature Requests

Who is online

Users browsing this forum: Google [Bot] and 4 guests

cron