標籤:des http io ar color os 使用 sp 檔案
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視窗
來自為知筆記(Wiz)
附件列表
vim 配置 $HOME目錄下的.vimrc的 配置