In insert and command mode, <Ctrl-r> followed by a sequence inserts an object.
<Ctrl-r>
Insert mode usage mainly deals with manipulating registers. However, in command mode, <Ctrl-r><Ctrl-*> inserts special objects for certain *:
<Ctrl-r><Ctrl-*>
*
F: Current filename under cursor
F
P: Current filename with expanded path under cursor
P
W: Word under cursor
W
A: WORD under cursor
A
L: Line under cursor
L
For more, :help c-^r.
:help c-^r
Very useful with :Ag, or when doing find/replace.
:Ag
:Ag <Ctrl-r><Ctrl-w> :%s/<Ctrl-r><Ctrl-w>/replacement-string
Last updated 4 years ago