Skip to content

Instantly share code, notes, and snippets.

@samqiu
Created November 25, 2011 03:42
Show Gist options
  • Save samqiu/1392768 to your computer and use it in GitHub Desktop.
Save samqiu/1392768 to your computer and use it in GitHub Desktop.
" The following are commented out as they cause vim to behave a lot
" differently from regular Vi. They are highly recommended though.
set showcmd " Show (partial) command in status line.
set showmatch " Show matching brackets.
set ignorecase " Do case insensitive matching
set smartcase " Do smart case matching
set incsearch " Incremental search
set autowrite " Automatically save before commands like :next and :make
set hidden " Hide buffers when they are abandoned
set expandtab " convert tabs to spaces
set softtabstop=2 " tab of length 2
set shiftwidth=2 " indentation tab to 2 spaces
set nowrap " do not wrap lines
set scrolloff=4 " Always show 4 lines above and bellow cursor (context)
set number
set numberwidth=5
set autoread
set tabstop=4
set ruler
set wrap
set hlsearch
set ignorecase
set smartcase
set cursorline
set cursorcolumn
set foldmethod=indent "以缩自动折叠显示文档
set scrolloff=5 "光标碰到第五行、倒数第五行时就上下卷屏
set autoread "如果正在编辑的文件在打开后又有其他程序更新,则自动加载
" 关闭遇到错误时的声音提示
set noerrorbells
set cmdheight=1 " 设置命令行的高度
set laststatus=2 " 始终显示状态行
" Tab键和行尾空格可见
set list
set listchars=tab:>\ ,trail:_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment