I have been using Raycast long enough to say that it has become foundational for my daily routines. At least digital routines.
Snippets is one of the core features of Raycast. Essentially, a snippet is an extendable piece of text that helps avoiding boilerplate text/code, as well as extra unneccessary typing. That being said, snippets represent the DRY principle in action.
For example, snippets can be used for filling:
-
Email address;
-
Address;
-
Phone;
-
Email reply;
-
Video-call invite;
How to create a snippet
Open Raycast → Select "Create a snippet" → Fill the form → Tada!
-
*Name* = the title to be *displayed* in Raycast;
-
*Snippet* = the text to be *inserted*;
-
*Keyword* = the word that *triggers* a snippet;
Snippets I use
I use find myself using snippets quite often. Below you ca find several less conventional use cases I often rely on.
### Dates
Weekday, for my weekly notes
<!-- Tuesday, Feb 20 —>
{date format="EEEE, MMM d"}
<!-- 2024-W08 -->
{date format="YYYY"}-W{date format="ww"}
<!-- 2024-02 -->
{date format="yyyy-MM"}
### Zettelkasten ID
Zettelkasten note id, for a file naming convention when creating notes. NB: I use helixfor 99% of my writing, so the snippet works best when dealing with terminal-based interaction:
<!-- 202402200720.md -->
{date format="yyyyMMddhhmm"}.md
### Frontmatter
Since I moved my blog to Zola, having a consistent frontmatter has become a great convenience:
+++
title = "{cursor}"
description = ""
date = "{date format="yyyy-MM-dd"}"
updated = "{date format="yyyy-MM-dd"}"
draft = false
template = "page.html"
[extra]
source = ""
type = ""
+++
### Youtube RSS template
I don't watch Youtube per se if I am not looking for a specific tutorial. I prefer RSS feeds over social media. The thing below helps receiving some YT channel updates via RSS, just add the channel id.
https://www.youtube.com/feeds/videos.xml?channel_id={cursor}
### Creating code projects
I often find myself relying on snippets when running repetitive code tasks such as installing packages, creating projects and whatnot. For example:
<!-- New Rails project -->
rails new {cursor}
<!-- List current active ports -->
lsof -PiTCP -sTCP:LISTEN
<!-- New Svelte project -->
pnpm create svelte@latest {cursor}
Conclusion
Raycast is a great and super extendable launcher that allows fine-tuning one's experience to a pretty high degree. And snippets is often underrated yet super powerful feature.