autocmd BufNewFile *.py exec ":call SetTitle()"
func SetTitle()
call append(0,"#! /usr/local/python2.6/bin/python")
endfunc
后面不能加分号
autocmd 带有 exec 关键字
autocmd vimcmd filetype exec func
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。