Wednesday, October 26, 2011

Vim Registers Current File Name

So you guys may remember how I was all obsessed with vim registers a few months ago. Well, today I was typing away at some things and while in insert mode, I wanted to splat the name of the file I was currently editing. So I took a risk:

Ctrl+R %     # i.e. Access register %, which holds the name of the current file.

result: the name of the file pasted in!

Pretty cool. 

No comments:

Post a Comment