Ask HN: How do you use Vim in the era of AI?
I'm a heavy vim user, but now that I look at the code less and less I'm wondering if it still makes sense.
I'm a heavy vim user, but now that I look at the code less and less I'm wondering if it still makes sense.
Discussion Highlights (20 comments)
wffurr
Use it to write and edit code when that makes sense for you to do so. Just like you always have. It's an extremely useful skill to have even still. I've had much more success with agents reviewing my code and offering inline autocomplete over LSP than I have with letting the agents write the code, which I then try to review. I end up with a much better mental model of the code and higher quality output than either I or the agent could do alone.
ActionHank
You're not looking at the code?
mtklein
On about day 2 of using Fable I realized that the .vimrc I'd been maintaining for 15-20 years would probably never change again. With Opus I still feel like I'm pair coding and want to get in there and make some changes myself, but working with Fable (even Fable managing Opus agents) had me in a completely different mindset, one where I realized I would just be getting in the way.
simianwords
The intersection of people who like vim and ai is basically nil
throw2ih020
I switched from using Vim as my primary editor to using Zed's Vim Mode. When you have a second process editing your project in the background you need an editor that can display those changes immediately without clunky buffer reloads. I've also customized Zed's UI to optimize for reading and reviewing code, and mostly adding notes or small focused edits, rather than writing entire files from scratch.
ArcHound
I did a write-up at https://blog.miloslavhomer.cz/vibing-with-french-models-in-n... . It really can be a fancy auto complete, but more agentic usage moved out of the editors (and I think that's a good thing).
vslira
I use it to write instructions, obviously. I thought everyone was using C-g on Claude Code
chadash
i use vim quite a bit! I find that in this new era, i'm in the command line a lot and like to stay in the command line. vim (I use neovim) is a good way to do that. Furthermore, a lot of my workflow is now done on remote servers (i love exe.dev) where claude code is sandboxed to an extent (it can still cause damage, just not to my main computer's file system). When I'm configuring those, i have a setup script that installs all of my vim files just the way i like them, so vim behaves exactly the same on a remote server as it does locally. I can edit things as needed. I can also access claude code on those servers as well. So working on my remote machine feels a lot like workin locally [1]. [1] I'm aware that i can setup cursor or vs code to access SSH servers, but it's just not as easy and doesn't feel as natural, IMO. There's something i like about needing to call `ssh remote-server` first.
linsomniac
^G in Claude and Codex will drop you into $EDITOR to edit your prompt. I use that all the time. "vimdiff" is a really great way to review code changes side-by-side.
hjkl_hacker
I still use Vim, but totally different from before. I don’t care about efficient movement/editing bindings. All I use it for now is navigating and viewing files.
fernandotakai
like normal? but i don't use ai to write code for me -- i use it as a companion thing where i ask questions and then, instead of asking for code, i implement everything myself. it keeps me sharp and helps me understand the lastest ai stuff.
avsn
Usually I keep terminal split open with the agent side by side and make edits by hand where needed or for reviewing the code. Inside the vim itself I have a small plugin that you can feed a block of text with the comment instructing LLM what to do. It then replaces the text with the result of execution. Super useful for small edits here and there that don't require full session. I also have preconfigured neoterm float with the pi agent, that allows me to jump into the session right away.
philipportner
Hasn't changed at all since AI agents became a thing. tmux, nvim with a few plugins, mainly fzf and LSP support. If I do use an AI agent, I just run it in another tmux window.
Aperocky
I am sort of a no UI (except browser) user for a very long time now, and vim is still incredibly useful. Granted, the language servers are getting dusted, but it's much nicer to write goals in markdown in vim and send it to LLM in a self-written harness CLI; and even look at the results in the same way. All unix. LLM is just the latest toolbox addition.
chikinpotpi
I use vim and claude code (fable) inside of herdr. I can jump to one tab look at the code, jump back over and talk to claude for a little. I can spread this all across several projects using herdrs workspaces. I still write code when it makes sense. Sometimes i annotate the code with comments, hop back over and ask the LLM to consume the annotations i just added and make changes. Sometimes i ask the LLM to analyze lots of code, and come up with a plan of attack for me, then i go implement it myself. For Personal projects I write much more of the code myself still, because i enjoy it. For work, i do whatever gets the best outcome most efficiently.
MantisShrimp90
(Neo)vim is setup wonderfully for this era. Im with Justin on the take that neovim can replace tmux soon literally all that is left is being able to restart terminal sessions on restart (which is even set as a goal for summer of code). Neovim can already have all the agents running in different terminal buffers or there are plugins popping up every day to have deep integrations with your favorite or we even have some interesting harnesses that are unique to neovim like sidekick. As always, the ability to compose small tools and edit any file allow neovim to stay relevant and more powerful than ever in my opinion while not forcing workflow changes like the others
redlewel
How are you a heavy vim user if you wonder if vim makes sense with ai? There are so many things to do outside of writing code that vim is used for. Also neovim + claude code + open terminal pane in tmux is the goated combo anyway. Especially more lately you need to understand the code you are writing if you want to do anything important in software, and the best way to do that is neovim :)
anonymid
I wrote my own neovim AI harness https://github.com/dlants/magenta.nvim And wrote about my thoughts on the relevance of nvim here https://dlants.me/ai-whiplash.html It's been many months, and I thoroughly prefer my harness inside of nvim as my day to day development environment. Using Claude code or cursor makes me feel very removed from the code. Exploring code, gathering context and tweaking prompts/giving guidance to the agent are very much enhanced by neovim. The biggest boon has been the fact that agents make customizing neovim a lot easier. Writing new bindings, config, and even building novel plugins. Here's a few that I built that fit into my workflow: - a tool for reviewing commits / branches / wip. https://github.com/dlants/glean - an iterative grepper https://github.com/dlants/shuck - a file picker that renders in your current window (like oil) and uses more intelligent signals for ranking (like frecency) https://github.com/dlants/needle
ventana
I don't think anything has changed for me regarding my vim usage. Previously, I would use vim to make simple changes in the code or configuration files, making larger changes in VS Code. Now, with agents, I never need to make larger code changes manually so I completely ditched VS Code, but I keep using vim in the same way as I did before: for small changes which I want to make manually, for editing configs, or as a scratchpad.
cryo32
I’m not using any AI. A lot of us aren’t. Vim has done me well for 30 years so I’m not going to throw that away to sharecrop on someone else’s land.