home archives github knives links
tags vim latex mac
categories
only title title and content
mactex配置

mac安装gvim

brew install macvim

转移.gvimrc

安装vim-latex

自行从sourceforge下载

修改配置

~/.vim/ftplugin/latex-suite/texrc

CSDN

vimrc

启用vim-latex

简书

解决\lv报错

sourceforge

In Vim, just type :echo(has("unix")) and :echo(has("macunix")) 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