1
kumu Sep 10, 2013 function HeaderPython()
call setline(1, "#!/usr/bin/env python") call append(1, "# -*- coding: utf-8 -*-") normal G normal o normal o endf autocmd bufnewfile *.py call HeaderPython() 加入以上代码即可 |
3
xiaokai Sep 10, 2013 |
4
xiaokai Sep 10, 2013 |
5
mengzhuo Sep 10, 2013
用上snippets吧
https://github.com/honza/vim-snippets |
6
eth2net Sep 10, 2013
|
8
wklken Sep 10, 2013
装个ultisnips https://github.com/wklken/k-vim#sirverultisnips
|
9
syv2 Sep 10, 2013
在.vimrc里添加一行
autocmd BufNewFile *.py 0r /path_to_template_file |
10
GreenHand Sep 11, 2013
autocmd BufNewFile *.py 0r ~/.python_template.py
|