How do I use the name of the current file in the command mode or an

ex command line? In the command line, the ‘%’ character represents the name of the current file. In some commands, you have to use expand(“%”) to get the filename:

    :!perl %

Another example is to load the latex generated pdf file from the file you are currently editing:

    :!xpdf %<.pdf

Comments (1)


Pepsh Pepshinsky

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


Speak Your Mind