Learning Vim
So, I have started to try out using vim.
After almost 10 years (8 and a bit) of using a standard IDE, with a hint of nano, I've finally started to get used to vim.
The main reason for this is because I have been using nano as my in-terminal text editor ever since I started to learn how to use the terminal. However, recently I have been trying to do some very simple edits to some basic files, such as compose.yml for my docker compose, but find myself unable to do what I want easily.
I've also discovered that there is the vimtutor program built-in to the terminal to help learn it.
So, in order to put my skills to the test I am writing and editing this piece in vim alone.
One thing that caused me a bit of grief, was just trying to figure out how to insert the #, thinking it was a vim thing. Turns out it's a setting in iTerm2 that alters the action of the left-option key, so my UK-Mac keyboard was not playing ball as usual.
Initially I found the navigation a bit weird, for example the 'arrow' keys are h (left), l (right), and j and k which are obviously down and up respectively. But, after playing and practicing with vim a bit, I think that 'j' for down actually makes a bit of sense.
I want to look into Neovim next and how that differs from standard vim. One thing I would like to add is the relative line numbers for better navigation. But to start with, plain vim to practice is fine.
Who knows what I might have just unleashed on myself, just before the rise of AI, I've finally began to climb the big mountain of vim.
5 minutes post-publishing Jake here, turns out enabling relative line numbers in vim is as easy as :set rnu, and can be combined with :set nu rnu to show the current line number. Although these commands are for a single session, ~/.vimrc can be updated with these commands to set it for each session.
- ← Previous
A Lick of Paint