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 post

@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 post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...