One project, three windows, lifelong rhythm
The most common Vim+tmux project layout is so consistent it's almost a default. Three windows: editor, server, shell. Sometimes a fourth: logs. Each window has 1–3 panes depending on how chatty the task is. Once you've used this for a week, switching projects is just changing session names.
Window 1 — editor
Full-screen Vim, or Vim + a side pane for a Python REPL / terminal in the same project root. Inside Vim you have buffers + splits + LSP for the actual code work. The pane to the right is for sending lines of code to (with vim-slime or similar) or for running commands like pytest path/to/test.py that you trigger from the editor.
Window 2 — server
The dev server. npm run dev, uvicorn app.main:app --reload, cargo watch, whatever your stack runs. One pane usually. Sometimes split with a tail of logs if the server doesn't show them itself.
Window 3 — shell
General-purpose. Git operations, ad-hoc scripts, docker exec, psql, whatever. Often split with lazygit or tig on one side for interactive git work.
Window 4 — logs (optional)
For services that produce a lot of log output, dedicate a window to tail -f on log files or kubectl logs -f on a pod. Keep it open all the time; flip to it when something looks weird.
The REPL workflow
Edit code in Vim; send a region or paragraph to the adjacent tmux pane running a Python/Node/SQL REPL. Tools that automate this:
- vim-slime — sends a Vim selection to a target tmux pane. Works for any REPL.
- vim-tmux-runner — like slime but with a first-class "send the test file" command.
- iron.nvim — Lua-native REPL integration with language-aware send commands.
The git workflow
Two equally good patterns:
- Inside Vim with gitsigns.nvim: see hunks in the gutter, stage / reset / preview hunks with leader bindings. Best for fine-grained "this hunk yes, that hunk no" work.
- Adjacent pane with lazygit: a TUI git client in its own pane. Best for branch operations, commit history browsing, and "actually I want to interactive-rebase" moments.
Most experienced users use both. The patterns are complementary, not competing.
The persistent-dev-environment endgame
SSH into a remote workstation (a powerful desktop, a cloud VM, a colocated server). Start tmux there. Set up your three-window layout once. From now on:
- Work from your laptop's terminal at home.
- SSH in from a tablet at a coffee shop.
- SSH in from a borrowed machine at a meetup.
- Same session every time — same buffers, same processes, same scrollback.