首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >查看Python程序员的vimrc

查看Python程序员的vimrc
EN

Code Review用户
提问于 2011-02-16 17:48:55
回答 1查看 1.2K关注 0票数 11

我主要是一个Python程序员,最终放弃了IDE,转而支持vim,我会承认,我很喜欢它!

我的vimrc文件如下所示:

代码语言:javascript
复制
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体验更愉快,我应该做些什么改变呢?

EN

回答 1

Code Review用户

发布于 2011-02-16 19:21:28

我想补充以下几点:

代码语言:javascript
复制
" 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 expandtab
票数 6
EN
页面原文内容由Code Review提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://codereview.stackexchange.com/questions/810

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档