From eecb794fa4ab6f38aa7c0b61f39ea10a399b572f Mon Sep 17 00:00:00 2001 From: "Ein Verne(einverne)" Date: Fri, 12 Jun 2015 12:51:26 +0800 Subject: [PATCH] python auto add header --- python_vimrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python_vimrc b/python_vimrc index fccddf2..5578631 100644 --- a/python_vimrc +++ b/python_vimrc @@ -66,6 +66,9 @@ au BufRead,BufNewFile *.c,*.h set formatoptions-=c formatoptions-=o formatoption " C: yes au BufNewFile *.py,*.pyw,*.c,*.h set fileformat=unix +" auto add #! /usr/bin/env python +autocmd BufNewfile *.py call append(0,'#!/usr/bin/env python') +autocmd BufNewfile *.py call append(1,'# -*- coding: UTF-8 -*-') " ---------------------------------------------------------------------------- " The following section contains suggested settings. While in no way required