Stuff Notes - 2024-01-20

Things I’m using, notes about stuff: tmux, nvim, and other tools
computers
tools
tmux
nvim
org
emacs
Author

Alan Schussman

Published

January 20, 2024

A couple of weeks ago I half-seriously and very irresponsibly wondered if I should start playing with tmux, and, well, I may never make my way out of this wormhole. I’m really pleased with how much of my daily driver time can fit into a consoled! With the help of tmux, I’m currently doing:

  • Quarto authoring with R in nvim using Jannik Buhr’s really great quarto-nvim-kickstarter. While tuned for working with Quarto, this is also a fantastic overall starting point for an extremely functional nvim configuration. One additional important trick I found is to use a local ignore file for ripgrep so that the file finder view doesn’t get cluttered with python environment and quarto operational files:
# ripgrep ignore file: .ignore in project root
env/
*_freeze/

(I’d love to know if there’s a global way to set ignores for ripgrep; I didn’t come across it on a quick search)

Right now I have three Quarto projects open in three separate tmux windows, and it feels quite a bit less noisy than having the same projects open as separate RStudio windows. This probably isn’t where I’d start a brand new data intensive project, and it wouldn’t be a good replacement for many of the really great affordances in RStudio, like the environments pane and data viewer windows, but it’s a really functional and effective-feeling interface for these projects at their current stages. (Including this Quarto blog!)

I’m also:

  • Controlling my unstable and finicky Roon server with roon-tui

  • Using org-mode in an emacs console. I sort of keep coming back to org mode, even though it often feels a lot more cumbersome than I want it to be. But it’s ready when I need to make some lists!

  • Keeping a couple of dedicated terminals for ready ssh sessions and miscellaneous stuff.

I’ve been mostly doing all this in kitty, which has been my go-to terminal for a year or so. But … but: with tmux I can connect to all this stuff from any terminal app, and attaching to this built-up environment using Panic’s new version of Prompt is rather magical. I don’t have this use case as much, but I’m finally understanding the brilliance of tmux for maintaining remote sessions that can be connected to from anywhere and don’t need to be re-stood up every time.

Prompt handles the nvim background color in tmux differently than kitty. To get the correct background I had to add this to my .tmux.config, thanks to this thread about vim colors:

set-option -ga terminal-overrides ",screen-256color:Tc"

Finally, Jaime’s Guide to tmux: the Most Awesome Tool You Didn’t Know You Needed has been valuable and fun for not only learning how to do stuff with tmux, but to understand why it’s such a useful approach, a motivation I didn’t find in most of the other places I looked.