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 is

makes 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. ce

Cut 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_G

find your location in a file.

4. :<partial command> CTRL_D

show command options. Super helpful for when you are hunting for a special help doc.

5. :'<,'>w and :r

selective 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>G

same 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 ?

Almost forgot!!

8. %
Useful for jumping to and from starting brackets and ending brackets. I have tested it on these characters:
( ) { } [ ] < >
Adding all this to my blog so I don't forget about it.

^^^bookmarked for later enjoyment

@twizzay

@twizzay combination of two of yours:

:r !cmd
Inserts the stdout of command. Quite useful if you want to insert the current date for example.

@fedops

Going to credit you on my blog post for teaching me this one.

@twizzay just learned about :Sex

unfortunately, i'm too old to enjoy it (and have configured NERDTree with ctrl+n shortcut), so...

@tivasyk

lol I am very sorry to hear that.

This is the same thing as `:Se .` right? Just more 'fun'. lol

Also, fun fact, in searching the docs for this command, I discovered `:terminal`

Which splits horizontally and opens a terminal. Pretty cool.
@twizzay ciw to โ€œchange in wordโ€ - effectively deletes word under cursor and leaves you in insert mode.
@patdavid

gonna add this one to my notes.