Re: Plugin cleanup and best practice

2023-06-29 Thread Yee Cheng Chin
You basically either manage plugins yourself, or use a plugin manager like 
vim-plug.

Managing it yourself isn't hard if you know how to use Git. Just make a 
folder ".vim/pack/myplugins/start/" and then you can git clone any plugins 
into that folder you want. "myplugins" can be substituted with any name you 
want. Benefit is that it's simple and you have full control. Annoying part 
is you have to manually keep them up to date. It's not a bad option if you 
only have a few plugins you use.

Otherwise if you use something like vim-plug the benefit is you have a 
vimrc that describes all the plugins you want and it will do the work for 
you in managing them and keeping them up-to-date and selectively loading 
them.

On Saturday, May 6, 2023 at 5:48:34 AM UTC-7 Owajigbanam Ogbuluijah wrote:

> I've come to trust *junegunn/vim-plug 
> * over the years. It's got guards 
> as well to lazy-load if you need.
>
> For the systems disparity you have, you can use Vim's *has()* function to 
> guard what plugins go where.
>
> On Thu, May 4, 2023 at 8:16 PM Daryl Lee  wrote:
>
>> In a galaxy long ago and far away, I struggled with installing plugins an 
>> used pathogen to simplify the process.  Now I am up to Vim 9.0 on both my 
>> M2 Macbook Air and on my Intel iMac.  Vim-Latex works nicely on the Macbook 
>> Air but not on the iMac.  When I did a side-by-side compare of the two .vim 
>> folders, they were grossly different.  I'm on the verge of wiping out all 
>> traces of Vim on both machines and starting clean with the two or three 
>> plugins I really care about.  Where do I find the best documentation for 
>> installing plugins under Vim 9.0? 
>>
>> -- 
>> -- 
>> 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+u...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/vim_mac/12f19e35-3f58-4ae5-b218-1a9c28bc3b6an%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
-- 
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/00d4b7e7-741b-465d-9a73-e25493673819n%40googlegroups.com.


Re: :hardcopy not launching Preview

2023-06-29 Thread Yee Cheng Chin
Actually this was fixed in MacVim, but I have been busy with
different things and traveling and didn't have time to polish up a proper
release which is why you are seeing the issue :(

I pushed out a pre-release build (you can access it in the Advanced
settings or download from the MacVim release page) but I should really get
on to releasing it since it's been like 4-5 months already.

The fix was in https://github.com/macvim-dev/macvim/pull/1390 by using
pstopdf since it's bundled with macoS.

On Thu, Jun 29, 2023 at 1:07 PM Lifepillar  wrote:

> Could MacVim's gvimrc perhaps be updated to include something to this
> effect?
>
> fun! MacVimPrintFile(fname)
>   call system('/usr/bin/pstopdf ' .. fname)
>   call system('/usr/bin/open -a Preview ' .. fname .. '.pdf')
>   return v:shell_error
> endf
>
> set printexpr=MacVimPrintFile(v:fname_in)
>
> Thanks,
> Life.
>
>
> --
> --
> 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/u7ko9l%24khj%241%40ciao.gmane.io
> .
>

-- 
-- 
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/CAHTeOx_ocRZLK5bQDms0cS-oPvoOrg3HqrWi0YE8GTDw-cr7VA%40mail.gmail.com.


Re: :hardcopy not launching Preview

2023-06-29 Thread Lifepillar
Could MacVim's gvimrc perhaps be updated to include something to this
effect?

fun! MacVimPrintFile(fname)
  call system('/usr/bin/pstopdf ' .. fname)
  call system('/usr/bin/open -a Preview ' .. fname .. '.pdf')
  return v:shell_error
endf

set printexpr=MacVimPrintFile(v:fname_in)

Thanks,
Life.


-- 
-- 
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/u7ko9l%24khj%241%40ciao.gmane.io.


Re: :hardcopy not launching Preview

2023-06-29 Thread Richard Mitchell
Advantages of ps2pdf over pstopdf ?

The latter comes with OSX -> /usr/bin/pstopdf
and even got updated on 2023-06-15, so it isn't something 
leftover/forgotten.

On Thursday, June 29, 2023 at 2:57:34 AM UTC-4 Yongwei Wu wrote:

> 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  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/15257408-eb82-45fc-a7d8-37d84fab0e72n%40googlegroups.com.


Re: :hardcopy not launching Preview

2023-06-29 Thread Yongwei Wu
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  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.


Re: :hardcopy not launching Preview

2023-06-29 Thread Yongwei Wu
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.

On Thu, 29 Jun 2023 at 11:58, Kenneth R. Beesley  wrote:
>
> Many thanks for the :TOhtml suggestion.
>
> I now find that "Build-in printing" using :hardcopy is listed under
> "16.  Known bugs/missing features" in the MacVim Reference Manual.
>
> On Wednesday, June 28, 2023 at 8:40:24 PM UTC-6 Yongwei Wu wrote:
>>
>> I can reproduce this behaviour on Ventura.
>>
>> I would suggest a workaround. You may use ":TOhtml", and then print
>> the HTML file from a browser.

-- 
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/CADs46ieZGrLYGYNyNsOJqM-49v2yuOjAx%3DjY%3D8SU9D8bn9H%2BzA%40mail.gmail.com.