Vim can be a powerful tool in a developer’s tool belt. However, it can feel very overwhelming to learn because of how highly configurable and advanced it is. During my experience learning Vim, I’d like to give some tips to reduce those feelings and make the learning experience more efficient.
Learn Touch Typing
Learning to touch type is a valuable skill to have when learning Vim. As, you don’t have to constantly look at your keyboard when typing, negating some of the benefits Vim has to offer.
Patience is key.
Like learning any skill, it’s important to have patience. Don’t expect to master Vim quickly or maybe even feel comfortable with Vim especially if you lack typing skills. It’s important that you understand this as Vim is a lifelong skill. Once you learn Vim, you’ll most likely use it for the rest of your developer career so there’s no need to rush it. Also, because of how highly editable and advanced Vim is, you’ll probably be learning for a while depending on how technical you want to get.
Learn the fundamentals.
When first learning all there is to Vim, it can feel overwhelming. That’s why it’s important to narrow the window of commands you’ll try to learn. By focusing on building a solid foundation, you can improve the pace at which you understand and use Vim. For example, it’s important to have a solid grasp on moving in Vim and switching between Vim modes.
Use flashcards.
This was one of the most helpful tips in memorizing the Vim commands. By using spaced repetition with flashcards, try to learn the minimum amount of Vim commands to be able to write code. In my experience, I would recommend trying Anki or Quizlet flashcards, use what’s most comfortable for you.
For example, when I first started, I focused primarily on movement and insert keys. Then as time when on, I added more and more commands to my card set. It also helps decrease the overreliance on just muscle memory. Practicing both learning techniques will increase the speed at which you can memorize Vim commands. After some practice, I noticed myself using my Vim cheat sheets and book less often.
Try interactive Vim tutorials.
I think interactive Vim tutorials would really help if you’re completely new to Vim. They provide a solid introduction to Vim and provide the most basic and fundamental Vim commands. I personally found vimtutor to be the most helpful. Although, if you want to have more fun with a Vim tutorial, try vim adventures. Stop using the interactive Vim tutorials once you have completed them about once or twice since they only serve as an introduction.
Pick up Vim cheat sheets/books.
One of the most important tools for learning Vim is a cheat sheet and if you’d like a deeper dive, a Vim book. There are a lot of Vim cheat sheets out there you can find but I mainly use this vimsheet. Vim cheatsheets are extremely useful because they provide all the commands you would need to survive using Vim without all the fluff in a book. I usually keep a bookmark or open a tab with the Vim cheatsheet on another screen. While it may seem bothersome to have it open all the time, eventually the more you practice Vim the less you’ll have to reach for it.
While books are not as practical to pull out every time you need to look for commands; however, they do provide more information about commands and Vim in general. If you are interested in deeper Vim information then, Practical Vim could be beneficial for you.
Pair with a more experienced Vim user.
By pairing with a more experienced Vim user, they can help you level up your Vim game. Even now, I have found myself countless times using basic commands to do the work of more efficient commands which I didn’t know at the time. But that’s where a more experienced Vim user will be of help.
They can serve as an amazing resource to instantly supply you with specific commands for unique scenarios. They can also give you tips to make Vim a more comfortable experience, like rebinding Esc to Caps Lock or enabling key repeating. You can learn many tips and tricks by pairing with a more experienced Vim user.
Learning Vim in 2023
Ultimately, Vim can level up your game by making you a faster and more efficient developer. But only if you take the time to learn the fundamentals, exhaust your resources, and practice, practice, practice.