A Simple Script to Keep a Log File with Bash and Vim

To keep track of my client work, I’ve been using a simple “did” file. You know, I’m a plain-text fan.

At the end of every workday, I write down what I did for that client and what I need to do the next working day.

Here’s the script I use—add it to any of your dotfiles:

function did() {
    vim +'normal Go' +'r! date "+\%Y-\%m-\%d \%H:\%M:\%S"' +'normal o' ~/did.txt
}

From a terminal, simply type did, and it opens a “did.txt” file with Vim, appends the current date and time at the end, and you’re ready to type. Simple as that.

For everything apart from client work, I’ve ditched my to-do lists.