我的配置:
"pydiction 1.2 python auto complete
filetype plugin on
let g:pydiction_location = '~/.vim/tools/pydiction/complete-dict'
"defalut g:pydiction_menu_height == 15
"let g:pydiction_menu_height = 20
syntax enable
syntax on
set nu
set t_Co=256
set background=dark
colorscheme molokai
"关闭兼容模式
"set nocompatible
""外部修改时自动读取
set autoread
"设置鼠标
"set mouse=a
""设置历史
set history=400
"设置mapleader
"let mapleader=","
"let g:mapleader=","
""显示行号
set number
"显示光标位置
"set ruler
""增强命令行补全
set wildmenu
"设置命令行高度
"set cmdheight=2
""减少刷新和重画
set lz
"设置退格键
"set backspace=eol,start,indent
""设置跨行键
set whichwrap+=<,>,h,l
"搜索时忽略大小写
"set ignorecase
""搜索时高亮关键字
set hlsearch
"设置magic
"set magic
""关闭提示音
set noerrorbells
set novisualbell
set vb t_vb=
"自动匹配括号
"set showmatch
"set mat=2
""设置Tab键
set expandtab
set smarttab
set tabstop=4
set shiftwidth=4
"自动缩进与智能缩进
set autoindent
set smartindent
""换行不截断单词
set linebreak
"C风格缩进
"set cindent
""语法高亮
syntax enable
为了vim更好的支持python写代码,修改tab默认4个空格有两种设置方法:
1. vim /etc/vimrc