2010-01-10

更新 vim 的 python template

 
 

Sent to you by l5g via Google Reader:

 
 


在 ~/.vimrc 里用
" 自动使用新文件模板 autocmd BufNewFile *.py 0r ~/.vim/template/simple.py

~/.vim/template/simple.py 内容:
 #!/usr/bin/python # -*- coding: UTF-8 -*- '''模块名 @version: $Id$ @author: U{Jiahua Huang <jhuangjiahua@gmail.com>} @license: LGPL @see: 参考资料链接等等 '''  def main():         '''主函数             - 命令行测试         @todo: 计划完成...         '''         print 'main'  if __name__=="__main__":         main()  

 
 

Things you can do from here:

 
 

No comments:

Post a Comment