dotfiles/vim/vimrc

76 lines
1.6 KiB
VimL
Raw Normal View History

2018-11-20 11:36:21 +00:00
if filereadable("~/.vimrc.local")
source ~/.vimrc.local
endif
2018-11-20 11:30:35 +00:00
2018-12-27 12:32:37 +00:00
packadd! termdebug
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')
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-27 07:52:12 +00:00
Plug 'itchyny/lightline.vim'
2018-11-15 12:22:05 +00:00
Plug 'ambv/black'
Plug 'altercation/vim-colors-solarized'
Plug 'craigemery/vim-autotag'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
2018-11-20 11:30:35 +00:00
Plug 'airblade/vim-gitgutter'
2018-12-05 11:57:26 +00:00
Plug 'tpope/vim-fugitive'
2019-01-27 14:15:57 +00:00
Plug 'linuor/ucmake.vim'
2018-11-15 12:22:05 +00:00
call plug#end()
" tabwidth
2016-09-23 23:13:08 +00:00
set tabstop=4
set shiftwidth=4
2018-11-27 07:52:12 +00:00
" dark theme
set background=dark
" line numbers
2016-09-23 23:13:08 +00:00
set number
2018-11-27 07:53:09 +00:00
" max line length column
set colorcolumn=100
" always enable status line
set laststatus=2
2018-11-16 22:15:59 +00:00
" ctags config
set tags=./tags;
2018-11-16 22:15:59 +00:00
nnoremap <F2> <C-]>
2018-11-27 07:54:13 +00:00
" autotag
let g:autotagmaxTagsFileSize = 1024 * 1024 * 128
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>
2018-11-27 07:52:12 +00:00
" lightline config
let g:lightline = { 'colorscheme': 'solarized' }
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
" vim-colors-solarized
colorscheme solarized
2018-11-16 22:15:59 +00:00
" fzf.vim
nmap <C-P> :Files<CR>
nmap <ESC><C-P> :Tags<CR>