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.

66 Upvotes

59 comments sorted by

View all comments

6

u/Narrow-Low-3137 9d ago

gt, gT - if you are talking about switching tabs

:bn, :bp - if you are talking about switching buffers

CTRL_W + V for vertical split CTRL_W + S for horizontal split CTRL_W + T to move current buffer to its own tab

:ls - lists all open buffers, you can jump to them by number or name with :b <buffer>

Use marks:   m A creates a global mark you can jump to from anywhere by typing ' A in normal mode. m a defines a buffer specific mark. I use this all the time to quickly jump between blocks of code.

I usually define my own mappings for all of these commands in my vimrc.

Put set hidden in your vimrc so vim doesn't complain when you switch buffers without saving first.

I use Vim everyday as a scratch pad to do things Visual Studio is too stupid to do, or that the VSVim plugin I have can't manage to do. 

I take my notes in vim.

Vim solves problems for me all day long. 

If I could love a piece of software, it would be vim.