看板 Editor 關於我們 聯絡資訊
function PyHeader() if getfsize(@%) <= 0 execute "norm i#!/usr/bin/env python^M# -*- coding: utf-8 -*-" endif endfunction au BufRead,BufNewFile *.py call PyHeader() -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 203.73.236.63
kusoayan:厲害 07/08 17:51
martinku:猛! 07/10 00:32
stimim:au BufNewFile *.py 0r ~/.vim/templates/py.tpl 07/11 12:47
stimim:然後在 .vim/tmplates/py.tpl 裡打預設的內容 07/11 12:48
qwertmn:推3樓~ 不過我習慣下touch 產目錄結構~ 07/11 19:11
albb0920:這個讚!! 08/06 00:57