Tech and travel

Inserting the current filename in Vim

2006-11-02

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

Copyright (c) 2024 Michel Hollands