打开\vimfiles\plugin
目录下的snipMate.vim
文件,找到函数GetSnippets
(大概在100
行左右)
fun! GetSnippets(dir, filetypes) for ft in split(a:filetypes, '\.') if has_key(g:did_ft, ft) | continue | endif call s:DefineSnips(a:dir, ft, ft) if ft == 'objc' || ft == 'cpp' || ft == 'cs' call s:DefineSnips(a:dir, 'c', ft) elseif ft == 'jsp' call s:DefineSnips(a:dir, 'html', ft) call s:DefineSnips(a:dir, 'javascript', ft) elseif ft == 'html' call s:DefineSnips(a:dir, 'javascript', ft) elseif ft == 'xhtml' call s:DefineSnips(a:dir, 'html', 'xhtml') endif let g:did_ft[ft] = 1 endforendf
设置.jsp文件,继承.html 与 .js的自动补全
elseif ft == 'jsp' call s:DefineSnips(a:dir, 'html', ft) call s:DefineSnips(a:dir, 'javascript', ft)