Created
February 16, 2018 15:14
-
-
Save Vermeille/9a9743dcc0e1e6144e7d8b36b4081b15 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Bootstrap " | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" disable for pathogen | |
filetype plugin off | |
" call pathogen | |
call plug#begin('~/.vim/plugged') | |
Plug 'ctrlpvim/ctrlp.vim' | |
Plug 'easymotion/vim-easymotion' | |
Plug 'neomake/neomake' | |
"Plug 'Valloric/YouCompleteMe' | |
Plug 'rdnetto/YCM-Generator', { 'branch': 'stable'} | |
Plug 'rhysd/vim-clang-format' | |
Plug 'vim-scripts/a.vim' | |
Plug 'vim-scripts/DoxygenToolkit.vim' | |
Plug 'alx741/vim-hindent' | |
Plug 'rust-lang/rust.vim' | |
Plug 'mindriot101/vim-yapf' | |
Plug 'Glench/Vim-Jinja2-Syntax' | |
Plug 'flazz/vim-colorschemes' | |
Plug 'octol/vim-cpp-enhanced-highlight' | |
Plug 'Vermeille/vim-gb' | |
call plug#end() | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Text configs " | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Backspaces | |
set backspace=2 | |
" vi no compatibility | |
set nocompatible | |
" Change tabs to spaces | |
set expandtab | |
" tab = 4 spaces | |
set softtabstop=4 | |
" indent = 4 | |
set shiftwidth=4 | |
" autoscroll when near border | |
set scrolloff=10 | |
" decide what to do with tab | |
set smarttab | |
" autoindent when no rules | |
set autoindent | |
" fix width to 80 col | |
set textwidth=79 | |
" color the 80th column | |
set colorcolumn=80 | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" View " | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" numbering | |
set relativenumber | |
" color syntax | |
syntax on | |
"show trailing spaces in red background | |
set listchars=trail:!,tab:>. | |
set list | |
highlight SpecialKey ctermbg=black guibg=black | |
" show mode in status bar | |
set showmode | |
" show command being typed | |
set showcmd | |
" show statusline | |
set laststatus=2 | |
" coloration for doxygen | |
let g:load_doxygen_syntax=1 | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Features config " | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" search while typing | |
set incsearch | |
" ignore case except if contains a upper case letter | |
set ignorecase | |
set smartcase | |
" replace global by default | |
set gdefault | |
set wildmenu | |
" updatetime for plugins | |
set updatetime=1000 | |
" Allow mouse | |
set mouse=a | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Keys " | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" leader is space | |
"let mapleader=" " | |
" Space Space goes to next buffer | |
noremap <space><space> <C-w>w | |
" <Space>d for generate Doxygen | |
noremap <silent><space>d :Dox<CR> | |
" <Space>a for alternate file | |
noremap <silent><space>a :A<CR> | |
" <Space>A for alternate file in another buffer | |
noremap <silent><space>A :AV<CR> | |
" ^C in normal mode on a term kills the process | |
noremap <C-c> i<C-c><Esc> | |
tnoremap <Esc> <C-\><C-n> | |
let mapleader="," | |
map <Leader> <Plug>(easymotion-prefix) | |
colorscheme desert | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Plugins " | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" activate plugins and indentation rules | |
filetype plugin indent on | |
set completeopt=menu,longest | |
setlocal omnifunc=syntaxcomplete#Complete | |
let g:clang_format#style = 'Google' | |
let g:clang_format#style_options = { | |
\ "BasedOnStyle" : "Google", | |
\ "IndentWidth" : 4, | |
\ "DerivePointerAlignment" : "false", | |
\ "AlwaysBreakTemplateDeclarations" : "true", | |
\ "BinPackArguments" : "false", | |
\ "BinPackParameters" : "false", | |
\ "Standard" : "C++11"} | |
let g:clang_format#auto_format = 0 | |
let g:rustfmt_autosave = 1 | |
let g:ycm_rust_src_path = '~/.multirust/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/' | |
autocmd FileType c,cpp,h ClangFormatAutoEnable | |
"autocmd BufWritePre *.py :Yapf --style google | |
let g:hindent_indent_size = 4 | |
let g:yapf_style = "google" | |
let g:cpp_class_scope_highlight = 1 | |
let g:cpp_member_variable_highlight = 1 | |
let g:cpp_class_decl_highlight = 1 | |
let g:cpp_experimental_template_highlight = 1 | |
set exrc | |
set secure |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment