How do I insert the name of the current file into the current buffer?

There are several ways to insert the name of the current file into the current buffer. In insert mode, you can use the <C-R>% or the <C-R>=expand(“%”) command. In normal mode, you can use the “:put =@%” command.

Comments (1)


Pepsh Pepshinsky

Let’s see you to :help viminfo-file-name (option -i) :set viminfofile=NONE


Speak Your Mind