What Is Distributed Ledger Technology?August 12, 2021
How To Connect Your Forge Remote Database In DBeaverAugust 30, 2021
As a software developer/engineer you'll likely spend a lot of your time in the command line. Whether you're in a secure shell on a virtual machine, or cruising around your local filesystem you'll generally have access to Vim. But what is Vim? Vim is a text editor, that's it. It's akin to notepad on your Windows box, or TextEditor for Mac OS. Vim however doesn't come with a GUI, which is why I started off this blog post talking about being in the command line. Vim allows you to open and edit text files from within your terminal. Additionally, Vim is nearly ubiquitous. This means you'll be able to use it pretty much regardless of the OS on the box you're perusing.
Vim was designed with the maxim that most people spend their time editing text, and not actually writing new text. As a software engineer I can attest to this being a fact, and not just the Vim team's opinion. Vim's solution to this? Not letting you use the mouse. While you're typing you're almost certainly using both of your hands to manipulate the keyboard. If you have to use the mouse those are precious seconds wasted just moving your hand off the keyboard to the mouse. Not even counting the time it takes your eyeballs to rove around the screen trying to locate the graphical element you'd like to click on with your mouse. This is combatted to some extent by providing shortcut keys, like ctrl + c or ctrl + v.
In Vim there are multiple modes that the text editor can be in. Such as "visual", "insert", or "normal". Each mode allows you to perform different tasks, and will alter the key-bind functionality slightly. In insert mode for example your key-bindings just put characters on a screen, while normally almost every key will have some other kind of functionality. "dd" for example will delete your current line, "u" will undo your last action, and "i" will take you to "insert" mode. You can traverse the text using the arrow keys, but that requires moving your hand slightly, thus losing precious seconds of editing time. A Vim guru will use the "h", "j", "k", and "l" keys to perform this task instead.
This makes Vim a very powerful tool, albeit one that is not particularly easy to master. Enter Vim Adventures, a fantastic little RPGesque game in which you traverse the world as a Shadowy Cursor. In your adventures you'll sequentially learn different key bindings to help the NPCs you encounter along your path. Overcoming obstacles, finding keys and treasures, and also speed-running through certain sections. I've played all the free content on Vim Adventures which was extremely valuable, and also very enjoyable. You only get access to a couple of levels, but I guarantee you that even that little taste will go a long way in increasing your Vim mastery. Everything past level 4 or so requires some form of license. There is a company license available, and you best believe I will be speaking to the head honchos at LLL to grant us access.