我主要是一个Python程序员,最终放弃了IDE,转而支持vim,我会承认,我很喜欢它!
我的vimrc文件如下所示:
autocmd BufRead,BufNewFile *.py syntax on
autocmd BufRead,BufNewFile *.py set ai
autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,with,try,except,finally,def,class
set tabstop=4
set expandtab
set shiftwidth=4
filetype indent on为了让我的Python体验更愉快,我应该做些什么改变呢?
发布于 2011-02-16 19:21:28
我想补充以下几点:
" Allow easy use of hidden buffers.
" This allows you to move away from a buffer without saving
set hidden
" Turn search highlighting on
set hlsearch
" Turn on spelling
" This auto spell checks comments not code (so very cool)
set spell
" tabstop: Width of tab character
" expandtab: When on uses space instead of tabs
" softtabstop: Fine tunes the amount of white space to be added
" shiftwidth Determines the amount of whitespace to add in normal mode
set tabstop =4
set softtabstop =4
set shiftwidth =4
set expandtabhttps://codereview.stackexchange.com/questions/810
复制相似问题