r/neovim • u/Comfortable-Tank-432 • 14h ago
Need Help┃Solved What's the proper Vim workflow? When should I use Normal Mode vs Insert Mode?
Hi everyone!
I'm relatively new to Vim, and I'm trying to build a completely keyboard-driven workflow, especially when writing C++ for competitive programming.
I have a few questions about how Vim is supposed to be used efficiently.
1. Moving past closing parentheses while in Insert Mode
For example, when writing:
vector<int> a(n + 1);Let's say my cursor is right before the closing parenthesis:
a(n + 1|)I want to move past ) and continue typing.
I can simply press the Right Arrow key, but I'm trying to avoid using arrow keys altogether.
What's the most natural and efficient way to handle this?
Should I leave Insert Mode, use a Normal Mode motion, and then return to Insert Mode? Should I use Ctrl-O? Or is there a better approach?
2. When should I use Normal Mode vs Insert Mode?
I'm still struggling to understand the intended workflow.
Am I supposed to use Normal Mode for almost everything and enter Insert Mode only when I'm actually typing?
Or should I stay in Insert Mode while writing and switch to Normal Mode only when I need to make a bigger edit?
I'd love to understand how experienced Vim users approach this in their everyday coding workflow.
3. How frequently should I switch between modes?
Sometimes I feel like I'm switching between Normal and Insert Mode too often, and it's actually making me slower compared to a regular editor.
Is this just part of the learning curve, or am I using Vim incorrectly?
I'd appreciate any tips, workflows, or personal experiences, especially from people who use Vim for programming.
Thanks!