Honing your tools
It’s pretty common to see craftpeople creating tools for themselves for a variety of reasons. Maybe it’s because the exact tool they need doesn’t exist; perhaps a slight modification to a tool would help fit their style more.
Whatever the case, I want to assert that this happens often. This is why I like to take time to learn about text editors from the ’70s. I take no stance on the whole Emacs v. Vim thing; it’s a pretty silly thing to argue about. Plus, my setup is running Spacemacs, a version of Emacs focused on Vim keybindings, so I am not even sure how to categorize that one.
I’m not particularly new to the app actually. I’ve been slowly configuring it to my liking as I learn about new features. As someone who spends a lot of time editing text files, I don’t mind honing my knowledge of this tool.
The Vim way?
So on that note, I watched Mastering the Vim Language by ThoughtBot on YouTube and took some notes.
If you think of Vim as a language, then the commands can be thought of as a “verb” + “noun” couple. It also helps that the keybindings are more or less abbrieviations of the action or phrase they represent.
Some Keybindings
Key | Action |
---|---|
c | Delete and enter Insert mode |
> | Indent |
< | Outdent |
y | Yank (copy) |
w | Move forward a word |
b | Move backward a word |
iw | “Inner Word”: Targets the word you are in |
it | “Inner Tag”: Targets the HTML tag you are in |
ip | “Inner Paragraph” |
as | “A Sentence” |
f | Find the character you type, puts cursor on the character |
t | Find the character you type, puts cursor before the character |
F | f, but going backwards |
T | t, but going backwards |
/ | Search forwards |
? | Search backwards |