58 lines
1.2 KiB
VimL
58 lines
1.2 KiB
VimL
" 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')
|
|
|
|
Plug 'valloric/youcompleteme'
|
|
Plug 'rhysd/vim-clang-format'
|
|
Plug 'derekwyatt/vim-fswitch'
|
|
Plug 'vim-airline/vim-airline'
|
|
Plug 'vim-airline/vim-airline-themes'
|
|
Plug 'ambv/black'
|
|
Plug 'altercation/vim-colors-solarized'
|
|
Plug 'kien/ctrlp.vim'
|
|
Plug 'craigemery/vim-autotag'
|
|
|
|
call plug#end()
|
|
|
|
" tabwidth
|
|
set tabstop=4
|
|
set shiftwidth=4
|
|
|
|
" line numbers
|
|
set number
|
|
|
|
" always enable status line
|
|
set laststatus=2
|
|
|
|
" ctags config
|
|
set tags=./tags;
|
|
nnoremap <F2> <C-]>
|
|
|
|
" 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
|
|
let g:airline_solarized_bg='dark'
|
|
|
|
" Black config
|
|
autocmd BufWritePre *.py execute ':Black'
|
|
|
|
" vim-fswitch
|
|
nmap <ESC>o :FSHere<CR>
|
|
|
|
" vim-colors-solarized
|
|
set background=dark
|
|
colorscheme solarized
|
|
|
|
" CtrlP
|
|
nmap <ESC><C-P> :CtrlPTag<CR>
|