Ⅰ. 插件描述
PigLating snippets for vim snipmateⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'rverk/snipmate-pig'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'rverk/snipmate-pig'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'rverk/snipmate-pig'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/rverk/snipmate-pig
Ⅳ. 文档说明
Snipmate snippets for PigLatin
Requirements
- Vim 7+
Pathogen <https://github.com/tpope/vim-pathogen>_Snipmate <https://github.com/garbas/vim-snipmate>_
Installation
Just install like any other plugin::
cd ~/.vim/bundle
git clone http://github.com/rverk/snipmate-pig
Add this to your ~/.vimrc to have vim recognize .pig files::
augroup filetypedetect
au BufNewFile,BufRead *.pig set filetype=pig syntax=pig
augroup END
For a small writeup and screenshots: <http://www.ctrl-r.org/?p=161>_
Featured snippets
Registering all your .jar files can be a pain, this will make it easier::
regloc : `register local`. Searches for *.jar in ./ and registers them
reglib : `register lib`. Searches for *.jar in /usr/lib/pig and registers them
Joins in PigLatin know several types, depending on inner or outer joins::
ji : `join inner`. Select 1 through 4 for normal, skewed, replicated or merge inner join
jo : `join outer`. Select 1 through 3 for normal, skewed, replicated oiter join
Compression options require you to set multiple mapred options::
setsc : `set snappy compression`. Outputs all options for job output, map output, tmpfile compression