Thoughts on tech

186 posts latest post 2026-10-06
Publishing rhythm
May 2026 | 3 posts

I ran into an issue where I had some copy-pasta markdown tables in a docstring but the generator I used to make the table gave me tabs instead of spaces in odd places which caused black to throw a fit. Instead of manually changing all tabs to spaes, or trying some goofy :%s/<magic tab character>/<%20 maybe?>/g I learned that Vim has my back…

:retab

Stow is a great tool for managing dotfiles. My usage looks like cloning my dotfiles to my home directory, setting some environment variables via a script, then stowing relevant packages and boom my config is good to go…

cd ~
git clone <my dotfiles repo>
cd dotfiles
# env variable stuff ignored here
stow zsh  # This will symlink my .zshrc file which is in ~/dotfiles/zsh to ~/.zshrc

By default stow will stow packages up one directory from the root directory. In this example the root directory is ~/dotfiles and the package is zsh. So the files in the zsh package will symlinked into ~/.

stow makes it easy to share dotfiles across machines, or safely experiment with config changes while always being protected by git since your dotfiles are in a git repo! …They are in a git repo… right?

Check out stow for a brief introduction to stow

What if I want to stow a package somewhere else? Boom, that’s where -t comes in…

Maybe I don’t like having my dotfiles repo at $HOME and instead I want it in ~/git or ~/personal just to stay organized… Well then I could have the same workflow except the stow command looks like this:

stow zsh -t ~/
#or
stow zsh -t $HOME

After carefully staging only lines related to a specific change and comitting I suddenly realized I missed one… darn, what do I do?

Old me would have soft reset my branch to the previous commit and redone all my careful staging… what a PIA…

New me (credit: ThePrimeagen)…

# stage other changes I missed
git commit --amend --no-edit