Tag-based Replacing

I have never been happy with replace dialogs in text editors, so when I was about to re-implement this feature in Scratchpad for Vala, I decided to try something different. Instead of going to a dialog, you replace text by first “tagging” some parts of text and then entering the replace string. Aside from getting rid of one annoying dialog, this approach is also more flexible (you can add and remove tags at will) and reassuring (you never have to guess what will happen). Aside from tagging the current selection (ctrl+t), you can also tag all recent search results (shift+ctrl+f) or tag a selection and jump to the next occurance in one step (ctrl+g). I’ve made a short screencast to demonstrate this:

Tag-based Replacing Screencast

This was the last missing feature I wanted to implement after the port to Vala, so you can expect a release of the native Scratchpad version any day now. It’s mighty fast. 🙂

Advertisements

3 responses to “Tag-based Replacing

  1. Wow, a great idea. Never seen anything like that. And yeah, I’m never sure what happens when replacing. It’s great that the replacement stays highlighted.

  2. Just went through your pages. Are you playing with my innuendo magazine I have a nice joke for you) What goes faster than a rabbit in a field? A rabbit in a blender.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s