(1)
Download the compressed package uploaded at the end of the article, go to the corresponding Linux machine, and decompress it
(2)
Execute mkdir -p ~/.vim/syntax/ to create a directory
Execute mkdir -p ~/.vim/ftdetect/ to create a directory
( 3)
Execute cp -a pig.vim-master/syntax/pig.vim ~/.vim/syntax/
execute cp -a pig.vim-master/ftdetect/pig.vim ~/.vim/ftdetect/
(4)
Edit vi ~/.vimrc file,
add the following code to it:
- augroup filetypedetect
- au BufNewFile,BufRead *.pig set filetype=pig syntax=pig
- augroup END
augroup filetypedetect au BufNewFile,BufRead *.pig set filetype=pig syntax=pig augroup END
(5) Log out and log in again to take effect: