处理 function SetTitle 时发生错误:
第 9 行:
E118: 函数的参数过多: line
E116: Invalid arguments for function append
请按 ENTER 或其它命令继续
请问这个怎么处理
# 自动加入文件头, 编辑 vim /etc/vimrc 文件
autocmd BufNewFile *.py,*.sh, exec ":call SetTitle()"
let $author_name = "Hello"
let $author_mail = "Hello@163.com"
func SetTitle()
call setline(1, "\#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++")
call append(line("."), "\# FileName:".expend("%"))
call append(line(".")+1, "\# Author:".$author_name)
call append(line(".")+2, "\# Email:".$author_mail)
call append(line(".")+3, "\# CreateTime:".strftime("%C"))
call append(line(".")+4, "\#------------------------------------------------------------")
if &filetype == "sh"
call append(line(".")+5, "\# !/bin/bash")
else
call append(line(".")+5, "\# !/bin/python")
endif
call append(line(".")+6, "")
autocmd BufNewFile * normal G
第9行 末尾应该加'号