39 min read / 3 for this part
VIM diary
Part: 1 | 2 | 3 | 4 | 5 | 6 | 7
While learning the basics of Vim over the course of a few months I kept a simple diary. I recorded what I had been Googling for and what I'd learned during my struggles.
# October 2023
Learning stepped-up a bit this month.
I put a lot of evening time into Vim Snake, as well as deliberately practicing actual typing. I had slowly realised that my unconventional finger habits were not a very good fit for proper home-row typing, which is what Vim really demands.
I had no idea how wildly wrong-handed my typing habits were. I had compensated for this over the years with peculiar and uncomfortable stretches I barely noticed myself doing. If learning Vim gives me nothing else, it has at least revealed one of the ways I've inflicted myself with RSI.
Now that I started to focus on this, my average words-per-minute dropped dramatically, but picked up over the month.
As for practicing Vim, by the second week of October I had Googled for cheat-sheets, plugins I didn't install, how to close the Netrw buffer, word-wrap, column markers, whither HJKL, and most importantly, I shopped around for colour-schemes.
I also watched a video on how to do 90% of what plugins do with just Vim. It covers the following topics:
- Fuzzy File Search
- Tag jumping
- Autocomplete
- File Browsing
- Snippets
- Build Integration
In reading about buffer management vs. tabs I learned that
tabs are not used in quite the same way as in VSCode: buffers, splits,
markers, and the jump-list offer so much that the requirement for tabs is
something quite different in Vim. A tab is more like opening a second VSCode workspace
than a second file.
I tried looking up what the QuickFix window was. I didn't understand it, and it would take me until the New Year before I would start using it regularly.
Around the middle of October I installed Neovim and went immediately into
trying out the LazyVim distribution. It
was a nice exercise to see just how far configs and plugins can take you, but
ironically it was also what motivated me to keep going with rolling-my-own
.vimrc with standard Vim. I didn't really know what was going on in LazyVim,
and that felt like the wrong way to learn.
The last week of October was information overload, although in an odd way I thought I was starting to get the hang of things (I wasn't.)
# Commands Learned
- Looked into how to use Buffers,
:bn:bp^etc. - Searched "word wrap"
:set no/wrap - Searched "column markers"
- Looked into window splits
- Resizing splits
- Looked up duplicate line
:copy/:t - CTRL+A/X in normal mode, pressing
gbefore while in VISUAL mode to bump all numbers in the selection - How to paste to/from system clipboard with
"+ - Insert the date using
:r!date - Learned Vim has built-in line sort, can work with ranges, selection
- Moving a line to another line
- navigating in/out of the jump list
<c-i>and<c-o> - Restore previous selection with
gv - Navigating up/down wrapped lines with
gjandgk - tpope's vim-abolish can do case-sensitive replace with
S/... - Wrap lines with
gq, unwrap withJ
31 Oct, 2023