In Vim, just type :echo("hasunix") and :echo("hasmacunix") to check the value
of these settings. The Mac OS X bundled Vim declares itself only as unix, while
MacVim declares itself as both unix and macunix. MacVim is also compiled with
more options, like ruby support, and it provides a GUI (the VimLatex menus can
be handy) and better OS integration (like simple copy/paste between Vim and
other apps). But make sure to use the latest snapshot on Snow Leopard, as the
stable is not stable :)
Generally, its better to set options in .vimrc (in your home folder) than
modifying vim-latex itself, since that makes updating vim-latex easier. Just put
let g:Tex_ViewRule_pdf = 'open -a Preview.app'
in your $HOME/.vimrc (~/.vimrc that is). If you need to detect mac (say you
want to sync the .vimrc between different computers), don't rely on
has("macunix"), but use something like this:
if has("unix") && match(system("uname"),'Darwin') != -1
" It's a Mac!
let g:Tex_ViewRule_pdf = 'open -a Preview.app'
endif
Dan Michael
Den 16. mai 2010 kl. 07.53 skrev Bayard Randel:
> I ended up resolving this issue by uncommenting
>
> TexLet g:Tex_TreatMacViewerAsUNIX = 1
>
> and setting the following explicitly:
>
> TexLet g:Tex_ViewRule_pdf = 'open -a Preview'
>
> I tried Gianluca's solution, but the problem continued to persist.
>
> Hope that helps anyone that has been stuck getting the latex suite working in
> OS X.
>
> thanks
>
> On 16 May 2010 15:24, David Reed <[email protected]> wrote:
> I was hopeful that this would solve the problem. I have been able to compile
> but this was with some combination of files in certain locations that I
> cannot figure out.
>
> I appreciate the help though.
>
> On Sat, May 15, 2010 at 8:48 PM, Gianluca Meneghello <[email protected]>
> wrote:
> I had the same problem, but I'm not an expert so I'm not sure this is
> the correct solution.
>
> In the texrc file (probably in your
> $HOME/.vim/ftplugin/latex-suite/texrc) there are a couple of
> "has:('macunix')" entries, one for the viewer and one for the
> compiler.
>
> I solved the problem by replacing it with "has:('unix')".
>
> It seems vim on Mac OS X declares itself as unix and not macunix (I
> suppose macunix was on some older Mac OSs, but I'm not at all sure
> about that).
>
> If someone has a better explanation for this I'm really curious to know!
>
> Hope it can be useful
>
> Gianlu
>
> PS: I've seen there are some "macunix" also in compiler.vim
> ($HOME/.vim/ftplugin/latex-suite/compiler.vim). So far I did not touch
> them, but I think it can be something similar.
>
> On 16 May 2010 01:58, Bayard Randel <[email protected]> wrote:
> > The \lv command returns the following error on a clean install of
> > latex-suite on OS X 10.6.3:
> >
> > Error detected while processing function Tex_ViewLaTeX:
> > line 34:
> > E121: Undefined variable: s:viewer
> > E116: Invalid arguments for function strlen(s:viewer)
> > E15: Invalid expression: strlen(s:viewer)
> >
> > Any help would be appreciated, thanks.
> > ------------------------------------------------------------------------------
> >
------------------------------------------------------------------------------
_______________________________________________
Vim-latex-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vim-latex-devel