As I mention on my previous post, Vim is simple but powerful editor. There are so many shortcuts, key combinations and tricks to perform a better experience. As I am still learning to be familiar with Vim, so I write this post to remind me about several cool tricks of Vim.
Search for all occurrences of word under the cursor.
Change word under cursor
Delete everything inside “” string and start insert mode
Quit Insert mode (sometime, faster than ESC)
Reverts the document back to how it was 15 minutes ago. Can take various arguments for the amount of time you want to roll back, and is dependent on undolevels. Can be reversed with the opposite command :later
Indents the block between two braces
Repeat previous command
Accessing windows clipboard buffer
Saves the current buffer if it has been modified
Export current document as HTML formatted
Sort a selection of text or an entire whole file
Builtin buffer explorer
:r!
Dump the output of the command into your current document
Perform replace all
Look at your :[command] history
Convert tabs to spaces
There are another super awesome vim tricks that you can read here and here. Also read Vim Recipes that freely available on various formats.
Hi.. I am Alif Rachmawadi. As a web developer, I love to build web application using