Title photo
frugal technology, simple living and guerrilla large-appliance repair
Sun, 16 Apr 2017

Sharpening my Vim skills in the Windows Subsystem for Linux

I've always been able to get around in Vim, and before that vi. But it hasn't been my primary editor (except in college, where it was my only editor).

In my Linux systems over the last many years, I've gravitated toward Geany and Gedit, mostly using Geany, and using the terrific Notepad++ on Windows.

Now that I am using the Windows Subsystem for Linux (aka Bash command line supplied by Ubuntu), I have the full range of editors available in the Linux console. For whatever reason or reasons, I'm not an emacs person, and I'm not afraid of modal editing, so Vim it is.

This gives me the opportunity to really learn Vim. Already I'm figuring out things in Vim's command mode, like w taking you from word to word and stopping on the first letter of each word, with e doing the same except stopping on the last letter.

Typing gg in command mode gets you to the top of a file, and G (and also L) gets you to the top of the final line. G$ gets you to the end of the final line.

x deletes a single character, dw deletes a word, dd deletes an entire line and d$ deletes from the cursor to the end of the line.

It's nothing like a "standard" GUI editor, but a lot of it falls right under the fingers. While I have used an adm3a terminal, it's been long enough that I didn't know the reason for using the esc key to change from insert to command mode was the placement of the esc key on the adm3a -- where the "modern" tab would be.

To make it easier to change modes, I don't want to remap tab as esc but could try remapping caps lock as esc, or using ctrl-[, ctrl-c or alt-space as esc alternatives. Thus far it doesn't look like remapping caps-lock in the WSL is all that easy.