Vim and Design — my experience using Vim for 1.5 weeks.

Rui Le Gan
Evergreen Reviews
Published in
6 min readJul 13, 2021
Note: What I discuss also applies to neovim, which I also used alongside Vim

I’ve heard about Vim in more than a couple of occasions since I started my journey learning Computer Science. Vim is the best! Real programmers use Vim! Etc (comments exaggerated). I remember the first time — it was in my very first programming course, taught in the C language. My (evil) professor had challenged us to use Vim for the lab test, in which students who used Vim can get 1 mark more (1% of the grade for that test) than those who used the default Visual Studio Code. Muahahaha!

But first, backstory. I’ve always had a fascination with user interfaces and experiences. I enjoyed comparing about different smartphone operating systems mainly for their UIs, examining Windows Phone’s Metro UI, Apple’s Human Interface to Microsoft’s Fluent Design language. I liked teaching seniors about smartphone UIs (during a community service project) and even wanted to study design! Even though I eventually pursued Computer Science, I noticed that I was often more opinionated when it comes to matters involving user experiences. Needless to say, I was always more passionate than others when it comes to user experiences.

However, I had shallow opinions on text-based interfaces then. Truthfully, I only knew a command line interface was even considered a use interface when I started my course!

Back to the professor’s challenge: after taking a glance of Vim, I backed out immediately. It seemed unapproachable and ugly.

How I came to try Vim

As I grew older, I realised that what I once thought was good design was simply nice aesthetics.

‘Design is not just what it looks like and feels like. Design is how it works.’ — Steve Jobs

Steve Jobs’ intuition and focus on design and led to computers becoming accessible to people, and helped it become a part of our daily lives. Beauty on the outside should be matched by beauty on the inside and beauty on the inside was ultimately more important.

Aside from that, I also met Tux.

Tux, the mascot of Linux

Yup, I switched to Linux after being a lifelong Windows user. After a few weeks using Linux and using the command-line interface more for development, I remembered my indirect encounters with Vim and decided to try it.

Learning to use Vim

Fun graph of Learning Curves of Text Editors (may not be accurate) https://habr.com/en/post/440130/

Well, the stories and memes about Vim having a steep learning curve is true. I think, the point where you would want to give up will be within the first 4 days. For me, the first two days were the worst. I felt that I was working for Vim instead of the converse. I couldn’t think too much about the coding logic because I was busy trying to operate Vim. Not surprisingly, my productivity took a plunge. I uninstalled it and switched back to what I was used to and resumed my day. Story over.

Funnily enough, Vim still lingered on my mind. I guess I was still curious about why people seem to love Vim. I felt that I didn’t give it enough time and so, I reinstalled it. I found a website called Vim Genius, which provided fun practices on Vim. It was a game of Vim where you have to improve your reaction time. After practice and a renewed interest, I started flying (at least for normal text editing and input).

Why use Vim?

To me, the question of why use Vim is the question of

why try something when it is has such a steep learning curve?

Take our keyboard layouts as an example. Most of us are used to the QWERTY keyboard layout because we grew to become familiar with it, even though the QWERTY layout is not ergonomic. Hypothetically, we could spend time learning the more ergonomic DVORAK layout and grow to become equally or more fluent in it. However, most keyboards still ship with a QWERTY layout and it costs to buy one with a DVORAK layout. Hence, using DVORAK could not only be more inconvenient, it could also cost more!

But Vim is software that is free and can be installed on any machine. Even in Visual Studio Code, we can find free Vim extensions that allow you to enjoy the all the benefits of Visual Studio Code while using Vim for text input. For programmers, many Linux distributions have Vim preinstalled. It can also be easily used on servers or resource-limited embedded devices, where GUIs might not be an option.

True, the inertia to switch is very high. But, think about the possible value you can get by switching to Vim, especially if you are a writer or a programmer whose work predominantly involve text input. Vim may end up not being the text editor for you, but the few days or weeks trying Vim and potentially finding it better than your usual modes of text input seems to be worth it, considering the number of years you may be spending typing!

Vim vs Mouse + Keyboard

There is no logical conflict in the mouse and graphical user interface being what made computers accessible, and the same mouse and graphical user interface possibly not being the best at keyboard-centric workflows like writing and coding. There is a tool for every task!

Like most users who use Vim, I found that having both hands on the keyboard at all times without needing to reach for the mouse or trackpad intermittently made for fewer disruptions and helped with maintaining my flow state. That’s not to say Vim is better at everything. Here are the two different things each method excels in.

Ergonomics of Mouse Pointer and Keyboard System

  • scrolling
  • text-selection

Ergonomics of Vim

  • no need to hold down keys to use commands (for example, there is no need to hold down the Ctrl/Cmd key while using arrows to jump through words)
  • no need to reach for mouse

Specific Features I enjoy in Vim

Vim has great features that allow us perform common tasks with ease. In normal text editors, we are always in the insert mode, meaning that typing ‘cool’ will cause ‘cool’ to be printed on the screen. On the other hand, Vim has different modes. The most common modes are the insert mode and the normal mode. Keys behave differently in different modes, allowing for more shortcuts and ergonomics (there is no need to hold down a key while pressing another key to perform a command).

Below are a few specific features I find really useful.

  1. Changing (replacing) a word, remainder of a sentence, or line is as easy as using cw, c) and c$ (or C) respectively.
  2. Quickly inserting text at the start or end of a line can be done easily using I and A respectively.
  3. Skipping words in forward and backwards directions using w and b, without holding down Ctrl/Cmd and using the arrow keys.
  4. Changing (replacing) text in parenthesis using ci( or cib.
  5. Deleting a line quickly using dd
  6. Going to the top and bottom of a file quickly using gg and G respectively.

If you are new to Vim, most of the commands might seem like pure memorisation. But these commands are not random and follow a pattern, which you would come to make sense after a while. For example, c means ‘change text’ while $ means ‘end of line’. Combining both gives you c$, which means change text from current position to the end of the line. ib means ‘in brackets’, so cib means change text in the brackets.

Where to go from here?

Vim Genius is one of the websites I used to practice Vim. It’s pretty fun!

My advice is to go install Vim or neovim and play around with it yourself! There are articles, books and websites centred around Vim so there is no shortage of resources on how to use Vim. Try it for a few weeks and switch back if it doesn’t suit you. For me, I’m enjoying Vim and how it plays with a terminal-centric work flow. I think I will be sticking with Vim for a while and continue learning about it.

Till we meet again!

--

--