vim /etc/vimrc不要去看有没有这个文件在里面写:function HeaderPython()call setline(1, "#!/usr/bin/env python")call append(1, "#-*- coding:utf8 -*-")normal Gnormal onormal oendfautocmd bufnewfile *.py call HeaderPython()
……你先确定是不是insert模式
有没有先按i或a?