vim 配置 $HOME目录下的.vimrc的 配置

set nocompatible              " be iMproved

set nu                                      ‘‘显示行号

set noswapfile

syntax on                              "语法高亮打开

set backspace=2

set tabstop=2

set shiftwidth=2

set foldmethod=indent  "代码折叠

colorscheme desert      "配色方案

"let g:molokai_original = 1

"设定字体

"set guifont=Courier_New:h11:cANSI

"set guifontwide=新宋体:h11:cGB2312

""设定编码

set enc=utf-8

set fileencodings=ucs-bom,utf-8,chinese

set langmenu=zh_CN.UTF-8

language message zh_CN.UTF-8

source $VIMRUNTIME/delmenu.vim

source $VIMRUNTIME/menu.vim

set completeopt=menu

:colorscheme ron

set cindent

"vundle 插件管理工具

set rtp+=~/.vim/bundle/vundle/

call vundle#rc()

Bundle ‘taglist.vim‘    "taglist 插件

Bundle ‘gmarik/vundle‘

 Bundle ‘Valloric/YouCompleteMe‘  "代码补全插件

Bundle ‘scrooloose/syntastic‘

Bundle ‘The-NERD-tree‘ "在VIM的编辑窗口树状显示文件目录

Bundle ‘AutoClose‘  " 在输入()等需要配对的符号时,自动帮你补全剩余半个

""""""""""syntastic""""""""""""

"let g:syntastic_check_on_open = 1 

let g:syntastic_cpp_include_dirs = [‘/usr/include/‘]

let g:syntastic_cpp_remove_include_errors = 1

let g:syntastic_cpp_check_header = 1

let g:syntastic_cpp_compiler = ‘clang++‘

"set error or warning signs

"let g:syntastic_error_symbol = ‘x‘ 

"let g:syntastic_warning_symbol = ‘!‘ 

""whether to show balloons

let g:syntastic_enable_balloons = 1


""""""""""""YCM 配置""""""""""""""""""""

let mapleader = ","  " 这个leader就映射为逗号“,”


let g:ycm_global_ycm_extra_conf = ‘~/.vim/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py‘   "配置默认的ycm_extra_conf.py

nnoremap <leader>jd :YcmCompleter GoToDefinitionElseDeclaration<CR>   按,jd 会跳转到定义

let g:ycm_confirm_extra_conf=0    "打开vim时不再询问是否加载ycm_extra_conf.py配置

let g:ycm_collect_identifiers_from_tag_files = 1 "使用ctags生成的tags文件et g:ycm_confirm_extra_conf = 0


" Tag list (ctags)配置

""""""""""""""""""""""""""""""

map <silent> <F9> :TlistToggle<cr> " 快捷键(F9)打开TagList

"源文件路径不能为中文,坑爹啊!Tag!

let Tlist_Ctags_Cmd = ‘/usr/bin/ctags‘


let Tlist_Show_One_File = 1            "不同时显示多个文件的tag,只显示当前文件的

let Tlist_Exit_OnlyWindow = 1          "如果taglist窗口是最后一个窗口,则退出vim

let Tlist_Use_Right_Window = 1         "在右侧窗口中显示taglist窗口 






附件列表

     

    郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。