Skip to content

Inserting the current filename in Vim

To insert the current file name in Vim, go to insert mode. Then type Control-R % . With Control-R you can do more things :

   Control-R =5*4

This inserts 20 into the current cursor position.

Some examples can be found here

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*