1. 到http://www.vim.org/scripts/script.php?script_id=2186下载pig.vim
2. copy pig.vim file into your ~/.vim/syntax/ directory;
3. add the following three lines to your ~/.vimrc file:
augroup filetypedetect
au BufNewFile,BufRead *.pig set filetype=pig syntax=pig
augroup END