Using MacVim 8.1.1722, if I print a buffer, it opens a PDF in Preview.app. I want to open the PDF in Google Chrome instead. So I changed the file association so
open foo.pdf opens Google Chrome not Preview.app. And then I set my
printexpr in MacVIM as follows:
se printexpr=system('ps2pdf\ '.v:fname_in.'\ '.v:fname_in.'.pdf\ &&\ open\ '.v:fname_in.'.pdf')\ +\ v:shell_error
And using the above
printexpr, it does what I want.
The problem is when I try to persist the above setting in
$HOME/.vimrc. It doesn't take effect, upon restarting MacVim,
printexpr still has the default value of
se printexpr=system('open\ '-a\ Preview\ '.v:fname_in)\ +\ v:shell_error
But if I set other related options, such as
se popt, in
$HOME/.vimrc, it does take effect. Also, the command line
vim (VIM 7.4 shipped by Apple as part of macOS 10.12.6) does pick up the printexpr from that file.
So, how do I get my
printexpr setting to persist?