A funny thing about life is that the worst video I’ve ever made (about the vi/vim editor) now has over 175,000 views.
Way back when I lived in this low-income apartment complex in Wasilla, Alaska — technically I had no income at the time, and it’s ridiculously hard to find a place to live in Alaska in the summer — and spent as much time as I could meditating in the mountains, I created a vi/vim editor video tutorial and put it on YouTube. I just noticed that video has now exceeded 200,000 views. It feels a little weird to think that over 200K people have started to learn vi/vim from that video.
A funny thing about making that video is that the walls in that apartment complex were paper-thin. I could hear everything my neighbors did in their apartments (use your imagination and you won’t be wrong), and they could hear me, so I intentionally tried not to talk too loud in the video. I had to edit the video at several points to crop out some of my neighbors yelling at each other.
vim autoindent FAQ: How do I configure vim to automatically indent newlines? That is, if my current line is indented three spaces, and I hit [Enter], I want the next line to autmatically be indented three spaces as well.
To configure vim autoindent, just use this vim command:
vim delete FAQ: How do I delete a line in vim? (Also, how do I delete multiple lines in vim?)
To delete the current line in your vim editor, use this command:
You can use this same command to delete multiple lines in vim. Just precede the command by the number of lines you want to delete. For instance, to delete five lines in vim, use this command:
vi/vim FAQ: I keep getting these vim swap/temporary/backup files in my current directory, the ones with the tilde (~) character at the end of the filename; how do I get these swap/temporary files to go into another directory?