Anyway, I created a solution.

Assuming you have ps2pdf installed (Homebrew ghostscript has it). You can
add a vim_preview file:

#!/bin/sh
psfile=$1
pdffile=`echo $psfile|sed -E 's/(\.ps)?$/\.pdf/'`
ps2pdf $psfile $pdffile
open -a Preview $pdffile

Then, you can add this to your .gvimrc (not .vimrc, as MacVim sources the
global gvimrc, which contains the setting of printexpr, after your .vimrc):

set printexpr=system('/path/to/vim_preview\ '.v:fname_in)\ +\ v:shell_error

:hardcopy will work again.

On Thu, 29 Jun 2023 at 14:19, Yongwei Wu <wuyong...@gmail.com> wrote:
>
> Actually it is not a bug of MacVim.
>
> Using techniques described in
>
>
https://vi.stackexchange.com/questions/6887/where-does-macvim-send-its-printed-files
>
> I have located the file output by Vim. Opening the file by Preview
> does not succeed. A search confirmed this:
>
>
https://www.macrumors.com/2022/10/25/macos-ventura-preview-app-drops-postscript-support/
>
> Anyway, even the result from ps2pdf does not look satisfying to me.
> TOhtml has always been a better solution to me.

-- 
Yongwei Wu
URL: http://wyw.dcweb.cn/

-- 
-- 
You received this message from the "vim_mac" 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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_mac+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_mac/CADs46idbrDC3aTwjQYOS8cA3%2BAO29%2BVB368pVwEpcWw%3DP83eUQ%40mail.gmail.com.

Reply via email to