Jump to content

Feature Suggestion: Pattern-Defined Snippet Triggers


Recommended Posts

I think it'd be great to have the ability to perform actions either as a workflow trigger or a snippet replace trigger that match against a pattern (e.g., regex) in lieu of a static string. 

 

For example, a pattern such as:

 

\b(etc\.|et seq\.|arguendo)\b

 

... that matches various latin phrases or abbreviations between word boundaries could trigger an action to italicize (⌘+i) the matched group in whatever app receives the text input. Of course, these can be manually added via traditional workflows, but this would be more elegant. 

 

As another example:

 

@([a-zA-Z ]{2,})

 

might be used as a (rudimentary) trigger to search through a contact list and replace the @MATCH with an actual email address, a first name, last name, whatever. For example, I could envision a system where @john doe replaces the matched group with an email address for a matching contact card, whereas #john doe replaced the match with the phone number, whereas @ig:john doe replaces with an instagram handle. 

 

More generally, I think it'd be nice to be able to define arbitrary snippet triggers. Thoughts? 

 

Edited by andrewjfreyer
Add tags; more context
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...