https://johnnydecimal.com/20-29-communication/22-blog/22.00.0094-dont-type-the-date-by-hand/
On Discord, Jade asked:
Theres gotta be a better way of naming Amex (and other credit card statements) than this surely? I always struggle to remember the dates, but this just feels overwhelming, I usually just go with the statement date for naming credit card statements. Amex Ending 12345 - 2024 10 10 to 2024 11 09 - Statement 2024 11 09 - Due 2024 12 05
There are many situations where I recommend starting a filename (or folder) with the date. It works really well for almost any time-based document. Amex statements fall squarely in to that bucket.
Which date?
For the record, this is the ISO 8601 date standard. Once you get in to date formatting[1] you’ll see that around, so it’s good to know what it is.
That standard defines a bunch of formats, but the one we’re interested in is the simple yyyy-mm-dd
, i.e. 2024-11-21
. It’s the only sensible format for your computer dates as it sorts chronologically. Use whatever other weird crap you want in your personal life.
The problem with this date is that it’s a real pain to type out by hand. And first you have to remember the date! Bo-ring. Fortunately computers are good at a) knowing the date and b) generating text.
Introducing Raycast
You’re gonna need an app. There are many that do this. The venerable TextExpander might have been the first, but we’re going to use a reasonably new app: Raycast.
Raycast is a beast. It does so much. But don’t let that put you off – we can start to use it for the stuff we need, and over time you can explore the rest of its features.
It’s free. There’s a pro plan, but you don’t need it. It’s currently Mac only, but they’re working on a Windows version.
So, install it. You can test it’s working by pressing Option-Space
. A little window should appear in the middle of your screen.
I won’t go over any other Raycast features just now. The manual is here.
Snippets
We’re going to create a ‘snippet’. How this works is that you type some sort of shortcut, and Raycast converts it to something else.
It’s just like the feature on your iPhone that detects if you typed teh
and corrects it to the
. Or the one that corrects █uck
to duck
. You know.
There’s a trick here, and it’s in naming your snippets. You want to guarantee that whatever you type will never ever occur in normal daily typing. Because if your snippet trigger was al
, every time you type that out Raycast will replace it for you.
So now instead of Johnny.Decimal
you’ll get Johnny.Decim2024-11-21
. Not ideal.
I recommend ;;
I think this came from Merlin Mann waaaay back in the 43 folders days (2005!).[2] If you start each of your snippets with two semicolons, you guarantee that you’ll never trigger them by accident.
If you touch-type[3] they’re under your right pinkie. So you mash ;;
and then the name of your snippet and boom Raycast steps in and replaces it with something else.
Let’s drop a little video here in case you’re wondering what I’m on about.
Link to video (dark mode version).
Raycast: Create Snippet
Cool eh! Let’s set it up.
- Activate Raycast with
⌥ Space
. Typecreate snippet
to find that command. Pressreturn
. - The
Name
helps you identify it in the future.[4] Call itYYYY-MM-DD
or whatever else you like. - The
Snippet
is what will appear when this is activated. Paste this in:{date format="yyyy-MM-dd"}
. This is a little bit of code that Raycast understands. Include the curly brackets. - Scroll the window to reveal
Keyword
. This is what you type to activate this snippet. I’d recommend;;date
for this one. - Press
⌘ return
to save it. - Try it out!
Problem: it’s today’s date
As Jade is renaming lots of old files, this isn’t perfect. But honestly I find even having the skeleton of a date format that I can then edit is more useful than starting from nothing.
Tip: use option-arrows
to move around
Another small computer power-user tip: hold option
(alt
on Windows) and use the left/right arrows. This jumps your cursor a word at a time, and it stops at the breaks between the numbers in the date.
This will speed up your editing.
Why stop there?
In Jade’s specific case, where she wants yyyy-mm-mm Amex 12345
, there’s nothing stopping you creating another custom snippet for that whole piece of text.
Repeat the process but now the Snippet
should read {date format="yyyy-MM-dd"} Amex 12345
. Maybe give that one the keyword ;;ax1
? Whatever makes sense to you.
We can do so much more with Raycast, but that’s a good start. Let us know how that works for you, Jade!