Vim Tips Wiki
We recommend that you log in before editing. This will allow other users to leave you a message about your edit, and will let you track edits via your Watchlist. Creating an account is quick and free.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 13: Line 13:
 
|category2=
 
|category2=
 
}}
 
}}
βˆ’
I have found it undesirable to use <code>:hardcopy</code> directly because it uses the current syntax highlighting to determine how to print the text. For example, I like to print comments in italics, but I don't like italic fonts on the screen. This tip will show you how to set up a colorscheme for printing and use it only when you print. This assumes that you are already using a colorscheme.
+
I have found it undesirable to use <tt>:hardcopy</tt> directly because it uses the current syntax highlighting to determine how to print the text. For example, I like to print comments in italics, but I don't like italic fonts on the screen. This tip will show you how to set up a colorscheme for printing and use it only when you print. This assumes that you are already using a colorscheme.
   
βˆ’
I copied an existing colorscheme to <code>~/.vim/colors/print.vim</code>, and changed all the lines like this:
+
I copied an existing colorscheme to <tt>~/.vim/colors/print.vim</tt>, and changed all the lines like this:
 
<pre>
 
<pre>
 
highlight Normal ctermbg=DarkGrey ctermfg=White guifg=White guibg=grey20
 
highlight Normal ctermbg=DarkGrey ctermfg=White guifg=White guibg=grey20
Please note that all contributions to the Vim Tips Wiki are considered to be released under the CC-BY-SA
Cancel Editing help (opens in new window)