{
  "$type": "site.standard.document",
  "description": "feat: pair vim and aider in tmux panes with a local LM Studio model and the watch-files trick",
  "path": "/posts/aider-vim-tmux-local-llms/",
  "publishedAt": "2026-05-13T00:00:00.000Z",
  "site": "https://read.ryancowl.es",
  "tags": [
    "DevEx"
  ],
  "textContent": "All this new AI tooling has been a gift for the kind of person who loves a good dotfile and would happily pipe a model through a tmux pane before opening another browser tab. It's also a great way to spend a whole afternoon configuring your workflow instead of actually getting anything done.\n\nAnyway. When I went looking for an AI pair-programming setup, I didn't want an IDE plugin or a chat tab. I still wanted to live in vim, I just wanted a way to hand real edits off to a model without bouncing out to another window.\n\nWhat I landed on is aider running in one tmux pane, vim in another, and LM Studio quietly serving Qwen 3.6-35B-A3B on localhost. The whole thing runs offline, costs me nothing per token, and uses the same keybindings whether I am at my desk or SSHed into my Pi.\n\ntl;dr: Install aider with , point it at LM Studio's OpenAI-compatible server with a small , then run vim and aider in two tmux panes with  enabled. Drop  or  comments in your code, save, and aider answers (or edits and commits) in the other pane.\n\n  \n\nThe stack\n\nFour pieces, each doing one job:\nLM Studio loads a model and exposes it on  using the OpenAI-compatible protocol.\nAider is a terminal-native AI pair programmer. It builds a repo map, edits files directly, and commits each change to git with a descriptive message. Don't like a change?  reverts the commit.\nVim stays vim. I edit, I save, that's it.\nTmux holds the two panes together so I can detach, reattach, and use the same setup over SSH.\n\nNone of this is particularly novel. The aider authors recommend exactly this layout. The nice thing is that it all fits together cleanly.\n\n  \n\nInstall aider\n\nI used uv, which installs Python tools into isolated environments without polluting your system Python:\n\nThat dropped the  binary into , which is not on  by default on macOS. Either let uv handle it:\n\nOr add it yourself in :\n\nYou can confirm it worked with:\n\n  \n\nPoint aider at LM Studio\n\nIn LM Studio, head to the Developer tab (the  icon), load a model, and toggle the server on. You can confirm it is up with:\n\nThe  field in the response is the model name you'll hand to aider. Mine is .\n\nAider reads config from . Mine looks like this:\n\nA couple notes:\nThe  prefix tells litellm (aider's model router) to use the OpenAI-compatible protocol. Everything after it is the literal model id from LM Studio.\nThe  value doesn't matter as long as it exists. LM Studio doesn't check it.\nis the magic flag (more on that below).\n\nWith that in place, you can run  in any git repo and it'll connect.\n\n  \n\nThe vim + tmux layout\n\nA minimal  to start:\n\nThe flow:\n\nThen  followed by  to split vertically. Run aider on one side, vim on the other. Navigate with  and . Detach with , come back later with  and everything is still running, including aider mid-conversation.\n\nIf you're not big on tmux, iTerm2 vertical splits () get you most of the way there. The reason to graduate to tmux is that the keybindings work identically over SSH, which comes in handy if you also work on something like a Pi or a remote dev box.\n\n  \n\nThe  and  trick\n\nThis is where the workflow stops being \"two tools in two panes\" and starts feeling like one thing.\n\nWith  on, aider watches the files in your repo. When it sees a comment containing , it answers the question in its own pane. When it sees , it makes the change and commits.\n\nFor a question:\n\nSave with . Aider reads the comment, answers in the other pane, leaves the code alone.\n\nFor an edit:\n\nSave. Aider edits the file and commits the change.  will show a real message describing what it did.\n\nYou can add this to your  so vim notices when aider has rewritten the file underneath you:\n\nAnd a couple of snippets that make the AI comments faster to drop in:\n\nNow  opens a new line below with  waiting for me to type a question, and  does the same with . Swap the comment character per language ( for JS and PHP).\n\n  \n\nWhen to talk to aider directly\n\nComments are for inline tweaks. For bigger work, I move to the aider pane and use the chat directly. The commands I actually use:\n\n is the one I reach for most. It lets me ask \"what does this file do\" or \"where would I add a new route\" without aider touching anything.\n\n is worth knowing about. It plans the change in a stronger reasoning model, then hands the plan to a cheaper editor model to apply. Useful when you've got both a local model and a cloud one configured.\n\n  \n\nA few things I learned the hard way\n\nLM Studio's \"Auto-eject unused models\" can quietly unload your model between sessions. If aider hangs on its first request, check the Developer tab to make sure the model is still loaded, not just selected.\n\nRAM headroom matters more than you think. A 35B MoE model needs real memory to load, and if you've also got Docker Desktop sitting on 12GB of containers, you'll feel it. Quitting things you aren't using is what keeps the model fast instead of crawling.\n\nAider will warn that it doesn't know your local model's context size. That's because LiteLLM's metadata catalog only covers hosted models. The warning is harmless. You can silence it with  in your config, or feed aider the real specs via  if you want accurate  readings.\n\n is a feature, not a bug. Every aider edit becomes a commit. It feels weird at first, but it means  is always safe and  doubles as a changelog of every prompt you've run.\n\nLocal models are good, not great. Qwen 3.6-35B-A3B is genuinely useful for refactors, boilerplate, explanations, and small features. For bigger agentic work it still trails Claude Opus or GPT-5.1. The nice thing about aider is the same config can target a local model today and a cloud one tomorrow, so the workflow doesn't change as the models do.\n\n  \n\nResources\nAider documentation\nAider in-chat commands\nLM Studio\nuv\ntmux cheatsheet",
  "title": "A Vim + Tmux + Aider Workflow for Local LLMs"
}