Live data from Hacker News

Ask HN: How do you use Vim in the era of AI?

news.ycombinator.com

41–50 of 105 posts

Re: Ask HN: How do you use Vim in the era of AI?

#42
post #37
post #27

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.

I see coworkers reach for AI to perform many tasks that are made trivial by a few keystrokes or a simple macro in Vim.

Your macros are not implementing features, fixing bugs, and writing test cases.

Re: Ask HN: How do you use Vim in the era of AI?

#44
Funnily enough, I have my agent use vim sometimes.

I prefer commits to be granular to the extent that I manually edit the patch in git add -p, albeit rarely. So I have a pty plugin that my agent literally sends control codes to. This is also useful in general for LLMs driving any interactive terminal program. Long live text, I guess.

Re: Ask HN: How do you use Vim in the era of AI?

#45
It makes sense even more. If you never enter "insert" mode, you still have powerful navigation and overview capabilities. `*`, `#`, n/p, :set fdm=indent + zM/zR, gf/gx, :bp, the venerable `}/{` pairing, and simply `C-n/C-p` while composing prompts can be useful.

AI + Prompting can get you there, but it's still fairly laggy. Honestly, VSCode (aka: Cursor) w/ the vim plugin, and `F2-rename` has been the sweet spot for me. Reviewing diffs with `git diff | view -` and browsing them with vim is another useful.

:wq

Re: Ask HN: How do you use Vim in the era of AI?

#46

I use jj vcs and now most of my time is spent reading the code, so I use diffview.nvim ( https://github.com/sindrets/diffview.nvim ) with some customizations for jj to read diffs. I also use the snacks picker/explorer to search for code.

jj with agentic coding is really underrated. The automatic committing is awesome for being able to see diffs between every prompt, roll back changes done by a given prompt, etc.

Re: Ask HN: How do you use Vim in the era of AI?

#47
post #27

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.

Does that answer the question? Or can you just not help mentioning that you don’t use AI? Because if so, congrats! I’m sure you’re very proud of yourself.

Re: Ask HN: How do you use Vim in the era of AI?

#48
I run claude cli inside nvim as my main ide. It is 3 pane: nvim-tree/editor/agent terminal + popup terminal, I switch M-1/2/3/4 between those. ~700 lines of lua config. It has editor sync on agent writes, auto format hooks for claude, os alerts, resume claude session, and usual vim telescope/lsp/gitgutter.

Quite satisfied with that, haven't opened vscode/zed in a while. Making something like that is easy with LLMs now.

Re: Ask HN: How do you use Vim in the era of AI?

#49
post #37

Earlier quoted context omitted.

I see coworkers reach for AI to perform many tasks that are made trivial by a few keystrokes or a simple macro in Vim.

Your macros are not implementing features, fixing bugs, and writing test cases.

I literally just watched someone do a text replace on a conference call to show me how good Claude was today.

Re: Ask HN: How do you use Vim in the era of AI?

#50
post #27

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.

Q: How to properly grill a steak? A: I'm vegetarian; do not eat meat. Completely irrelevant for the question asked. But I do feel the need to express how superior I feel about it.
Post reply on HN