Skip to content

Instantly share code, notes, and snippets.

@cloudaice
Created February 7, 2012 08:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cloudaice/1758289 to your computer and use it in GitHub Desktop.
Save cloudaice/1758289 to your computer and use it in GitHub Desktop.
vim configure file
"设置TAB键为4个空格
set tabstop =4
"显示行号
set number
"关闭vi兼容模式
set nocompatible
"自动语法高亮
syntax enable
syntax on
"自动检测文件类型
filetype on
"检测文件类型插件
filetype plugin on
"上下可视行数
set scrolloff=6
"设置删除建可以一次删除4个空格
set softtabstop=4
"搜索的时候忽略大小写
set ignorecase
"当有一个字母是大写的时候,大小写敏感
set smartcase
"设置配色方案
colorscheme desert
"显示括号配对情况
set showmatch
" 选中状态下 Ctrl+c 复制
vnoremap <c-c> "+y
"if has("gui_running")
" set guioptions-=m " 隐藏菜单栏
" set guioptions-=T " 隐藏工具栏
" set guioptions-=L " 隐藏左侧滚动条
" set guioptions-=r " 隐藏右侧滚动条
" set guioptions-=b " 隐藏底部滚动条
" set showtabline=0 " 隐藏Tab栏
"endif
"设置启动窗口位置,前一个数字是X轴,后一个数字是Y轴
winpos 480 64
"设置窗口大小,行和列
set lines=28 columns=108
"自动与上一行跟从缩进
set autoindent
"用空格键来开关折叠
set foldenable
set foldmethod=indent
nnoremap <space> @=((foldclosed(line('.')) < 0) ? 'zc' : 'zo')<CR>
"set guifont=Courier\ News:h10 "设置字体方案
"set guifont=News:10 "设置字体方案
"set guifont=Courier\ 10 "设置字体方案
"set guifont=Monospace\ 12 "设置字体方案
"set guifont=Yahei\ Consolas\ Hybrid:h10"设置字体方案
"set guifont=Bitstream\ Vera\ Sans\ Mono\ 12"设置字体方案
"set modeline
"pydiction 1.2 python auto complete
"filetype plugin on
let g:pydiction_location = '~/.vim/plugin/complete-dict'
"defalut g:pydiction_menu_height == 15
"let g:pydiction_menu_height = 20
set mouse=a
filetype plugin indent on
set completeopt=longest,menu
autocmd FileType ruby,eruby set omnifunc=rubycomplete#Complete
autocmd FileType python set omnifunc=pythoncomplete#Complete
"set the taglist
let Tlist_Show_One_File=1
let Tlist_Exit_OnlyWindow=1
"set winmanage
let g:winManagerWindowLayout='FileExplorer|TagList'
nmap wm :WMToggle<cr>
"for python.vim
set filetype=python
au BufNewFile,BufRead *.py,*.pyw setf python
"缩进
set autoindent " same level indent
set smartindent " next level indent
set expandtab
set tabstop=4
set shiftwidth=4
set softtabstop=4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment