Created
April 20, 2019 21:41
-
-
Save remi6397/e28861dd14647dcd5c0890149ea0fc13 to your computer and use it in GitHub Desktop.
vimrc
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
call plug#begin() | |
" VIM | |
Plug 'scrooloose/nerdtree' | |
" Themes | |
Plug 'rakr/vim-two-firewatch' | |
"Plug 'kaicataldo/material.vim' | |
" VCS support | |
Plug 'mhinz/vim-signify' | |
" Git | |
Plug 'tpope/vim-fugitive' | |
Plug 'jlfwong/vim-mercenary' " unmaintained | |
Plug 'Valloric/YouCompleteMe' | |
Plug 'tpope/vim-surround' | |
Plug 'vim-airline/vim-airline' | |
Plug 'derekwyatt/vim-fswitch' | |
Plug 'tpope/vim-scriptease' | |
Plug 'sunaku/vim-dasht' | |
" FuzzyFinder | |
Plug '/usr/local/opt/fzf' | |
Plug 'junegunn/fzf.vim' | |
call plug#end() | |
set number | |
set relativenumber | |
set expandtab ts=2 sw=2 ai | |
set background=dark | |
let g:two_firewatch_italics=0 | |
colo two-firewatch | |
let g:airline_theme='twofirewatch' | |
"| Airline | |
let g:airline#extensions#tabline#enabled = 1 | |
let g:airline#extensions#ycm#enabled = 1 | |
"| YouCompleteMe | |
set completeopt-=preview | |
nnoremap <leader>fi :YcmCompleter FixIt<CR> | |
nnoremap <leader>jc :YcmCompleter GoToDeclaration<CR> | |
nnoremap <leader>jd :YcmCompleter GoToDefinition<CR> | |
inoremap <leader>; <C-x><C-o> | |
let g:ycm_complete_in_comments=1 | |
let g:ycm_confirm_extra_conf=0 | |
let g:ycm_collect_identifiers_from_tags_files=0 | |
let g:ycm_min_num_of_chars_for_completion=1 | |
let g:ycm_cache_omnifunc=0 | |
let g:ycm_seed_identifiers_with_syntax=1 | |
"| FSwitch | |
nmap <silent> <Leader>of :FSHere<cr> | |
nmap <silent> <Leader>ol :FSRight<cr> | |
nmap <silent> <Leader>oh :FSLeft<cr> | |
nmap <silent> <Leader>oL :FSSplitRight<cr> | |
nmap <silent> <Leader>oH :FSSplitLeft<cr> | |
nmap <silent> <Leader>oK :FSSplitAbove<cr> | |
nmap <silent> <Leader>oJ :FSSplitBelow<cr> | |
"| Dasht | |
nnoremap <silent> <leader>K :call Dasht([expand('<cword>'), expand('<cWORD>')])<Return> | |
"| Cool maps | |
" http://vim.wikia.com/wiki/Replace_a_word_with_yanked_text#Mapping_for_paste | |
xnoremap p "_dP | |
" Stamp | |
nnoremap S "_diwP | |
"| C/C++ | |
let g:clang_format_fallback_style = '' | |
"'{BasedOnStyle: llvm, IndentWidth: 2}' | |
function! Formatonsave() | |
let l:formatdiff = 1 | |
py3f /usr/local/Cellar/llvm/7.0.0_1/share/clang/clang-format.py | |
endfunction | |
autocmd BufWritePre *.h,*.hpp,*.hxx,*.cc,*.cxx,*.cpp call Formatonsave() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment