Last active
April 30, 2018 02:26
-
-
Save corvofeng/c78dcb2c2165db4751e19b906c332d2e to your computer and use it in GitHub Desktop.
Gvim 配置, 欢迎在Linux上试用
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Just for windows gvim, now maybe you could use it on linux. | |
colorscheme desert | |
set nu | |
" Windows上与Linux上配置是不同的 | |
if has('win32') | |
set guifont=consolas:h12 | |
elseif has('unix') | |
set guifont=Monospace\ 11 | |
endif | |
set foldcolumn=4 | |
set backspace=2 | |
set backspace=indent,eol,start | |
set wildmenu " 补全vim中的命令 | |
set foldmethod=syntax | |
set cindent "设置c自动缩进 | |
set smartindent | |
set autoindent | |
" 普通文件缩进4个字符 | |
set tabstop=4 | |
set shiftwidth=4 | |
set softtabstop=4 | |
set expandtab | |
"set guioptions-=egmrLtT | |
set showmatch " 括号配对 | |
set linebreak " 整词换行 | |
set whichwrap=b,s,<,>,[,] " 设置整词换行 | |
set nocompatible " 删除vi一致性 | |
syntax on | |
set hlsearch "高亮搜索 | |
set incsearch "输入字符串就开始搜索 | |
set autochdir " 自动切换目录 | |
set showcmd | |
filetype on | |
filetype plugin on | |
filetype plugin indent on | |
"高亮搜索后关闭高亮 | |
map<F2> : noh <CR> | |
scriptencoding utf-8 | |
" vertical line indentation | |
" Some ListChars won't use | |
"set list | |
"set listchars=tab:?·,trail:· | |
"set listchars=tab:┊\ | |
"set listchars=tab:\ \ ,trail:·,eol:?,extends:>,precedes:< | |
"set listchars=tab:?-,trail:·,extends:?,precedes:?,nbsp:× | |
set listchars=tab:>-,trail:.,precedes:<,extends:> | |
set listchars=eol:\ ,tab:>.,extends:>,trail:\ ,precedes:<,space:_ | |
highlight NonText guifg=#039be5 | |
highlight SpecialKey guifg=#00b8d4 | |
let g:indentLine_color_gui = '#A4E57E' | |
"set statusline+=%{fugitive#statusline()} | |
highlight LeaderTab guifg=#666666 | |
match LeaderTab /^\t/ | |
set cursorline " 突出显示当前行 | |
set laststatus=2 " 显示状态栏 | |
set lines=35 columns=90 | |
"复制和粘贴 | |
vmap<C-c> "+y | |
vmap<C-x> "+c | |
vmap<C-v> <ESC>+p | |
imap<C-v> <C-r><C-o>+ | |
nmap<C-v> "+p | |
" 禁止光标闪烁 | |
""set gcr=a:block-blinkon0 | |
" 禁止显示滚动条 | |
set guioptions-=l | |
set guioptions-=L | |
set guioptions-=r | |
set guioptions-=R | |
" 禁止显示菜单和工具条 | |
set guioptions-=m | |
set guioptions-=T | |
" 总是显示状态栏 | |
set laststatus=2 | |
set cc=80 " 80字符对齐线 | |
highlight ColorColumn guibg=lightblue | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment