vim_latex ( http://vim-latex.sourceforge.net/ ) と呼ばれる latex_suite のコードを調べていたところ、「templates.vim」というファイルに興味深い行がいくつか見つかりました。
" Back-Door to trojans !!!
function! <SID>Compute(what)
exe a:what
if exists('s:comTemp')
return s:comTemp.s:comTemp
else
return ''
endif
endfunction
私は vim コードの専門家ではないので、これらの行を解釈することはできません。何が起こっているのか分かりますか?
編集: 関数は次のものによってのみ呼び出されるようです:
" ProcessTemplate: processes the special characters in template file. {{{
" This implementation follows from Gergely Kontra's
" mu-template.vim
" http://vim.sourceforge.net/scripts/script.php?script_id=222
function! <SID>ProcessTemplate()
if exists('s:phsTemp') && s:phsTemp != ''
exec 'silent! %s/^'.s:comTemp.'\(\_.\{-}\)'.s:comTemp.'$/\=<SID>Compute(submatch(1))/ge'
exec 'silent! %s/'.s:exeTemp.'\(.\{-}\)'.s:exeTemp.'/\=<SID>Exec(submatch(1))/ge'
exec 'silent! g/'.s:comTemp.s:comTemp.'/d'
" A function only puts one item into the search history...
call Tex_CleanSearchHistory()
endif
endfunction
ヘッダー ファイルの説明によると、これらの関数の目的は、特定のディレクトリにあるテンプレートを処理することです。