Ⅰ. 插件描述
MacPorts Portfile Vim plugin. Git-svn clone of http://svn.macports.org/repository/macports/contrib/mpvim. BSD licensed according to its own Portfile.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'jstrater/mpvim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'jstrater/mpvim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'jstrater/mpvim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/jstrater/mpvim
Ⅳ. 文档说明
=== About mpvim
mpvim adds MacPorts support to vim. This currently includes syntax coloring for
Portfiles and running lint from vim.
=== Manual installation
Run 'make install' or copy the files in this directory into ~/.vim.
=== Installation via MacPorts
Run 'sudo port install mpvim'; the files will be placed into
share/vim/vimfiles under the MacPorts prefix (/opt/local by default).
=== Usage
- :make runs 'port lint' on the Portfile in the current buffer
- :MPpatch <url> applies the patch located at <url> to the Portfile
in the current buffer and shows the differences with vimdiff. Also
automatically fetches the patch format in case the diff is on trac.
- add 'let g:portfile_highlight_space_errors=1' to your .vimrc to highlight mixed
spaces and tabs in Portfiles as errors mpvim supports snipMate (http://www.vim.org/scripts/script.php?script_id=2540)
- "new<Tab>" in a new buffer named Portfile will create a new
Portfile skeleton. Subsequent <Tab>'s will cycle through the variables.
- "new<Tab>" in a new buffer named Portfile will create a new
More snippets are available for variants, build phases etc. Take a look
at snippets/portfile.vim for the complete list