|
@@ -5,52 +5,17 @@ Plug 'tpope/vim-sleuth'
|
|
|
Plug 'tpope/vim-fugitive'
|
|
|
Plug 'tpope/vim-surround'
|
|
|
Plug 'tpope/vim-abolish'
|
|
|
-Plug 'bling/vim-airline'
|
|
|
+
|
|
|
+Plug 'itchyny/lightline.vim'
|
|
|
Plug 'mhinz/vim-signify'
|
|
|
Plug 'sjl/gundo.vim'
|
|
|
-Plug 'Shougo/denite.nvim', { 'do': ':UpdateRemotePlugins' }
|
|
|
-Plug 'Shougo/deoplete.nvim'
|
|
|
Plug 'EinfachToll/DidYouMean'
|
|
|
-Plug 'diepm/vim-rest-console'
|
|
|
Plug 'idanarye/vim-merginal'
|
|
|
-Plug 'vimwiki/vimwiki'
|
|
|
-Plug 'neomake/neomake'
|
|
|
-
|
|
|
-Plug 'vim-scripts/dbext.vim', {'for': 'sql'}
|
|
|
-Plug 'cespare/vim-toml'
|
|
|
-Plug 'chrisbra/csv.vim'
|
|
|
-
|
|
|
-if executable('lein')
|
|
|
- Plug 'guns/vim-sexp'
|
|
|
- Plug 'tpope/vim-sexp-mappings-for-regular-people'
|
|
|
- Plug 'tpope/vim-fireplace', {'for': 'clojure'}
|
|
|
-endif
|
|
|
-
|
|
|
-if executable('sbt')
|
|
|
- Plug 'derekwyatt/vim-scala'
|
|
|
-endif
|
|
|
-
|
|
|
-if executable('kotlin')
|
|
|
- Plug 'udalov/kotlin-vim'
|
|
|
-endif
|
|
|
-
|
|
|
-if executable('ansible')
|
|
|
- Plug 'pearofducks/ansible-vim'
|
|
|
-endif
|
|
|
+Plug 'junegunn/fzf'
|
|
|
+Plug 'junegunn/fzf.vim'
|
|
|
|
|
|
-if executable('rustc')
|
|
|
- Plug 'rust-lang/rust.vim'
|
|
|
-endif
|
|
|
-
|
|
|
-if executable('npm')
|
|
|
- Plug 'pangloss/vim-javascript'
|
|
|
- Plug 'mxw/vim-jsx'
|
|
|
- Plug 'leafgarland/typescript-vim'
|
|
|
-" Plug 'mhartington/nvim-typescript', { 'do': 'bash install.sh' }
|
|
|
-endif
|
|
|
-
|
|
|
-if executable('qml')
|
|
|
- Plug 'peterhoeg/vim-qml'
|
|
|
+if filereadable(expand('~/.vim/local-plugins.vim'))
|
|
|
+ source ~/.vim/local-plugins.vim
|
|
|
endif
|
|
|
|
|
|
Plug 'trusktr/seti.vim'
|
|
@@ -58,96 +23,21 @@ Plug 'trusktr/seti.vim'
|
|
|
call plug#end()
|
|
|
|
|
|
" ----- plugin settings ------
|
|
|
-let g:deoplete#enable_at_startup = 1
|
|
|
let g:signify_vcs_list = [ 'git' ]
|
|
|
|
|
|
-let g:jsx_ext_required = 0
|
|
|
-
|
|
|
-let g:airline_left_sep=''
|
|
|
-let g:airline_right_sep=''
|
|
|
-
|
|
|
-let g:vimwiki_list = [{'path': '~/.root/home/wiki'}]
|
|
|
-
|
|
|
-let s:node_modules_path = system('yarn bin')
|
|
|
-let s:node_modules_path = strpart(s:node_modules_path, 0, len(s:node_modules_path) - 1)
|
|
|
-let g:neomake_javascript_enabled_makers = ['eslint']
|
|
|
-let g:neomake_javascript_eslint_exe = s:node_modules_path.'/eslint'
|
|
|
-let g:neomake_typescript_enabled_makers = ['tslint']
|
|
|
-let g:neomake_typescript_tslint_exe = s:node_modules_path.'/tslint'
|
|
|
-call neomake#configure#automake('w')
|
|
|
-
|
|
|
-let g:nvim_typescript#javascript_support = 1
|
|
|
-
|
|
|
-" Or map each action separately
|
|
|
-nnoremap <silent> K :TSDoc<CR>
|
|
|
-nnoremap <silent> gd :TSDef<CR>
|
|
|
-nnoremap <silent> <F2> :TSRename<CR>
|
|
|
-nnoremap <Leader>li :TSImport<CR>
|
|
|
-
|
|
|
-let g:vrc_curl_opts = {
|
|
|
- \ '-L': '',
|
|
|
- \ '-i': '',
|
|
|
- \ '-s': '',
|
|
|
- \ '-S': ''
|
|
|
- \}
|
|
|
-
|
|
|
-call denite#custom#option('_', 'cursor_wrap', 1)
|
|
|
-call denite#custom#option('_', 'prompt', '>')
|
|
|
-call denite#custom#option('_', 'updatetime', 16)
|
|
|
-
|
|
|
-call denite#custom#map(
|
|
|
- \ 'insert',
|
|
|
- \ 'jj',
|
|
|
- \ '<denite:quit>',
|
|
|
- \ 'noremap'
|
|
|
- \)
|
|
|
-call denite#custom#map(
|
|
|
- \ 'insert',
|
|
|
- \ '<C-j>',
|
|
|
- \ '<denite:move_to_next_line>',
|
|
|
- \ 'noremap'
|
|
|
- \)
|
|
|
-call denite#custom#map(
|
|
|
- \ 'insert',
|
|
|
- \ '<C-k>',
|
|
|
- \ '<denite:move_to_previous_line>',
|
|
|
- \ 'noremap'
|
|
|
- \)
|
|
|
-call denite#custom#map(
|
|
|
- \ 'insert',
|
|
|
- \ '<C-s>',
|
|
|
- \ '<denite:do_action:split>',
|
|
|
- \ 'noremap'
|
|
|
- \)
|
|
|
-call denite#custom#map(
|
|
|
- \ 'insert',
|
|
|
- \ '<C-v>',
|
|
|
- \ '<denite:do_action:vsplit>',
|
|
|
- \ 'noremap'
|
|
|
- \)
|
|
|
-
|
|
|
-" use rg or ag if present
|
|
|
-if executable('rg')
|
|
|
- call denite#custom#var('file_rec', 'command',
|
|
|
- \ ['rg', '--files', '--glob', '!.git'])
|
|
|
- call denite#custom#var('grep', 'command', ['rg'])
|
|
|
- call denite#custom#var('grep', 'default_opts',
|
|
|
- \ ['--vimgrep', '--no-heading'])
|
|
|
- call denite#custom#var('grep', 'recursive_opts', [])
|
|
|
- call denite#custom#var('grep', 'pattern_opt', ['--regexp'])
|
|
|
- call denite#custom#var('grep', 'separator', ['--'])
|
|
|
- call denite#custom#var('grep', 'final_opts', [])
|
|
|
-elseif executable('ag')
|
|
|
- call denite#custom#var('file_rec', 'command',
|
|
|
- \ ['ag', '--follow', '--nocolor', '--nogroup', '-g', ''])
|
|
|
- call denite#custom#var('grep', 'command', ['ag'])
|
|
|
- call denite#custom#var('grep', 'default_opts',
|
|
|
- \ ['-i', '--vimgrep'])
|
|
|
- call denite#custom#var('grep', 'recursive_opts', [])
|
|
|
- call denite#custom#var('grep', 'pattern_opt', [])
|
|
|
- call denite#custom#var('grep', 'separator', ['--'])
|
|
|
- call denite#custom#var('grep', 'final_opts', [])
|
|
|
-endif
|
|
|
+let g:lightline = {
|
|
|
+ \ 'colorscheme': 'wombat',
|
|
|
+ \ 'active': {
|
|
|
+ \ 'left': [ [ 'mode', 'paste' ],
|
|
|
+ \ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
|
|
|
+ \ },
|
|
|
+ \ 'component_function': {
|
|
|
+ \ 'gitbranch': 'fugitive#head'
|
|
|
+ \ },
|
|
|
+ \ }
|
|
|
+
|
|
|
+autocmd FileType fzf setlocal nonumber norelativenumber
|
|
|
+autocmd FileType fzf tnoremap <buffer> jj <Esc>
|
|
|
|
|
|
" ------ settings ------
|
|
|
|
|
@@ -211,15 +101,15 @@ vnoremap j gj
|
|
|
vnoremap k gk
|
|
|
|
|
|
" opening unite
|
|
|
-nnoremap <C-P> :Denite file_rec<cr>
|
|
|
-nnoremap <C-O> :Denite buffer<cr>
|
|
|
+nnoremap <C-P> :GFiles<cr>
|
|
|
+nnoremap <C-O> :Buffers<cr>
|
|
|
|
|
|
imap <C-W> <ESC><C-W>
|
|
|
nnoremap <C-T>h :tabprev<cr>
|
|
|
nnoremap <C-T>l :tabnext<cr>
|
|
|
|
|
|
" grepper
|
|
|
-nnoremap <Leader>f :Denite -mode=normal grep:.<CR>
|
|
|
+nnoremap <Leader>f :Rg
|
|
|
|
|
|
" git
|
|
|
nnoremap <Leader>gs :Gstatus<CR>
|
|
@@ -236,23 +126,9 @@ nnoremap <Leader>vs :source $MYVIMRC<CR>
|
|
|
if has('nvim')
|
|
|
set inccommand=split
|
|
|
|
|
|
- let g:airline_theme_patch_func = 'AirlineThemePatch'
|
|
|
- function! AirlineThemePatch(palette)
|
|
|
- let a:palette.terminal = copy(a:palette.insert)
|
|
|
- endfunction
|
|
|
-
|
|
|
- let g:terminal_scrollback_buffer_size = 10000
|
|
|
-
|
|
|
- tnoremap <C-j><C-j> <C-\><C-N>
|
|
|
- tmap <C-T> <C-\><C-N><C-T>
|
|
|
- tmap <C-W> <C-\><C-N><C-W>
|
|
|
- tmap <C-P> <C-\><C-N><C-P>
|
|
|
- tmap <C-O> <C-\><C-N><C-O>
|
|
|
-
|
|
|
- tnoremap <C-V><C-V><C-V> <C-V><C-V>
|
|
|
- tnoremap <C-V><C-V> <C-V>
|
|
|
- tnoremap <C-V> <C-\><C-N>"+pi
|
|
|
+ tnoremap <C-[><C-[> <C-\><C-N>
|
|
|
|
|
|
+ autocmd TermOpen term://* startinsert
|
|
|
autocmd BufWinEnter,WinEnter term://* startinsert
|
|
|
autocmd BufLeave term://* stopinsert
|
|
|
|
|
@@ -269,6 +145,6 @@ augroup end
|
|
|
|
|
|
colorscheme seti
|
|
|
|
|
|
-if filereadable(expand('~/.vimrc.local'))
|
|
|
- source ~/.vimrc.local
|
|
|
+if filereadable(expand('~/.vim/local-config.vim'))
|
|
|
+ source ~/.vim/local-config.vim
|
|
|
endif
|