Published: August 25, 2022 • 2 min read
Today I’d like to share a small part of my practice: using a persisted scratchpad text file for jotting things down.
When coding, often I’ll need to save a piece of data or type something out. This could be the identifier of a record, or a list of steps my pair and I think we need to take to fix a problem.
Instead of creating a new file each time, I keep a scratchpad in my root
~/buffer. I’ve mapped Vim to open it from normal mode with
" Open my scratchpad nnoremap <leader>q :e ~/buffer<cr>
You can enter the file in insert mode by adding
i<cr> to the end of the
When I need to jot something down quickly, I hit this command with muscle memory and start typing.
It’s persisted, so my notes last long after my current programming session has ended. And it’s outside of my project directory, so I don’t need to ignore it in version control or worry that it will be accidentally committed or blown away.
What are your thoughts on this? Let me know!
Get better at programming by learning with me! Join my 100+ subscribers receiving weekly ideas, creations, and curated resources from across the world of programming.