Today I Learned

DeViloping

July 19th, 2018

I'll call my Vim skills subpar and leave it at that. In fact, I would say that about my keyboard shortcut skills in general. When I see a programming keyboard ninja fly through lines of code without so much as glancing at their mouse, I feel like I'm witnessing magic.

This doesn't mean I can't use Vim at all. When you're trying to edit a nginx.conf file on a t2.micro EC2 instance, installing Sublime isn't exactly an option. Still, it's slightly embarrassing having someone over your shoulder watching you hold down to backspace key for three minutes.

So I'm going to try some more Vim, a few shortcuts at a time.

Keys act normally in "INSERT" mode (press the "i" key). Most of the useful new shortcuts I'm going to learn are in the normal mode (press the "esc" key).

Today's commands:

  • j moves one character left
  • l moves one character right
  • k moves one line up
  • j moves one line down
  • w moves one word forward, 3w moves 3 words forward
  • b moves one word backward, 3b moves 3 words backward
  • 0 moves to the front of the line
  • $ moves to the end of the line
  • gg moves to the first line
  • G moves to the last line

Resources for future reference

results matching ""

    No results matching ""