" ------------------------------------------------------------ " Load plugins " ------------------------------------------------------------ set nocompatible filetype off " Set the runtime path to include Vundle and initialize set rtp+=~/.vim/bundle/Vundle.vim " Plugins will be downloaded under the specified directory. call vundle#begin('~/.vim/plugged') " Let Vundle manage Vundle, required Plugin 'VundleVim/Vundle.vim' " Colorschemes Plugin 'kristijanhusak/vim-hybrid-material' Plugin 'cocopon/iceberg.vim' Plugin 'arcticicestudio/nord-vim' Plugin 'sjl/badwolf' Plugin 'lifepillar/vim-solarized8' Plugin 'scheakur/vim-scheakur' Plugin 'Badacadabra/vim-archery' Plugin 'ycm-core/YouCompleteMe' " PloyGlot Plugin 'sheerun/vim-polyglot' " Auto Pairs Plugin 'jiangmiao/auto-pairs' " Auto Pairs " NERDTree Plugin 'preservim/nerdtree' " Tagbar Plugin 'preservim/tagbar' " ctrlsf.vim Plugin'dyng/ctrlsf.vim' " vim-fswitch Plugin 'derekwyatt/vim-fswitch' " vim-protodef Plugin 'derekwyatt/vim-protodef' " List ends here. Plugins become visible to Vim after this call. call vundle#end() filetype plugin indent on " ------------------------------------------------------------ " auto-pairs configuration " ------------------------------------------------------------ let g:AutoPairsShortcutToggle = '' " ------------------------------------------------------------ " NERDTree configuration " ------------------------------------------------------------ let NERDTreeShowBookmarks = 1 let NERDTreeShowHidden = 1 let NERDTreeShowLineNumbers = 0 let NERDTreeMinimalMenu = 1 let NERDTreeWinPos = "left" let NERDTreeWinSize = 31 " ------------------------------------------------------------ " tagbar configuration " ------------------------------------------------------------ let g:tagbar_autofocus = 1 let g:tagbar_autoshowtag = 1 let g:tagbar_position = 'botright vertical' " ------------------------------------------------------------ " ctrlsf configuration " ------------------------------------------------------------ let g:ctrlsf_backend = 'ack' let g:ctrlsf_auto_close = { "normal": 0, "compact": 0 } let g:ctrlsf_auto_focus = { "at": "start" } let g:ctrlsf_auto_preview = 0 let g:ctrlsf_case_sensitive = 'smart' let g:ctrlsf_default_view = 'normal' let g:ctrlsf_regex_pattern = 0 let g:ctrlsf_position = 'right' let g:ctrlsf_winsize = '46' let g:ctrlsf_default_root = 'cwd' " projcet " ------------------------------------------------------------ " fswitch configuration " ------------------------------------------------------------ " " Set fswichdst and fswitchloc variables when BufEnter event takes place " on a file whose name matches {*.cpp}. au! BufEnter *.cpp let b:fswitchdst = 'hpp,h' au! BufEnter *.h let b:fswitchdst = 'cpp,c' " fswitchdst - Denotes the files extensions that is the target extension of " the current file's companion file. " " fswitchlocs - Contains a set of directories that indicate directory names " that should be formulated when trying to find the alternate " file. " ------------------------------------------------------------ " vim-protodef configuration " ------------------------------------------------------------ nmap ,PP nmap ,PN " NOTE: This doesn't seem to disable the sorting. let g:disable_protodef_sorting = 1 " ------------------------------------------------------------ " YCM configuration " ------------------------------------------------------------ " Key to close the completion menu (default ) let g:ycm_key_list_stop_completion = [''] let g:ycm_filetype_whitelist = {'cpp':1, 'h':2, 'hpp':3, 'c':4, 'cxx':5 , 'vimrc':6} let g:ycm_autoclose_preview_window_after_insertion = 1 let g:ycm_autoclose_preview_window_after_completion = 1 let g:ycm_confirm_extra_conf = 0 let g:ycm_always_populate_location_list = 1 let g:ycm_enable_diagnostic_signs = 1 let g:ycm_open_loclist_on_ycm_diags = 1 let g:ycm_max_num_candidates = 20 let g:ycm_max_num_identifier_candidates = 10 let g:ycm_auto_trigger = 1 let g:ycm_show_diagnostic_ui = 1 let g:ycm_error_symbol = '>>' let g:ycm_enable_diagnostic_signs = 1 let g:ycm_enable_diagnostic_highlighting = 1 let g:ycm_echo_current_diagnostic = 1 " ------------------------------------------------------------ " Vim configuration " ------------------------------------------------------------ set nu " Enable line numbers syntax on " Enable synax highlighting set incsearch " Enable incremental search set hlsearch " Enable highlight search set splitbelow " Always split below" set mouse=a " Enable mouse drag on window splits set tabstop=4 " How many columns of whitespace a \t is worth set shiftwidth=4 " How many columns of whitespace a “level of indentation” is worth set expandtab " Use spaces when tabbing if !has('nvim') set termwinsize=12x0 " Set terminal size endif set background=light " Set background colorscheme gruvbox " Set color scheme " ------------------------------------------------------------ " Key mappings " ------------------------------------------------------------ " General nmap :buffers nmap :term " NERDTree nmap :NERDTreeToggle " tagbar nmap :TagbarToggle " ctrlds nmap f CtrlSFPrompt xmap f CtrlSFVwordPath xmap F CtrlSFVwordExec nmap n CtrlSFCwordPath nmap p CtrlSFPwordPath nnoremap o :CtrlSFOpen nnoremap t :CtrlSFToggle inoremap t :CtrlSFToggle " fswitch nmap :vsplit :wincmd l :FSRight let g:user42 = 'narnaud' let g:mail42 = 'narnaud@student.42.fr'