Skip to content


Vim tip: quickly insert current filename

I don’t need this functionality very often, but when I do, it’s nice to have a quick and easy way to do it. In order to insert the current filename, while in insert mode press Ctrl-r%.

Via vim users mailing list.

Posted in All.


One Response

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Continuing the Discussion

  1. Al Hoang » Insert the current filename into current edited file in vim linked to this post on March 12, 2009

    [...] to blog post for the tip! Share and [...]



Some HTML is OK

or, reply to this post via trackback.



Rss Feed Tweeter button Facebook button Reddit button Linkedin button Delicious button Digg button Flickr button Stumbleupon button Youtube button