ultisnips an automatic completion code plug can be installed by Vundle, to enable ultisnips, the following can be written first configuration information to ~ / .vimrc
" Track the engine.
Plugin 'SirVer/ultisnips'
" Snippets are separated from the engine. Add this if you want them:
Plugin 'honza/vim-snippets'
" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
let g:UltiSnipsExpandTrigger="<c-b>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
" If you want :UltiSnipsEdit to split your window.
let g:UltiSnipsEditSplit="vertical"
Please note that I am here set by ctrl + b trigger code completion, because I have a YouCompleteMe plug-in installed, it can be used to trigger tab completion
After configuration, use use in vim: PluginInstall install plug-ins
we can also define your own syntax, format is as follows:
snippet 触发字符 ["代码片段说明" [参数]]
代码片段内容
endsnippet