Getting Started with Rex (Coming from tmux + Neovim)
FOREWORD: I tried something a bit different with this post. Everything on
this page I wrote by hand. The main deliverable/artifact for this post is a
bunch of text I generated with my agent and quarantined in a separate file. You
can feed that file to your agent to bootstrap your Rex config so that Rex
behaves similarly to what you’d expect coming from tmux. TL;DR: point your
agent here.
I’ve been following the Superlogical stuff and
got notified about Rex early access. Rex is a terminal multiplexer. Or, I
guess it’s supposed to be a multiplexer for…everything? I dunno, but it seems
cool and the creators produce excellent software so I was interested. I tried
herdr and didn’t love it. Rex…I think I love, in no small part because it
seems to just get out of the way, which is awesome.
The only apprehension I had was that I’ve got all this tmux muscle memory I
worked hard for. Split panes, zoom, move around, and getting it all to play
nicely with nvim (we all watched those typecraft videos, I’m sure). The point
of this post is to tell your agents how to quickly set up your Rex config so
that it mostly matches that sort of tmux config you’ve grown accustomed to.
If this is something you actually care about, I’m sure your keys differ from
mine and you’ve already had your agent get yours sorted out. This is really for
those people who might not know that you can in fact configure Rex in this way
and that it’s pretty trivial to have your favorite harness get you 99% of the
way there.
Goals⌗
-
Pane Navigation. First and foremost, I want to be able to move between panes with
ctrl+h/j/k/l. -
Leader Keys. Session creation/switching/killing, pane splitting/killing, and pane zooming.
Rexhas buttons for this, but I don’t wanna leave the keyboard. Also, most of these aretmuxleader-key shortcuts (at least for me). -
Copy Mode. Due to the way
tmuxhighlighting works with visual mode, I’ve had to learn this weird pattern where I<leader>[and then visually select/yank. WithRexI can get similar functionality by mapping<leader>[to something likerex capture -b <block> --unwrap | nvim -(it opens your pane contents in a temp file innvim).
What now?⌗
That’s all for now! Point your agent at the text file I linked above and go be
productive! I have some really cool ideas that’ll be more relevant once Rex
ships a Linux server. Until then, happy tinkering!