"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Vim: windows config(c:\Program Files\Vim\_vimrc)
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Use Vim defaults (much better!)
" This should the priority setting, otherwise problems can appear
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set nocompatible
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 编码设置
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set fileencodings=utf-8,gb2312,gbk,gb18030
set termencoding=utf-8
"set fileformats=unix
set fileformat=unix
set encoding=utf-8
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 字体大小设置
" h 是字体大小
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set guifont=Consolas:h13
" 如果字体间有空格的话,则使用下划线表示空格,例如下面
"set guifont=Courier_New:h11
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
set diffexpr=MyDiff()
function MyDiff()
let opt = '-a --binary '
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
let arg1 = v:fname_in
if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
let arg2 = v:fname_new
if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
let arg3 = v:fname_out
if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
let eq = ''
if $VIMRUNTIME =~ ' '
if &sh =~ '\
' . arg3 . eq
endfunction
set number " 显示行号
set tabstop=4 " 设定tab长度为4
set shiftwidth=4 " 缩进的空格数
set expandtab " 是否在缩进和遇到Tab键时使用空格代替;
" 使用noexpandtab取消设置
set autoindent " 自动缩进
set smartindent
set cindent
set showmatch " 显示括号配对情况
set paste " 支持外部复制(好像不管用)
set clipboard+=unnamed " 与windows共享剪贴板
set history=50 " keep 50 lines of command history
set scrolloff=3 " 光标移动到buffer的顶部和底部时保持3行距离
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" color set
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
colorscheme smyck " windows下深色主题
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" windows下gui去掉显示,如果需要显示,只需要将-改为+即可
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set guioptions-=T " windows下隐藏工具栏
set guioptions-=r " 把gui右边的滑动条去掉
set guioptions-=L " 把gui左边的滑动条去掉
set guioptions+=m " 把gui的菜单栏去掉
set shortmess=atI " 启动的时候不显示援助索马里儿童的提示(是I而不是L)
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" windows下启动vim最大化
" autocmd GUIEnter * simalt ~x
" 自动开启树形目录
set nobackup " 关闭自动备份功能,backup自动备份
so $VIMRUNTIME/delmenu.vim
set langmenu=none
so $VIMRUNTIME/menu.vim
language C
map
:NERDTreeToggle
autocmd VimEnter * NERDTree
imap
my vimrc
最新推荐文章于 2019-09-16 14:27:31 发布