Home
huangjiahua~~我自己的世界
Recent Entries 

Advertisement

Customize
logo-1
~/.vimrc 里添加了
" 让 python 展开Tab,显示行号,缩进4, Tab宽度4
autocmd FileType python set et nu sw=4 ts=4

就是 vim 里只让 python 文件用 4 个空格缩进,而不是 Tab。
对其他文件不影响
7th-Jun-2007 03:31 pm - 更新 vim 的 python template
logo-1
在 ~/.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()

logo-1
SuperTab continued. : Do all your insert-mode completion with Tab!
http://www.vim.org/scripts/script.php?script_id=1643
This script allows you to use the tab key to do all your insert
completion (:help ins-completion).
zongda
http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html



Zip with all SVGs

Graphical cheat sheet



This is a single page describing the full vi/vim input model, the function of all keys, and all major features. You can see it as a compressed vi/vim manual. Click on the image below to access a high-resolution bitmap version, or download the vector-based, scalable SVG version (zip-compressed - and be sure to view & print the SVG with the open source application Inkscape or the Adobe plug-in for Internet Explorer, Firefox breaks the layout for some reason, apart of rendering it with no anti-alias!).

Advertisement

Customize
This page was loaded Nov 27th 2009, 11:02 am GMT.