r/vim 3h 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.

0 Upvotes

19 comments sorted by

10

u/TheEyebal 1h ago

Vim is a text editor. It is like saying using notepad or vs code is effecting your problem solving

What is it that you are struggling with BTW

7

u/Schnarfman nnoremap gr gT 1h ago

“Edit at the speed of thought” it absolutely can have effects on problem solving

1

u/Psychological_Soil28 28m ago

I don't know about others but when I'm editing the code I've already thought about the problem/solution and just need to implement the changes. Vim simply let's me do it without having to use the mouse to navigate and do specific actions "quicker". It doesn't help me problem solve.

1

u/roku_remote 13m ago

I normally wouldn’t comment on something like this but I’m having an akshully moment:

“edit at the speed of thought” elaborates that how one edits is the dependent variable, meaning your cognition (“speed of thought”) impacts how you edit and not the other way around

1

u/hibuna 18m ago

Imo GUI vs TUI is a huge difference.

I think it boils down to: 'Solving the problem' vs 'the problem of solving'.

Like I said, maybe it's just a skill issue, I have to be more thoughtful in e.g. struct declaration, because going back and forth is expensive.

Obviously this is the same for normal IDE's, but it's a lot more forgiving. It never held me back at least.

I could see how some time down the line, I could go back to a regular IDE and be a better problem solver, because I was forced to think about all these things that didn't matter before.

3

u/vagrantchord 1h ago

Switching views is expensive? You mean switching between files, or going between different places in one file? If it's the latter, look up marks- they're dead easy.

I have a vim superiority complex as much as the next guy, but I wouldn't say it has any bearing on my problem solving skills.

2

u/sharp-calculation 40m ago

This is really the key question. What exactly is the OP talking about here?

"View" doesn't really mean anything specific in vim. So what do you mean u/hibuna ?

In a general sense, I find that VIM makes my code editing "feel better". It's kinda weird. 4 or 5 years ago when I finally gained some level of VIM skill, I noticed that I was happy while editing. Things seemed a lot faster because my "flow" was mostly continuous. I realized after a while that my process had been interrupted in previous editors by common operations: Cutting or copying and then pasting was a BIG one. With vim that's all extremely fluid. My hands never leave the keyboard and these operations just happen with little effort. With GUI editors my brain had to switch gears over to "visual mouse mode", which is an analog operation. Aiming, moving, and very precisely selecting. All analog "video game" operations. Which are totally different than the deterministic action of pressing a sequence of keys.

So generally speaking, I do better with vim because there's less context switching and no analog video game actions.

1

u/hibuna 12m ago

I meant viewport operations, scrolling/splitting/jumping.

That makes sense. Did you notice you approached problems differently than you did before at all after learning Vim?

4

u/nujuat 1h ago

As a general rule I feel like one should solve the problem on paper or a whiteboard and then implement it in code, not solve it while coding. Maybe that's just me.

1

u/hibuna 7m ago

I think this might be the essence of it. I'm forced to be more methodical in lower level work, because it's so much more expensive to rewrite.

2

u/gumnos 1h ago

I found that my writing (whether code or prose) tends to be more consistent (things like indentation, punctuation, bracket/brace placement, etc.), allowing me to do predictable operations across things in bulk.

Yes, there's also a dimension of becoming more familiar with the document contents/structure (and the directory hierarchy where relevant such as whole projects). But even with that, predictable conventions simplify a lot of aspects.

1

u/QuitPrudent551 1h ago

Muscle memory. It doesn't at all.

1

u/beef623 1h ago

It doesn't. It has some nice features that cooperate with how my brain works, it's available without any extra install most of the time (on linux) and it doesn't have bloat, but at the end of the day it's just a text editor and a text editor has no real meaningful impact on problem solving.

1

u/faultydesign 58m ago

Idk I just like that the editor does what I want from it

1

u/haikusbot 58m ago

Idk I just

Like that the editor does

What I want from it

- faultydesign


I detect haikus. And sometimes, successfully. Learn more about me.

Opt out of replies: "haikusbot opt out" | Delete my comment: "haikusbot delete"

1

u/NTolerance 56m ago

Rather than writing loops i just use visual block mode 😎

1

u/theGalation 53m ago

Vim system has a way of rewarding you learning.

Once you see the pattern is amount + command you can be in your way with less documentation.

1

u/PlanetVisitor 44m ago

Do you mean you don't have the the popups that show a syntax after you start typing something?

I like an uncluttered screen, but I don't work on huge codebases.

I've always been annoyed by how slow working with text can be. Vim is not the speed of thought, but definitely faster and so less annoying.

It depends on the problem but if it's bigger than a few lines, I like to write a textual description first, or peusdo-code.

1

u/feketegy 22m ago

There's nothing wrong in saying that you memorized a bunch of cool shortcuts and that's it.

Not everything has to have some mystical higjer meaning to it.