Let’s start a conversation (about modal interfaces)
If you’ve ever edited text before, you are most likely to be familiar with modeless interfaces. It’s the default option chosen by modern mainstream text editors, and that’s how many of us learned to work with text. If you’re old enough to remember a time before smartphones, many landlines and early mobile phones were also modeless.
The term modeless refers to the fact that each interface element has only one function. Each button press results in a letter showing up on screen, or some other action being performed. Each key (or a combination of keys) always does the same thing: the application always operates in a single mode.
However, this is not the only way.
Welcome to the modal interface, where each trigger performs a different action based on context. The most common example of a modal interface that we encounter today is a smartphone. Each time we work in different applications or open different menus, a tap on the screen performs a different function.
Figure 1.2 – A smartphone uses a modal interface, while the traditional phone is (mostly) modeless
It’s similar when it comes to text editors. Vim is a modal editor, meaning that a single button press might result in different actions, depending on context. Are you in insert mode (a mode for entering text)? Then, hitting o would put the letter o on the screen. However, as soon as you switch to a different mode, the letter o will change its function to add a new line below the cursor.
Working with Vim is like having a conversation with your editor. You tell Vim to delete the next three words by pressing d3w (delete 3 words), and you ask Vim to change the text inside quotes by pressing ci” (change inside “ [quotes]).
You may hear very frequently that Vim is faster than other editors, but it’s not necessarily the point of Vim. Vim lets you stay in the flow when working with text. You don’t have to break the pace to reach for your mouse, you don’t have to hit a single key exactly 17 times to get to a particular spot on the page. You don’t have to drag your mouse millimeter by millimeter to ensure you capture the right set of words to copy and paste.
When working with a modeless editor, workflow is filled with interruptions. Working with modal editors has a certain sense of flow to it: you ask the editor to perform actions in a consistent language. With Vim, editing becomes a much more deliberate exercise.