Just completed the #vim tutorial
$ vimtutorial
Didn’t even know it existed until I stumbled across it in the help documents.
Some cool things I learned:
1. :set hls ic ismakes it so that when you search partial highlights are made as you type, case is ignored and results are all highlighted. super useful. Added to my .vimrc
2. ceCut to end of word Simple little command that I think I knew existed but never really absorbed until I actually read about it and practiced it.
I had been using dwi to accomplish the same thing: delete a word and insert.
3. CTRL_Gfind your location in a file.
4. :<partial command> CTRL_Dshow command options. Super helpful for when you are hunting for a special help doc.
5. :'<,'>w and :rselective write out and retrieve commands.
YOU CAN SAVE A SELECTED PART OF A FILE AS A NEW FILE.
Then, when you so desire, you can retrieve the contents of any file with the retrieve command and paste them under your cursor.
6. <num>Gsame as :<line number>.
Jumps to a line in vim.
7. :!<shell command>Executes a shell command. I knew about this one. Still have yet to really try it. Might come in handy more often when writing Python
and I want to execute a file after editing it without opening a new terminal.
Altogether, I think it was time well spent.
What are your favorite #vimtricks ?
