I am using Debian 9 and am running Vim in Xfce4 Terminal. I would like to print to hardcopy, :ha or :hardcopy without printing the header. By default the header has the file name and page number at the top. However, I do not want my pages to have any header information on them.


This will make the header blank. There has to be a space following the backslash. Otherwise it will print a backslash as the header.
:set printheader=\

  • 1
    :let &printheader = " " is an alternative method of setting the same value that is arguably slightly easier to read because it makes the whitespace more obvious.
    – Rich
    Feb 15 '18 at 16:00
  • @Rich Thanks. I just tested that, and it works as well. In my answer there is actually no space after the backslash because the code highlighting on Stack Exchange trims trailing white space.
    – jbrock
    Feb 15 '18 at 16:12
  • 1
    Better for copy and paste then, too! :D
    – Rich
    Feb 15 '18 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.