8 Vim Tricks That Will Take You From Beginner to Expert

Tyler Lum
The Startup
Published in
4 min readSep 17, 2019

--

Introduction

Vim is just a text editor. But if you have ever seen an expert use vim, you know that it is shockingly powerful, efficient, and fast. At a high level, vim is a tool that allows you to more clearly better describe what you are trying to do when editing text. Once you become fluent in vim’s language, you will be able to communicate with your computer at a much greater speed.

Prerequisites

For this article, I expect that you have at least a beginner’s fluency with vim, which means that simple commands such as basic movement, inserting, and searching are already understood. If you aren’t at this level yet, you can open the terminal and run:

sudo apt-get install vim

Then, you can go through the vim tutorials by running:

vimtutor

1. Macros

It isn’t nice when you have to do repetitive text editing tasks, but it is the worst when you have to do that task dozens of times. Macros allow you to essentially hit a record button, make your changes, and then stop the recording when you’re finished. Then you can replay the actions in that recording at the press of a button.

  • Press ‘q’ to tell vim you want to record, then press…

--

--