2018-11-15 12:22:05 +00:00
|
|
|
" vim-plug installer
|
|
|
|
if empty(glob('~/.vim/autoload/plug.vim'))
|
|
|
|
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
|
|
|
|
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
|
|
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
|
|
|
endif
|
|
|
|
|
|
|
|
" vim-plug plugins
|
|
|
|
call plug#begin('~/.vim/vim-plug')
|
2018-11-15 19:37:34 +00:00
|
|
|
|
2018-11-20 06:45:07 +00:00
|
|
|
Plug 'valloric/youcompleteme', { 'do': './install.py --clang-completer' }
|
2018-11-15 12:22:05 +00:00
|
|
|
Plug 'rhysd/vim-clang-format'
|
2018-11-15 13:32:04 +00:00
|
|
|
Plug 'derekwyatt/vim-fswitch'
|
2018-11-15 12:22:05 +00:00
|
|
|
Plug 'vim-airline/vim-airline'
|
2018-11-16 22:25:14 +00:00
|
|
|
Plug 'vim-airline/vim-airline-themes'
|
2018-11-15 12:22:05 +00:00
|
|
|
Plug 'ambv/black'
|
2018-11-15 19:37:34 +00:00
|
|
|
Plug 'altercation/vim-colors-solarized'
|
2018-11-16 22:25:14 +00:00
|
|
|
Plug 'craigemery/vim-autotag'
|
2018-11-20 06:45:07 +00:00
|
|
|
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
|
|
|
Plug 'junegunn/fzf.vim'
|
2018-11-15 19:37:34 +00:00
|
|
|
|
2018-11-15 12:22:05 +00:00
|
|
|
call plug#end()
|
2016-09-23 23:22:54 +00:00
|
|
|
|
|
|
|
" tabwidth
|
2016-09-23 23:13:08 +00:00
|
|
|
set tabstop=4
|
|
|
|
set shiftwidth=4
|
2016-09-23 23:22:54 +00:00
|
|
|
|
|
|
|
" line numbers
|
2016-09-23 23:13:08 +00:00
|
|
|
set number
|
|
|
|
|
2018-05-08 18:55:04 +00:00
|
|
|
" always enable status line
|
|
|
|
set laststatus=2
|
|
|
|
|
2018-11-16 22:15:59 +00:00
|
|
|
" ctags config
|
2018-11-16 22:25:14 +00:00
|
|
|
set tags=./tags;
|
2018-11-16 22:15:59 +00:00
|
|
|
nnoremap <F2> <C-]>
|
2018-11-16 22:25:14 +00:00
|
|
|
|
2018-10-29 19:12:46 +00:00
|
|
|
" youcomleteme config
|
|
|
|
let g:ycm_autoclose_preview_window_after_insertion = 1
|
|
|
|
let g:ycm_autoclose_preview_window_after_completion = 1
|
|
|
|
|
|
|
|
nmap <F12> :YcmCompleter GoTo<CR>
|
|
|
|
|
|
|
|
" vim-airline config
|
|
|
|
let g:airline#extensions#whitespace#mixed_indent_algo = 2
|
2018-11-16 22:25:14 +00:00
|
|
|
let g:airline_solarized_bg='dark'
|
2018-10-29 19:12:46 +00:00
|
|
|
|
2018-11-15 13:32:04 +00:00
|
|
|
" Black config
|
|
|
|
autocmd BufWritePre *.py execute ':Black'
|
|
|
|
|
|
|
|
" vim-fswitch
|
2018-11-16 22:15:59 +00:00
|
|
|
nmap <ESC>o :FSHere<CR>
|
2018-11-15 13:32:04 +00:00
|
|
|
|
2018-11-15 19:37:34 +00:00
|
|
|
" vim-colors-solarized
|
|
|
|
set background=dark
|
|
|
|
colorscheme solarized
|
2018-11-16 22:15:59 +00:00
|
|
|
|
2018-11-20 06:45:07 +00:00
|
|
|
" fzf.vim
|
|
|
|
nmap <C-P> :Files<CR>
|
|
|
|
nmap <ESC><C-P> :Tags<CR>
|