Jump to content

[SOLVED] Expand snippet only after hitting delimiter (space, tab, etc.)


Recommended Posts

Can we expand snippets only after hitting the delimiter keys such as space, tab, enter?

For example,

I want to assign:
\\a  expands to \alpha

\\a2 expands to \alpha^2

Problem: Whenever I type \\a it expands to \alpha and can not type \\aa2 so that the second one works.

 

 

This is possible in in another text expanding app called aText.

There we can expand the snippet at the delimiter.

 

If we type \\aa and hit space or tab or enter, it will expand the snippet and keep (or not keep) the delimiter,

can we do same in Alfred?

Edited by Bhishan
Typo
Link to comment

@Bhishan there are a few options for this.

 

You can either set a suffix per collection (e.g. a space) so all snippets in that collection will only expand if followed by a space. Double click on a collection name in Alfred's preferences to add a suffix.

 

Alternatively, you can simply add a space to the keyword for the snippet e.g. "\\a ".

 

Cheers,

Andrew

Link to comment

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...