Saturday, October 27, 2012

Re: Syntax highlighting colors if :hardcopy call from vim, hugly bold if call from the shell

On 26/10/12 21:41, Luis wrote:
> Hello
>
> To make a .ps file with python code with syntax color I use:
>
> :hardcopy > %.ps
>
> That work well !
>
> But if I use it from bash:
>
> $ cat hardcopy.vim
> :hardcopy > %.ps
> $ vim -e -s my_code.py < hardcopy.vim
>
> I get a my_code.py.ps file with no color but hugly bold instead colors syntax highlight
>
> Luis
>

Try

echo 'x' >> hardcopy.vim
vim -S hardcopy.vim my_code.py

Or you could edit hardcopy.vim, add a line with x (or q) and optionally
remove the colon before :hardcopy.

IIUC, Vim will open and close, and give you the desired output.

-S filename tells Vim to source another file at the end of startup, in
addition to your vimrc (or -u file) which is sourced at the beginning of
startup.

See :help -S


Best regards,
Tony.
--
ARTHUR: Listen, old crone! Unless you tell us where we can buy a shrubbery,
my friend and I will ... we will say "Ni!"
CRONE: Do your worst!
"Monty Python and the Holy Grail" PYTHON (MONTY)
PICTURES LTD

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: