Learning Vim is a challenge. There are a lot of keys to remember and Vim works in a different way to other editors. I had an idea about structuring a Vim tutorial like learning a martial art, where each milestone is represented by a belt colour. We start at white belt where we learn the… Continue reading Learning Vim like a Martial Art
Month: September 2023
Vim Macro Example
In this section, we’ll work through a simple example to get familiar with Vim Macros. We’ll edit a column in a tab separated file (TSV) using a macro. TSV Example Let’s say we have the following tab separated text. Notice the last column, where all the cities are in capital letters: We’ll create a macro… Continue reading Vim Macro Example
Getting to Black Belt in Vim – Part 6 – Black Belt
Welcome to our final chapter. We made it! Previously, at blue belt level, we covered text-objects. At black belt level, we’ll cover search/replace, macros and window commands. Finally, we’ll explore topics to take you beyond black belt. Search & Replace To replace everything on the current line, type: :s/<search term>/<replace term>/g where the <search term>… Continue reading Getting to Black Belt in Vim – Part 6 – Black Belt
Getting to Black Belt in Vim – Part 5 – Red Belt
At blue belt level, we covered visual mode and advanced motions. At red belt level, we’ll introduce a powerful new concept. If you’re a developer, they’re a game changer – you can transform text in a few keystrokes. Let’s learn more. Red Belt Text Objects Text objects are a sequence of commands, that let you… Continue reading Getting to Black Belt in Vim – Part 5 – Red Belt