Created
May 1, 2015 00:08
-
-
Save peidong/02f15605480ece6e6567 to your computer and use it in GitHub Desktop.
vimrc_macvim
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
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required | |
Plugin 'gmarik/Vundle.vim' | |
Plugin 'Valloric/YouCompleteMe' | |
Plugin 'mattn/emmet-vim' | |
" All of your Plugins must be added before the following line | |
call vundle#end() " required | |
filetype plugin indent on " required | |
" To ignore plugin indent changes, instead use: | |
"filetype plugin on | |
" | |
" Brief help | |
" :PluginList - lists configured plugins | |
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate | |
" :PluginSearch foo - searches for foo; append `!` to refresh local cache | |
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal | |
" | |
" see :h vundle for more details or wiki for FAQ | |
" Put your non-Plugin stuff after this line | |
""""""""""""""""""""""""""""""""""""""""" | |
set nu | |
set smartindent | |
" 开启语法高亮功能 | |
syntax enable | |
" 允许用指定语法高亮配色方案替换默认方案 | |
syntax on | |
" 自适应不同语言的智能缩进 | |
" filetype indent on | |
filetype plugin indent on | |
" 将制表符扩展为空格 | |
set expandtab | |
" 设置编辑时制表符占用空格数 | |
set tabstop=4 | |
" 设置格式化时制表符占用空格数 | |
set shiftwidth=4 | |
" 让 vim 把连续数量的空格视为一个制表符 | |
set softtabstop=4 | |
" 高亮显示当前行/列 | |
set cursorline | |
"set cursorcolumn | |
" 高亮显示搜索结果 | |
set hlsearch | |
" 总是显示状态栏 | |
"set laststatus=2 | |
" 显示光标当前位置 | |
set ruler | |
" 开启实时搜索功能 | |
set incsearch | |
" 搜索时大小写不敏感 | |
" set ignorecase | |
" vim 自身命令行模式智能补全 | |
set wildmenu | |
" map | |
inoremap jj <ESC> | |
""""""""""""""""""""""""""" | |
"ycm | |
" YCM 补全菜单配色 | |
" 菜单 | |
highlight Pmenu ctermfg=2 ctermbg=3 guifg=#005f87 guibg=#EEE8D5 | |
" 选中项 | |
highlight PmenuSel ctermfg=2 ctermbg=3 guifg=#AFD700 guibg=#106900 | |
" 补全功能在注释中同样有效 | |
let g:ycm_complete_in_comments=1 | |
" 允许 vim 加载 .ycm_extra_conf.py 文件,不再提示 | |
let g:ycm_confirm_extra_conf=0 | |
" 开启 YCM 标签补全引擎 | |
let g:ycm_collect_identifiers_from_tags_files=1 | |
" 引入 C++ 标准库tags | |
set tags+=/data/misc/software/misc./vim/stdcpp.tags | |
" 补全内容不以分割子窗口形式出现,只显示补全列表 | |
set completeopt-=preview | |
" 从第一个键入字符就开始罗列匹配项 | |
let g:ycm_min_num_of_chars_for_completion=1 | |
" 禁止缓存匹配项,每次都重新生成匹配项 | |
" let g:ycm_cache_omnifunc=0 | |
" 语法关键字补全 | |
let g:ycm_seed_identifiers_with_syntax=1 | |
"""""""""""""""""""""""""""""""""""""""""""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment