Try something like this:
:syntax match Error "yourterm"
or (to ignore case and match "Yourterm", "YOURTERM", "yourTerm" etc.):
:syntax match Error "\cyourterm"
... and print with hardcopy - the term should be highlighted using the Error highlight rules. (see also this).
Here's a pdf sample printed from my vimrc, using :syntax match Error "Plug":
If the ...
The loss of kprinter in the move to kde4 was one of the reasons I stuck with kde3 for as long as I could.
After some searching, I found this "3rd party" replacement: http://kde-apps.org/content/show.php/KPrinter4?content=163537, https://github.com/credativ/kprinter4.
It looks like you have to compile it yourself (Its not included in distros since it isn't ...
From :help popt-option:
formfeed:y When a form feed character is encountered, continue
printing of the current line at the beginning of the
first line on a new page.
add the line below to your vimrc:
insert a form feed where you want your page break to occur with <C-l> in insert mode,
From :help pexpr-option:
Expression that is evaluated to print the PostScript produced with
The file name to be printed is in v:fname_in.
It's a bit of a hack, but you can simply echo the v:fname_in variable to a file:
:let &printexpr = "system('echo '.v:fname_in.'>> /home/martin/hardcopy')"
And then examine the created ...
I found it using lsof:
And then I found the other files alongside it using find:
find /private/var/folders/cr/jsb8dl_50lbdy05hj7v2l9wr0000gn/T/com.apple.Preview -type f
I still don't know why it was put here, but at least I found it.
Send the buffer to the browser by converting to HTML, then print from there:
:TOhtml | w | !open -a Safari %
For example I have this in vim:
If I type
I get this:
But when I send it to the browser I get this (with color scheme!):
I have this in my .vimrc, which deletes the new html buffer and stored file:
nnoremap <F2> <ESC> :TOhtml &...
Per this Stackoverflow:4586628 Q/A, How do you pipe a vim buffer through lpr?, I have this entry in my ~/.vimrc:
nmap PpP :%w !lpr -o lpi=8 -o cpi=14<CR><CR>
that replaces my old entry,
nmap PpP :ha<CR>
(:ha = :hardcopy).
Using :ha, Neovim was not printing Greek letters, ... even though my (Arch Linux) locale was
Just for the sake of completeness: If kprinter4 doesn't work, you can also make a parallel installation of (relevant components of) Trinity KDE (TDE) desktop, which is available in some distros such as Debian or Arch. Then you can use good old kprinter instead of kprinter4:
I tried with your very own settings and I encountered no issue. If I understand the help correctly, by default Vim will use A4 as the medium size; maybe your output gets on a smaller medium size than A4? Could you try to add something like: paper:letter in your printoptions. Does it change something? What exact size of medium are you using?
I worked it out myself. I need to add the setting to $HOME/.gvimrc as well.
If the setting is in $HOME/.vimrc, then MacVim overrides it. If the setting is in $HOME/.gvimrc, then MacVim doesn't override it.