Looking after yourself

Self care is important. Here are a few of my favourite resources at the moment.

Take care everyone.


How do I write the date to a file in Vim?

I keep a journal at work – you should too, if you’re a software developer. I decided to start adding date and time stamps so I don’t have to think. It’s really easy to do in Vim*, just type this in normal mode:

:r !date

and hit Enter. BOOM the date appears on the next line.

If you’d like a bit more detail on why this works run :help :r, or read the rest of this post. The “r” is short for read and generally means “read from another file”.

It can also read the output of a command. Since you can run external commands in Vim by putting an exclamation mark in front of them, you can do things like :r !pwd to litter your current file with /Users/josh/journal/hopes_and_dreams and the like.

Have fun!

* In Linux-based systems that have the date command at least.

“The starting point for your own words”

Always read with a pen in hand. The pen should be used both to mark the text you want to remember and to write from where the text leaves you. Think of the text as the starting point for your own words.

– Mandy Brown

Lately I’ve been building a webpage to show random quotes from quotesondesign.com. (This is an exercise from FreeCodeCamp which I’ve done as a codepen: codepen.io/jmalk/full/MyPgmq.) While testing, it throws a lot of great quotes at me, like this little gem from Mandy Brown. You can read it and similar reflections on their website.