2019-10-03 17:45:23 +00:00
|
|
|
" vimrc.local {{{
|
2018-11-20 11:36:21 +00:00
|
|
|
if filereadable("~/.vimrc.local")
|
|
|
|
source ~/.vimrc.local
|
|
|
|
endif
|
2019-10-03 17:45:23 +00:00
|
|
|
" }}}
|
2018-12-27 12:32:37 +00:00
|
|
|
|
2019-10-03 11:32:52 +00:00
|
|
|
" vim-plug installer {{{
|
2018-11-15 12:22:05 +00:00
|
|
|
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
|
2019-10-03 11:32:52 +00:00
|
|
|
" }}}
|
2018-11-15 12:22:05 +00:00
|
|
|
|
2019-10-03 11:32:52 +00:00
|
|
|
" vim-plug plugins {{{
|
2018-11-15 12:22:05 +00:00
|
|
|
call plug#begin('~/.vim/vim-plug')
|
2018-11-15 19:37:34 +00:00
|
|
|
|
2019-05-03 09:57:00 +00:00
|
|
|
" 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 08:33:45 +00:00
|
|
|
Plug 'Shougo/vimproc.vim', {'do' : 'make'}
|
|
|
|
|
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 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-20 11:30:35 +00:00
|
|
|
Plug 'airblade/vim-gitgutter'
|
2018-12-05 11:57:26 +00:00
|
|
|
Plug 'tpope/vim-fugitive'
|
2019-09-22 11:34:59 +00:00
|
|
|
Plug 'tpope/vim-surround'
|
2019-10-03 10:56:44 +00:00
|
|
|
Plug 'tpope/vim-obsession'
|
|
|
|
Plug 'dhruvasagar/vim-prosession'
|
2019-01-27 14:15:57 +00:00
|
|
|
Plug 'linuor/ucmake.vim'
|
2019-05-03 06:40:36 +00:00
|
|
|
Plug 'skywind3000/asyncrun.vim'
|
2019-05-28 15:15:39 +00:00
|
|
|
Plug 'markonm/traces.vim'
|
|
|
|
Plug 'christoomey/vim-tmux-navigator'
|
2018-11-15 19:37:34 +00:00
|
|
|
|
2018-11-15 12:22:05 +00:00
|
|
|
call plug#end()
|
2019-10-03 11:32:52 +00:00
|
|
|
" }}}
|
2016-09-23 23:22:54 +00:00
|
|
|
|
2019-10-03 17:45:23 +00:00
|
|
|
packadd! termdebug
|
|
|
|
|
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
|
|
|
|
2018-11-27 07:52:12 +00:00
|
|
|
" dark theme
|
|
|
|
set background=dark
|
|
|
|
|
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
|
|
|
|
|
2019-09-22 11:35:33 +00:00
|
|
|
" faster saving
|
|
|
|
set nofsync
|
|
|
|
|
2019-10-03 17:45:23 +00:00
|
|
|
" autoread/checktime timer {{{
|
2019-09-22 11:35:33 +00:00
|
|
|
set autoread
|
|
|
|
function CheckTime(timer)
|
|
|
|
checktime
|
|
|
|
endfunction
|
|
|
|
let timerChecktime = timer_start(4000, 'CheckTime', {'repeat': -1})
|
2019-10-03 17:45:23 +00:00
|
|
|
" }}}
|
2019-09-22 11:35:33 +00:00
|
|
|
|
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
|
|
|
|
2019-07-15 08:33:45 +00:00
|
|
|
" clang-format
|
|
|
|
let g:clang_format#auto_format = 1
|
|
|
|
let g:clang_format#enable_fallback_style = 0
|
|
|
|
|
2018-11-27 07:54:13 +00:00
|
|
|
" autotag
|
|
|
|
let g:autotagmaxTagsFileSize = 1024 * 1024 * 128
|
|
|
|
|
2019-05-03 09:57:00 +00:00
|
|
|
" deoplete
|
|
|
|
let g:deoplete#enable_at_startup = 1
|
2019-05-28 15:15:39 +00:00
|
|
|
autocmd CompleteDone * silent! pclose!
|
2019-05-03 09:57:00 +00:00
|
|
|
call deoplete#custom#source('_', 'matchers', ['matcher_full_fuzzy'])
|
2019-09-22 11:44:05 +00:00
|
|
|
|
2019-05-03 09:57:00 +00:00
|
|
|
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'],
|
2019-09-22 11:44:05 +00:00
|
|
|
\ 'cpp': ['/usr/lib/llvm/8/bin/clangd'],
|
2019-05-03 09:57:00 +00:00
|
|
|
\ }
|
2018-10-29 19:12:46 +00:00
|
|
|
|
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
|
|
|
" 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
|
|
|
|
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>
|
2019-10-03 10:57:35 +00:00
|
|
|
nmap <C-F> :Rg \b<C-R><C-W>\b<CR>
|
2018-11-20 06:45:07 +00:00
|
|
|
nmap <ESC><C-P> :Tags<CR>
|
2019-01-29 19:17:22 +00:00
|
|
|
|
|
|
|
" terminal colors
|
|
|
|
hi Terminal ctermfg=fg ctermbg=NONE guifg=fg guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
|
|
|
|
2019-02-28 07:59:01 +00:00
|
|
|
" incremental searching
|
|
|
|
set incsearch
|
|
|
|
set hlsearch
|
2019-05-03 06:40:36 +00:00
|
|
|
|
|
|
|
" asynrun.vim
|
|
|
|
let g:asyncrun_open = 16
|
2019-10-03 11:32:52 +00:00
|
|
|
|
2019-10-03 17:20:27 +00:00
|
|
|
" prosession
|
|
|
|
let g:prosession_tmux_title = 1
|
|
|
|
let g:prosession_per_branch = 1
|
2019-10-03 17:44:11 +00:00
|
|
|
|
|
|
|
" modeline
|
|
|
|
set modeline
|
|
|
|
set modelines=5
|
|
|
|
|
|
|
|
" vim: foldmethod=marker foldmarker={{{,}}}
|