DEV Community

Krzysztof Żuraw
Krzysztof Żuraw

Posted on • Originally published at krzysztofzuraw.com on

1 1

Alfred Snippet workflow

I recently decided to remove a few no so frequently used applications. One of them was Typinator. It is a text expander - one of many. While I was researching if I can remove it and consolidate my snippets I stumbled upon a feature in one of the most used apps by me - Alfred. There are two messages if you are looking into Alfred text expanding capabilities - you can do it - yay 🎉 and it wont be so simple.

There are two types of text expanding in Alfred world:

  1. Simple - like expanding telephone number or date with cursor
  2. Complex - with multiple variables & selecting from a list of possible options.

I want to cover here the second one. To have complex text expanding you need to create snippet workflow. As a demo I've created conventional comments snippet workflow that ask me a couple of questions and pastes nicely formatted string into GitHub comment box. Workflow can be found on GitHub.

How it is working? At the beginning it ask me about label => which I can select from list; then I type title of my comment. Right after that workflow is pasting string:

**label** : title
{cursor_postion}

Enter fullscreen mode Exit fullscreen mode

into currently focused input field.

You can see workflow in action below:

Summary

If you want to have text expander like capabilities in Alfred - it is doable via snippet workflow. You can start by looking into my conventional comments one.

AWS Q Developer image

Your AI Code Assistant

Generate and update README files, create data-flow diagrams, and keep your project fully documented. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

Top comments (0)

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

👋 Kindness is contagious

Explore a trove of insights in this engaging article, celebrated within our welcoming DEV Community. Developers from every background are invited to join and enhance our shared wisdom.

A genuine "thank you" can truly uplift someone’s day. Feel free to express your gratitude in the comments below!

On DEV, our collective exchange of knowledge lightens the road ahead and strengthens our community bonds. Found something valuable here? A small thank you to the author can make a big difference.

Okay