vim配置

粘贴版:

" >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
"               Vundle配置由此开始
" >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
set nocompatible                "不去兼容vi
filetype off                    "关闭文件类型检测                  


set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" =======================================================
" 安装插件写在这之后
" =======================================================


"安装Vundle插件
Plugin 'VundleVim/Vundle.vim'

"命令补全
Plugin 'Valloric/YouCompleteMe'

"中文文档,安装好之后默认生效不用配置
Plugin 'yianwillis/vimcdoc'

"状态栏,安装好之后默认生效不用配置
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'

"markdown文档实时预览
" Plugin 'godlygeek/tabular'
" Plugin 'plasticboy/vim-markdown'
" Plugin 'suan/vim-instant-markdown'


" =======================================================
" 安装插件写在这之前
" =======================================================
call vundle#end()               " required
filetype plugin on              " required


" :PluginList       - 查看已经安装的插件
" :PluginInstall    - 安装插件
" :PluginUpdate     - 更新插件
" :PluginSearch     - 搜索插件,例如 :PluginSearch xml就能搜到xml相关的插件
" :PluginClean      - 删除插件,把安装插件对应行删除,然后执行这个命令即可
" :h                - 获取帮助
" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
"               Vundle的配置到此结束
" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<






" set rtp=~/.vim/bundle/YoucompleteMe






" vim主题,把Tomorrow-Night-Bright.vim等文件copy到~/.vim/colors/目录内
" ===========================================
" colorscheme molokai
" colorscheme Tomorrow-Night
" colorscheme Tomorrow-Night-Eighties
colorscheme Tomorrow-Night-Bright           "我挺喜欢这个颜色的
" colorscheme solarized






set guifont=Monaco:h16          "字体大小

syntax on                       "语法高亮度显示,这个打开后主题才能生效

set ts=4                        "设置一个tab等于4个空格
set expandtab                   "输入tab时,自动将其转化为空格
set autoindent                  "把当前行的对齐格式应用到下一行(自动缩进)

set backspace=2                 "苹果电脑在vim中删除键不管用,需要设置这个属性

set showmatch                   "显示括号匹配

set ruler                       "显示光标当前位置(右下角显示当前光标坐标)

" set nu!                       "显示行号

set cursorline                  "突出显示当前行

" set cursorcolumn              "突出显示当前列

" set laststatus=2              "总是显示状态栏



"设置粘贴模式:
"在Vim中通过鼠标右键粘贴时会在行首多出许多缩进和空格,
"通过set paste可以在插入模式下粘贴内容时不会有任何格式变形、胡乱缩进等问题。
set paste



"支持中文不乱码
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
set termencoding=utf-8
set encoding=utf-8



"启用鼠标
" set mouse=a
" set selection=exclusive
" set selectmode=mouse,key






"抄大仙的配置
"====================================================================
set showcmd             "输入的命令显示出来,在右下角显示,比如gg、dw命令等
set updatetime=3000     "自动存盘时间/毫秒
set wildmenu            "更好的命令补全
set belloff=all         "不发出滴滴声
set ttimeoutlen=100     "等待时间
set history=1024        "历史
" set linebreak         "更智能的自动折行显示
" set showmode          "显示当前模式


" set nobackup "不备份
" set display=lastline "不显示 @
" set completeopt=menu "不显示补全预览窗口
" set scrolloff=3 "滚动时光标与边界的距离
" set listchars=tab:\|\ ,trail:· "空白字符
" set fillchars=vert:┇,fold:- "分割线
" set hidden "切换buffer不需要保存







推荐阅读更多精彩内容