et nocompatible " 去除VI一致性,必须
filetype off " 必须
" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
" 设置包括vundle和初始化相关的runtime path
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin() " 另一种选择, 指定一个vundle安装插件的路径
" call vundle#begin('~/some/path/here')
" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
" 让vundle管理插件版本,必须
Plugin 'VundleVim/Vundle.vim' "这个插件需要去github下载安装后,这个.vimrc才好用
" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
" 以下范例用来支持不同格式的插件安装.
" 这里相当于Vundle的帮助,教你如何设置想要安装的插件
" 请将安装插件的命令放在vundle#begin和vundle#end之间.
" Github上的插件
" 格式为 Plugin '用户名/插件仓库名'
Plugin 'tpope/vim-fugitive'
" 来自 http://vim-scripts.org/vim/scripts.html 的插件
" Plugin '插件名称' 实际上是 Plugin 'vim-scripts/插件仓库名' 只是此处的用户名可以省略
Plugin 'L9'
" 由Git支持但不再github上的插件仓库 Plugin 'git clone 后面的地址'
" Plugin 'git://git.wincent.com/command-t.git'
" 本地的Git仓库(例如自己的插件) Plugin 'file:///+本地插件仓库绝对路径'
" Plugin 'file:///home/gmarik/path/to/plugin'
" 插件在仓库的子目录中.
" 正确指定路径用以设置runtimepath. 以下范例插件在sparkup/vim目录下
" Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" 安装L9,如果已经安装过这个插件,可利用以下格式避免命名冲突
" Plugin 'ascenator/L9', {'name': 'newL9'}
" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
" 这里是个人安装的一些插件
Plugin 'szw/vim-tags' "ctags 为了查看函数定义 ctags需要手动安装
Plugin 'brookhong/cscope.vim' "cscope 查找函数调用关系等 cscope需要手动安装
Plugin 'vim-scripts/taglist.vim' "查看函数列表
Plugin 'scrooloose/nerdtree' "查看树结构
Plugin 'vim-scripts/winmanager' "组织窗口结构
Plugin 'scrooloose/nerdcommenter' "注释使用
Plugin 'Shougo/neocomplete.vim' "自动补全
Plugin 'vim-airline/vim-airline' "状态栏
Plugin 'godlygeek/tabular'
Plugin 'plasticboy/vim-markdown' "这两个配合为了生成markdown
Plugin 'iamcco/mathjax-support-for-mkdp'
Plugin 'iamcco/markdown-preview.vim' "这两个配合为了markdown效果显示
Plugin 'vim-scripts/DoxygenToolkit.vim' "自动注释
" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
" 你的所有插件需要在下面这行之前
call vundle#end() " 必须
filetype plugin indent on " 必须 加载vim自带和插件相应的语法和文件类型相关脚本
" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
" 忽视插件改变缩进,可以使用以下替代:
"filetype plugin on
" 简要帮助文档
" :PluginList - 列出所有已配置的插件
" :PluginInstall - 安装插件,追加 `!` 用以更新或使用 :PluginUpdate
" :PluginSearch foo - 搜索 foo ; 追加 `!` 清除本地缓存
" :PluginClean - 清除未使用插件,需要确认; 追加 `!` 自动批准移除未使用插件
" 查阅 :h vundle 获取更多细节和wiki以及FAQ
" 将你自己对非插件片段放在这行之后
" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
" 这里开始对每个工具的使用进行配置
set tabstop=4 "设置tab前进四个空格
set nu "设置行号
set exrc "这两行的设置可以使vim识别不同路径下的.vimrc
set secure "这里主要为了方便多个项目时不同的环境设置,例如不同项目的ctag,或者缩进等等
" 以下几行是为了设置cscope的一些映射的,为了避免:call xxxx()
" 这里的leader默认是\
nnoremap <leader>fa :call CscopeFindInteractive(expand('<cword>'))<CR>
nnoremap <leader>l :call ToggleLocationList()<CR>
" s: Find this C symbol
nnoremap <leader>fs :call CscopeFind('s', expand('<cword>'))<CR>
" g: Find this definition
nnoremap <leader>fg :call CscopeFind('g', expand('<cword>'))<CR>
" d: Find functions called by this function
nnoremap <leader>fd :call CscopeFind('d', expand('<cword>'))<CR>
" c: Find functions calling this function
nnoremap <leader>fc :call CscopeFind('c', expand('<cword>'))<CR>
" t: Find this text string
nnoremap <leader>ft :call CscopeFind('t', expand('<cword>'))<CR>
" e: Find this egrep pattern
nnoremap <leader>fe :call CscopeFind('e', expand('<cword>'))<CR>
" f: Find this file
nnoremap <leader>ff :call CscopeFind('f', expand('<cword>'))<CR>
" i: Find files #including this file
nnoremap <leader>fi :call CscopeFind('i', expand('<cword>'))<CR>
" 以上几行是为了设置cscope的一些映射的,为了避免:call xxxx()
let NERDTreeWinPos ="left"
let NERDTreeWinSize=20 "这两行是为了设置NERDTree默认在左边
let Tlist_Auto_Open=1
let Tlist_Ctags_Cmd='/usr/bin/ctags'
let Tlist_Use_Right_Window=1
let Tlist_WinWidth=25 "这两行是为了让Taglist默认在右边
let Tlist_Exit_OnlyWindow = 1
" 这里开始是为了自动注释配置注释内容
let g:DoxygenToolkit_briefTag_funcName = "yes"
" for c style, change the '@' to '\'
let g:DoxygenToolkit_commentType = "c"
let g:DoxygenToolkit_briefTag_pre = "@"
" let g:DoxygenToolkit_templateParamTag_pre = "@param "
let g:DoxygenToolkit_paramTag_pre = "@param "
let g:DoxygenToolkit_returnTag = "@return "
" let g:DoxygenToolkit_throwTag_pre = "\\throw " " @exception is also valid
let g:DoxygenToolkit_fileTag = "@file "
let g:DoxygenToolkit_dateTag = "@date "
let g:DoxygenToolkit_authorTag = "@author "
let g:DoxygenToolkit_versionTag = "@version "
let g:DoxygenToolkit_blockTag = "@name "
" let g:DoxygenToolkit_classTag = "\\class "
let g:DoxygenToolkit_authorName = "Binresist"
let g:doxygen_enhanced_color = 1
"let g:load_doxygen_syntax = 1
" 自动注释结束
"Markdown开始
let g:mkdp_path_to_chrome = "chromium"
" path to the chrome or the command to open chrome(or other modern browsers)
let g:mkdp_auto_start = 1
" set to 1, the vim will open the preview window once enter the markdown
" buffer
let g:mkdp_auto_open = 1
" set to 1, the vim will auto open preview window when you edit the
" markdown file
let g:mkdp_auto_close = 1
" set to 1, the vim will auto close current preview window when change
" from markdown buffer to another buffer
let g:mkdp_refresh_slow = 1
" set to 1, the vim will just refresh markdown when save the buffer or
" leave from insert mode, default 0 is auto refresh markdown as you edit or
" move the cursor
let g:mkdp_command_for_global = 0
" set to 1, the MarkdownPreview command can be use for all files,
" by default it just can be use in markdown file
"Markdown结束
" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++