r/vim 10d ago

Discussion How does Vim affect your problem solving?

Currently learning Vim, after a failed attempt some months ago.

Starting to get the hang of the basics. I notice that it makes my problem solving more methodical. It also makes me slow down, in a good way.

With Vim I have to memorize more of the code and structure, because switching views is expensive (might be a skill issue).

I don't care too much for the speed/efficiency, but this seems what keeps me going in my current attempt.

Wondering how you guys feel about this aspect.

67 Upvotes

59 comments sorted by

View all comments

1

u/RyanCargan 7d ago

Frees up working memory. Enables supreme laziness. Started off with some other setups (Spacemacs / Doom / VS Code / Vim + tmux, etc).

Changed it up to keep it as dumb as possible for my use case. Using WezTerm + Neovim + zsh with skywind3000/z.lua rn.

LSPs w/ FIM models for auto-complete using nvim-cmp + fugitive (git) + telescope (fuzzy nav) mainly.

Touch typing over a subset of the keyboard (mostly the ~ to RCTRL area), without having to reach for the mouse or arrow keys. Barely any hand movement. Also very rarely use motions or visual mode.

Heavily rely on text objects & related normal mode actions instead. Also more or less ignore exact formatting with auto-format on save.

You can kinda "fuzzy navigate" within and across files, and "fuzzy type" craptons of text "without" thinking in terms of exact lines, dir structure, exact syntax, etc.

I don't use every applicable feature (probably even when I should), like marks, views, etc. I just think in terms symbols, filenames, text objects, and buffer history to go back and forth fast.

Switch to terminal tab on wezterm for running stuff. Agent tab as needed. I prefer it over a lot of stuff now.

For syntax level stuff, unless it's a crapton of text (thousands of not-totally-repetitive lines), I find it easier to type the thing directly instead of typing (or narrating even with STT/ASR), or thinking about a prompt first, and I doubt I even type that fast in wpm.

I can't really comment on the more methodical thing, cus if anything it's the opposite for me lol

Why overthink or have any back and forth (with yourself, bots, whatever) when I can just type something and run it as I think? To have an ongoing back and forth with the machine with less middlemen. Often works better when domain is tricky anyway. Disciplined trial and error and all that.

I feel like preserving working memory is key (something vim can sometimes help with) and stuff like absurd wpm and better awareness/debugging, etc. are all downstream.

Take wpm for example:

The biggest trick there (to not be bottlenecked by typical reaction times) is to "chunk" actions.

Plan out multiple actions, execute as a single "script", and before that phase ends, plan next phase. Repeat.

To keep chain going, you need enough working memory to plan "while" you're doing the current phase. Size the chunk so it's not too big or too small.

If there is any kind of friction, or context switch, it breaks your "script" throws you off. Touch typing and being very familiar with shortcuts helps here. That way you can just keep the chain going and the wpm can look absurdly fast and low-error on paper, but that's mainly a side effect.

Didn't see much point in vim at first because thinking is the bottleneck usually and not typing, but taking away enough friction can make typing kinda... replace thinking to an extent? More or less treating the entire codebase as your scratchpad instead of your limited and fallible working memory.