VIM的snipMate的继承设置

打开\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
	endfor
endf


设置.jsp文件,继承.html 与 .js的自动补全

		elseif ft == 'jsp' 
			call s:DefineSnips(a:dir, 'html', ft)
			call s:DefineSnips(a:dir, 'javascript', ft)

你可能感兴趣的:(vim,snipmate,snipMate继承)