Getting word_under_the_cursor in Vim command line

Suppose that your cursor is at


Often you would like to do something with that word, but you don’t want to yank it to some register and then paste in the Vim command line mode. Fortunately you can use some shortcut:

  • Go to the command line mode pressing :
  • Press Ctrl rw

Now you can save precious milliseconds. ;)

This protip has been written in 564 seconds