dotfiles/vim/vimrc

121 lines
2.6 KiB
VimL
Raw Normal View History

2018-11-20 12:36:21 +01:00
if filereadable("~/.vimrc.local")
source ~/.vimrc.local
endif
2018-11-20 12:30:35 +01:00
2018-12-27 13:32:37 +01:00
packadd! termdebug
2018-11-15 13:22:05 +01: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')
" deoplete
Plug 'Shougo/deoplete.nvim'
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'
" LanguageClient-neovim
Plug 'autozimu/LanguageClient-neovim', { 'branch': 'next', 'do': 'bash install.sh', }
2019-07-15 10:33:45 +02:00
Plug 'Shougo/vimproc.vim', {'do' : 'make'}
2018-11-15 13:22:05 +01:00
Plug 'rhysd/vim-clang-format'
2018-11-15 14:32:04 +01:00
Plug 'derekwyatt/vim-fswitch'
2018-11-27 08:52:12 +01:00
Plug 'itchyny/lightline.vim'
2018-11-15 13:22:05 +01: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 12:30:35 +01:00
Plug 'airblade/vim-gitgutter'
2018-12-05 12:57:26 +01:00
Plug 'tpope/vim-fugitive'
2019-09-22 13:34:59 +02:00
Plug 'tpope/vim-surround'
2019-01-27 15:15:57 +01:00
Plug 'linuor/ucmake.vim'
2019-05-03 08:40:36 +02:00
Plug 'skywind3000/asyncrun.vim'
2019-05-28 17:15:39 +02:00
Plug 'markonm/traces.vim'
Plug 'christoomey/vim-tmux-navigator'
2018-11-15 13:22:05 +01:00
call plug#end()
" tabwidth
2016-09-24 01:13:08 +02:00
set tabstop=4
set shiftwidth=4
2018-11-27 08:52:12 +01:00
" dark theme
set background=dark
" line numbers
2016-09-24 01:13:08 +02:00
set number
" always enable status line
set laststatus=2
" faster saving
set nofsync
" autoread/checktime timer
set autoread
function CheckTime(timer)
checktime
endfunction
let timerChecktime = timer_start(4000, 'CheckTime', {'repeat': -1})
2018-11-16 23:15:59 +01:00
" ctags config
set tags=./tags;
2018-11-16 23:15:59 +01:00
nnoremap <F2> <C-]>
2019-07-15 10:33:45 +02:00
" clang-format
let g:clang_format#auto_format = 1
let g:clang_format#enable_fallback_style = 0
2018-11-27 08:54:13 +01:00
" autotag
let g:autotagmaxTagsFileSize = 1024 * 1024 * 128
" deoplete
let g:deoplete#enable_at_startup = 1
2019-05-28 17:15:39 +02:00
autocmd CompleteDone * silent! pclose!
call deoplete#custom#source('_', 'matchers', ['matcher_full_fuzzy'])
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
" LanguageClient-neovim
set hidden
nnoremap <F5> :call LanguageClient_contextMenu()<CR>
nnoremap <F12> :call LanguageClient#textDocument_definition()<CR>
let g:LanguageClient_serverCommands = {
\ 'python': ['pyls'],
\ 'cpp': ['clangd'],
\ }
2018-10-29 20:12:46 +01:00
2018-11-27 08:52:12 +01:00
" lightline config
let g:lightline = { 'colorscheme': 'solarized' }
2018-10-29 20:12:46 +01:00
2018-11-15 14:32:04 +01:00
" Black config
autocmd BufWritePre *.py execute ':Black'
" vim-fswitch
2018-11-16 23:15:59 +01:00
nmap <ESC>o :FSHere<CR>
2018-11-15 14:32:04 +01:00
" vim-colors-solarized
colorscheme solarized
2018-11-16 23:15:59 +01:00
" fzf.vim
nmap <C-P> :Files<CR>
2019-07-15 10:58:17 +02:00
nmap <C-F> :Rg<CR>
nmap <ESC><C-P> :Tags<CR>
" terminal colors
hi Terminal ctermfg=fg ctermbg=NONE guifg=fg guibg=NONE guisp=NONE cterm=NONE gui=NONE
2019-02-28 08:59:01 +01:00
" incremental searching
set incsearch
set hlsearch
2019-05-03 08:40:36 +02:00
" asynrun.vim
let g:asyncrun_open = 16