Skip to content

Instantly share code, notes, and snippets.

@HouCoder
Created August 15, 2014 16:43
Show Gist options
  • Save HouCoder/302c8be2e65d7c6b89fd to your computer and use it in GitHub Desktop.
Save HouCoder/302c8be2e65d7c6b89fd to your computer and use it in GitHub Desktop.
Gvim config
set guifont=Consolas:h12
set linespace=4
set shiftwidth=4
set tabstop=4
set softtabstop=4
set expandtab
set noswapfile
set backspace=start,indent,eol
set numberwidth=4
set autoindent
set smartindent
set nobackup
set writebackup
set hlsearch
set incsearch
set autoread
set nu
set ruler
" -----------------------------------------------------------------------------
" < 编码配置 >
" -----------------------------------------------------------------------------
" 注:使用utf-8格式后,软件与程序源码、文件路径不能有中文,否则报错
set encoding=utf-8 "设置gvim内部编码
set fileencoding=utf-8 "设置当前文件编码
set fileencodings=ucs-bom,utf-8,gbk,cp936,latin-1 "设置支持打开的文件的编码
" 文件格式,默认 ffs=dos,unix
set fileformat=unix "设置新文件的<EOL>格式
set fileformats=unix,dos,mac "给出文件的<EOL>格式类型
"解决菜单乱码
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
"解决consle输出乱码
language messages zh_CN.utf-8
" 显示/隐藏菜单栏、工具栏、滚动条,可用 Ctrl + F11 切换
set guioptions-=m
set guioptions-=T
set guioptions-=r
set guioptions-=L
" 配色方案
colorscheme desert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment