Home Download Buy Blog Forum Support

RegReplace Plugin

Re: RegReplace Plugin

Postby vitaLee on Fri Mar 09, 2012 10:46 am

id like to excuse myself for not reading the instructions word by word and ask if there is an option to apply RegReplace commands to selection(s).
vitaLee
 
Posts: 150
Joined: Tue Dec 27, 2011 11:10 pm

Re: RegReplace Plugin

Postby facelessuser on Fri Mar 09, 2012 3:28 pm

Not yet...but there can be. I will have to look into.
facelessuser
 
Posts: 1541
Joined: Tue Apr 05, 2011 7:38 pm

Re: RegReplace Plugin

Postby facelessuser on Mon Mar 12, 2012 2:55 am

Should have regex under selection out fairly soon day or so. The code is pretty much done (it was pretty simple). I think I will just have a setting that you can enable, and then after that, if you a something selected, it will default to search selection only. If you have no selections (cursors are fine), then it will search the whole document.

It is pretty straight forward. If you are doing the special replacements that first target a scope and then apply the regex to that scope, you will have to ensure the entire scope is under the selection (I might change this in the future).

I might have it out by tomorrow if I am not feeling too lazy.
facelessuser
 
Posts: 1541
Joined: Tue Apr 05, 2011 7:38 pm

Re: RegReplace Plugin

Postby vitaLee on Mon Mar 12, 2012 8:12 am

thanks. :)
i was thinking exactly the same about the apllication.
vitaLee
 
Posts: 150
Joined: Tue Dec 27, 2011 11:10 pm

Re: RegReplace Plugin

Postby facelessuser on Thu Mar 15, 2012 4:55 am

Finally finished this.

Version 1.6
- Save under selection added (limits searches to selections if and only if selection exists)
- Cleanup "highlight on save regions" when performing other regex searches

Replace Only Under Selection(s)
Sometimes you only want to search under selections. This can be done by enabling the selection_only setting in the settings file. By enabling this setting, regex targets will be limited to the current selection if and only if a selection exists. Auto replace/highlight on save events ignore this setting. If you have a command that you wish to ignore this setting, just set the no_selection argument to true. Highlight style will be forced to underline under selections if find_only is set to ensure they will show up.
facelessuser
 
Posts: 1541
Joined: Tue Apr 05, 2011 7:38 pm

Re: RegReplace Plugin

Postby quodlibet on Mon Dec 03, 2012 11:33 am

Is it possible to fold (rather than replace) on_save?
quodlibet
 
Posts: 498
Joined: Sat Jun 18, 2011 5:53 pm

Re: RegReplace Plugin

Postby vitaLee on Mon Dec 03, 2012 12:55 pm

Supported override actions:
- fold
- unfold
- mark
- unmark

check the first post for details.
vitaLee
 
Posts: 150
Joined: Tue Dec 27, 2011 11:10 pm

Re: RegReplace Plugin

Postby facelessuser on Mon Dec 03, 2012 4:32 pm

Though RegReplace does support fold, unfold, mark, unmark, I am not sure it is all supported via "on_save". A matter of fact, I am pretty sure it isn't...but I could add it. RegReplace is a plugin that I plan on spending some more time on some time soon. It was thrown together pretty quick to fulfill my basic needs, and while it works well for what I use it for, it has some gaps in features etc. and has some areas that could use better polish.

If you hop on github and create an issue for allowing for fold on save, I will try and add it sometime soon.
facelessuser
 
Posts: 1541
Joined: Tue Apr 05, 2011 7:38 pm

Re: RegReplace Plugin

Postby quodlibet on Mon Dec 03, 2012 8:51 pm

I added an issue to github. Totally no rush.

I was very surprised to find RegReplace supported folding matches.
quodlibet
 
Posts: 498
Joined: Sat Jun 18, 2011 5:53 pm

Re: RegReplace Plugin

Postby facelessuser on Mon Dec 03, 2012 10:51 pm

quodlibet wrote:I added an issue to github. Totally no rush.

I was very surprised to find RegReplace supported folding matches.

I probably use terms like "soon" too freely...it is in my queue though ;).

I wanted to be able to fold all comments, so I added the fold/unfold a while ago...
facelessuser
 
Posts: 1541
Joined: Tue Apr 05, 2011 7:38 pm

PreviousNext

Return to Plugin Announcements

Who is online

Users browsing this forum: Yahoo [Bot] and 10 guests