Linux Up Skill - Day 6
Lesson six from the Linux Up Skill Challenge is covering vim. I am thankful for this lesson. Everyone has a different preference for an editor and so I’ve always just followed along with whatever is used by the person describing the solution. I have no real preference at this point and it will be nice to dig further into vim.
The lesson starts off explaining the two different modes in vim, normal and insert. Then it jumps into selecting a document to edit.
cd pwd cp -v /etc/services testfile vim testfile
With the file open the first skill the lesson covers is to type :q!
to quit without saving changes. Going back into the file to continue the lesson. We go over moving around the file with the h
j
k
l
keys and/or the arrow keys. Then while in normal mode we use the command 33dd
to delete 33 lines of text! Then while in normal mode we use the u
command to undue the deletion. Wow!
The lesson then goes through a number of useful commands such as G
, gg
, searching with /
, cutting and pasting, as well as inserting additional text. A wonderful refresher course on vim. At the end of the lesson they speak about vim being the de facto editor for system administrators since it is always installed. It recommends running vimtutor
which I quickly run through.