Today I Learned

Short TIL posts

1834 posts latest post 2026-04-18
Publishing rhythm
Apr 2026 | 20 posts

Testing fresh nvim installs can be a pain, and hard to di without borking your known good install. I’ve been using NVIM_APPNAME to run a test nvim in a sandbox that wont bork my main install. This usually runs for me in under a minute, can be down under 15s if I remove some of the TreeSitter installs at the end. This beats a full docker build of my full devtainer to test out nvim packaging woes.

rm ~/.cache/wwtest -rf rm ~/.local/share/wwtest -rf rm ~/.config/wwtest -rf cp -r nvim/.config/nvim/ ~/.config/wwtest NVIM_APPNAME=wwtest nvim --headless "+Lazy sync" +qa NVIM_APPNAME=wwtest nvim --headless "+TSUpdateSync" "+sleep 5000m" +qa NVIM_APPNAME=wwtest nvim --headless "+MasonUpdate" +qa NVIM_APPNAME=wwtest nvim --headless "+TSInstallSync! c cpp go lua python rust tsx javascript typescript vimdoc vim bash yaml toml vue just" +qa NVIM_APPNAME=wwtest nvim --headless "+MasonInstall lua-language-server rustywind ruff ruff-lsp html-lsp typescript-language-server beautysh fixjson isort markdownlint stylua yamlfmt python-lsp-server" +qa NVIM_APPNAME=wwtest nvim

I’ve started to use this as a...

When I want to put a date in a document like a blog post from vim I use !!date from insert mode. Note that entering !! from normal mode puts you in command mode with :.! filled out. This runs a shell command, i.e. date for this example.

It outputs the following

Fri Jan 31 08:46:11 PM CST 2025

You can also pass in a date such as tommorrow by pasdding in the -d date -d tomorrow.

...

Today I ran into an interesting question, why am I being asked to configure tzdata while installing npm. Turns out that the aptitude cli has a why command that very handily nails down why you have something installed on a debian based system.

apt install aptitude

Why tzdata #

Now we can query why we need tzdata and see the full chain with the root package being npm.

Today I ran into this interactive prompt on ubuntu while installing node and npm, and I do not want to manually configure this interactively every time I run an install, moreso in docker I do not have the interactive terminal to do so.

Configuring tzdata ------------------ Please select the geographic area in which you live. Subsequent configuration questions will narrow this down by presenting a list of cities, representing the time zones in which they are located. 1. Africa 2. America 3. Antarctica 4. Arctic 5. Asia 6. Atlantic 7. Australia 8. Europe 9. Indian 10. Pacific 11. Etc 12. Legacy Geographic area:

Why tzdata #

Checking aptitude why tzdata it shows that the chain goes back through npm.

Big fan of Primes setup. I was not far off of his setup before he really came on the scene, but I’ve picked up a ton of nuggets from him and how he operates. I took his first developer productivity course on Front End Masters as it came out.

It is interesting to see him roll back his ansible scripts for bash scripts here. I converted my setup to ansible after watching his first, but have also since rolled back to bash scripts for quite similar reasons. Ansible is great for remote tasks that need to be done on a fleet of machines, but like he says here overkill for this purpose and ends up something that you need to read the docs for every change to your dotfiles.

Unlike prime I’ve really leaned harder on installing everything in a docker image and developing out of a docker image. I’ve long built docker images of my dotfiles with the idea that its nice to be able to just use them on other machines, but it rarely happened.

In the past year I’ve moved bazzite, an immutable distro. It comes with podman and distrobox, so I install very little on it, a few flatpaks from the store for brave and signal, but most of what I really use day to day comes from my devtainer. It’s nice...

...

https://www.youtube.com/watch?v=03KsS09YS4E&t=610s

Today I learned about the basic calculator, bc. At the very end of this video prime uses it to add numbers in vim.

You can start a calculator repl at the command line, by running bc.

Since bc supports standard unix pipes you can easily pipe data from vim into bc and back out using !!bc. All you need is a string of math on the line you want to calculate, go to normal mode and run !!bc to get the answer.

...

I’ve been back to putting some images on my blog lately and thinking about making them a bit thinner through the use of aspect ratio for simplicity. I’m leaning pretty heavy on tailwindcss these days due to some weird quirks of markdown-it-attrs I cannot have slashes in classes from markdown so I made a .cinematic class to achieve this.

.cinematic { @apply aspect-[2.39/1]; }

Example

screenshot-2025-01-31T14-50-00-094Z.png