mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-11-17 15:26:27 +00:00
Make more portable using vim-blink
This commit is contained in:
parent
f011bbe426
commit
14a598379a
2
.gitignore
vendored
2
.gitignore
vendored
@ -10,6 +10,7 @@ neovim/tmp/
|
||||
vim/.netrwhist
|
||||
vim/UltiSnips
|
||||
vim/autoload/plug.vim
|
||||
vim/autoload/blink.vim
|
||||
vim/autoload/plug.vim.old
|
||||
vim/backup/
|
||||
vim/plugged/
|
||||
@ -19,3 +20,4 @@ vim/spell/
|
||||
vim/tmp/
|
||||
vim/tmp/viminfo.*
|
||||
vim/view/
|
||||
vim/pack/
|
||||
|
14
vim/init.vim
14
vim/init.vim
@ -52,14 +52,16 @@ function! IsGuiApp()
|
||||
\ || has('gui_vimr') || exists('g:gui_oni')
|
||||
endfunction
|
||||
|
||||
" Auto install vim-plug
|
||||
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
|
||||
augroup pluginstall
|
||||
autocmd VimEnter * PlugInstall
|
||||
" Auto install vim-blink
|
||||
let data_dir = expand('~/.vim')
|
||||
if empty(glob(data_dir . '/autoload/blink.vim'))
|
||||
call mkdir(expand(data_dir.'/autoload'),'p')
|
||||
silent execute '!curl -fLo ' . data_dir . '/autoload/blink.vim --create-dirs https://raw.githubusercontent.com/IamTheFij/vim-blink/cmd-array/blink.vim'
|
||||
augroup blinkinstall
|
||||
autocmd VimEnter * BlinkUpdate
|
||||
augroup end
|
||||
endif
|
||||
call blink#init()
|
||||
|
||||
call s:smart_source_rc('init')
|
||||
call s:smart_source_rc('input')
|
||||
|
@ -13,29 +13,29 @@ endfunction
|
||||
" }} Functions
|
||||
|
||||
" General
|
||||
Plug 'godlygeek/tabular' " Tabular spacing
|
||||
Plug 'gregsexton/MatchTag'
|
||||
Plug 'tpope/vim-endwise'
|
||||
Plug 'tpope/vim-eunuch'
|
||||
Plug 'tpope/vim-repeat'
|
||||
Plug 'tpope/vim-rsi'
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'tpope/vim-vinegar'
|
||||
Plug 'vim-scripts/file-line'
|
||||
Blink 'gregsexton/MatchTag'
|
||||
Blink 'tpope/vim-endwise'
|
||||
Blink 'tpope/vim-eunuch'
|
||||
Blink 'tpope/vim-repeat'
|
||||
Blink 'tpope/vim-rsi'
|
||||
Blink 'tpope/vim-surround'
|
||||
Blink 'tpope/vim-vinegar'
|
||||
Blink 'vim-scripts/file-line'
|
||||
call s:smart_source_rc('plugins/airline')
|
||||
call s:smart_source_rc('plugins/startify')
|
||||
call s:smart_source_rc('plugins/goyo-limelight')
|
||||
Plug 'milkypostman/vim-togglelist'
|
||||
Blink 'milkypostman/vim-togglelist'
|
||||
nnoremap <silent> <F6> :call ToggleQuickfixList()<CR>
|
||||
nnoremap <silent> <F7> :call ToggleLocationList()<CR>
|
||||
" Plug 'edkolev/tmuxline.vim' " Removed because this can fail on some machines
|
||||
" Blink 'edkolev/tmuxline.vim' " Removed because this can fail on some machines
|
||||
" let g:tmuxline_powerline_separators = 0
|
||||
|
||||
" Searching
|
||||
if !executable('fzf')
|
||||
if executable('fzf')
|
||||
call s:smart_source_rc('plugins/fzf')
|
||||
else
|
||||
call s:smart_source_rc('plugins/ctrlp')
|
||||
endif
|
||||
call s:smart_source_rc('plugins/fzf')
|
||||
call s:smart_source_rc('plugins/vim-grepper')
|
||||
|
||||
" Git / Version control
|
||||
@ -43,21 +43,14 @@ call s:smart_source_rc('plugins/fugitive')
|
||||
call s:smart_source_rc('plugins/gitgutter')
|
||||
|
||||
" Programming
|
||||
Plug 'FooSoft/vim-argwrap'
|
||||
Blink 'FooSoft/vim-argwrap'
|
||||
nnoremap <silent> <leader>a :ArgWrap<CR>
|
||||
Plug 'tomtom/tcomment_vim', { 'on': ['TComment', 'TCommentBlock'] }
|
||||
Blink 'tomtom/tcomment_vim'
|
||||
nnoremap // :TComment<CR>
|
||||
vnoremap // :TCommentBlock<CR>
|
||||
Plug 'rizzatti/dash.vim', { 'on': 'DashSearch' }
|
||||
nmap <silent> <leader>d <Plug>DashSearch
|
||||
let g:dash_map = { 'apex' : 'apex', 'visualforce' : 'vf' }
|
||||
|
||||
" IDE stuff
|
||||
|
||||
" let l:is_vim8 = v:version >= 8
|
||||
" let l:is_nvim = has('nvim')
|
||||
" let l:is_nvim_5 = has('nvim-0.5')
|
||||
|
||||
" Lint and completion
|
||||
if has('nvim') || v:version >= 800
|
||||
" let g:ale_completion_enabled = 1
|
||||
@ -69,50 +62,32 @@ if has('nvim') || v:version >= 800
|
||||
return !col || getline('.')[col - 1] =~? '\s'
|
||||
endfunction
|
||||
|
||||
" " Enable asyncomplete
|
||||
" Plug 'prabirshrestha/asyncomplete.vim'
|
||||
" " Add ALE to asyncomplete
|
||||
" augroup acomp_setup
|
||||
" au User asyncomplete_setup call asyncomplete#register_source(asyncomplete#sources#ale#get_source_options({
|
||||
" \ 'priority': 10,
|
||||
" \ }))
|
||||
" au CompleteDone * if pumvisible() == 0 | pclose | endif
|
||||
" augroup end
|
||||
"
|
||||
" let g:asyncomplete_auto_popup = 0
|
||||
" " Make asyncomplete manually triggered
|
||||
" inoremap <silent><expr> <C-Space>
|
||||
" \ pumvisible() ? "\<C-n>" :
|
||||
" \ <SID>check_back_space() ? "\<TAB>" :
|
||||
" \ asyncomplete#force_refresh()
|
||||
"
|
||||
|
||||
set completeopt+=preview
|
||||
imap <silent> <C-Space> <Plug>(ale_complete)
|
||||
imap <silent> <C-Space> <Blink>(ale_complete)
|
||||
" inoremap <silent><expr> <C-Space>
|
||||
" \ pumvisible() ? "\<C-n>" :
|
||||
" \ <SID>check_back_space() ? "\<TAB>" :
|
||||
" \ <Plug>(ale_complete)
|
||||
" \ <Blink>(ale_complete)
|
||||
end
|
||||
|
||||
" Programming Tag navigation
|
||||
call s:smart_source_rc('plugins/tagbar')
|
||||
Plug 'ludovicchabant/vim-gutentags'
|
||||
Blink 'ludovicchabant/vim-gutentags'
|
||||
command! TagsUpdate :GutentagsUpdate
|
||||
|
||||
" Filetype configuration
|
||||
|
||||
" Languages with custom configuration
|
||||
" Custom Go
|
||||
Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' }
|
||||
Blink 'fatih/vim-go'
|
||||
" Custom rust
|
||||
let g:rustfmt_autosave = 1
|
||||
Plug 'rust-lang/rust.vim'
|
||||
Blink 'rust-lang/rust.vim'
|
||||
" Lots of custom python
|
||||
call s:smart_source_rc('plugins/python')
|
||||
" Disable polyglot for languages with more robust plugins
|
||||
let g:polyglot_disabled = ['go', 'rust']
|
||||
Plug 'sheerun/vim-polyglot'
|
||||
Blink 'sheerun/vim-polyglot'
|
||||
" Custom rule for ansible playbook detection
|
||||
augroup ansible_playbook
|
||||
au BufRead,BufNewFile */playbooks/*.yml set filetype=yaml.ansible
|
||||
@ -120,20 +95,12 @@ augroup ansible_playbook
|
||||
augroup end
|
||||
|
||||
" Languages not in polyglot
|
||||
Plug 'ViViDboarder/force-vim', { 'for': ['apex', 'visualforce'] }
|
||||
Plug 'ViViDboarder/vim-forcedotcom'
|
||||
Plug 'hsanson/vim-android'
|
||||
Plug 'pdurbin/vim-tsv'
|
||||
Blink 'ViViDboarder/force-vim'
|
||||
Blink 'ViViDboarder/vim-forcedotcom'
|
||||
Blink 'hsanson/vim-android'
|
||||
Blink 'pdurbin/vim-tsv'
|
||||
" }}
|
||||
|
||||
" Themes
|
||||
Plug 'altercation/vim-colors-solarized'
|
||||
Plug 'vim-scripts/wombat256.vim'
|
||||
|
||||
" Saving and loading specific versions of plugins
|
||||
call s:source_rc('plug-snapshot.rc.vim')
|
||||
function! s:save_snapshot()
|
||||
let l:f_path = fnameescape(expand('~/.vim/rc/plug-snapshot.rc.vim'))
|
||||
execute 'PlugSnapshot!' . l:f_path
|
||||
endfunction
|
||||
command! SavePlugSnapshot call s:save_snapshot()
|
||||
Blink 'altercation/vim-colors-solarized'
|
||||
Blink 'vim-scripts/wombat256.vim'
|
||||
|
@ -1,5 +1,5 @@
|
||||
Plug 'vim-airline/vim-airline'
|
||||
Plug 'vim-airline/vim-airline-themes'
|
||||
Blink 'vim-airline/vim-airline'
|
||||
Blink 'vim-airline/vim-airline-themes'
|
||||
" Use short-form mode text
|
||||
let g:airline_mode_map = {
|
||||
\ '__' : '-',
|
||||
|
@ -1,5 +1,5 @@
|
||||
" Install ALE
|
||||
Plug 'dense-analysis/ale'
|
||||
Blink 'dense-analysis/ale'
|
||||
let g:airline#extensions#ale#enabled = 1
|
||||
" Speed up first load time for quick editing
|
||||
let g:ale_lint_on_enter = 0
|
||||
|
@ -1,4 +1,4 @@
|
||||
Plug 'ctrlpvim/ctrlp.vim'
|
||||
Blink 'ctrlpvim/ctrlp.vim'
|
||||
" Configuration for ctrlp.vim
|
||||
|
||||
let g:ctrlp_in_use = 1
|
||||
|
@ -1,4 +1,4 @@
|
||||
Plug 'tpope/vim-fugitive' ", { 'on': ['Git'] }
|
||||
Blink 'tpope/vim-fugitive'
|
||||
" Mappings
|
||||
nnoremap <leader>gb :Git blame<CR>
|
||||
nnoremap <leader>gc :Git commit<CR>
|
||||
|
@ -1,5 +1,5 @@
|
||||
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': 'yes \| ./install' }
|
||||
Plug 'junegunn/fzf.vim'
|
||||
Blink 'junegunn/fzf'
|
||||
Blink 'junegunn/fzf.vim'
|
||||
let g:fzf_command_prefix = 'FZF'
|
||||
" Jump to existing window if possible
|
||||
let g:fzf_buffers_jump = 1
|
||||
|
@ -1,4 +1,4 @@
|
||||
Plug 'airblade/vim-gitgutter', { 'on': ['GitGutterSignsToggle'] }
|
||||
Blink 'airblade/vim-gitgutter'
|
||||
" Settings to keep gitgutter fast
|
||||
let g:gitgutter_enabled = 1
|
||||
" Will toggle signs when I want them
|
||||
|
@ -1,6 +1,6 @@
|
||||
" Both these plugins work well together for distraction free editing
|
||||
Plug 'junegunn/goyo.vim', { 'on': 'Goyo' }
|
||||
Plug 'junegunn/limelight.vim', { 'on': 'Limelight' }
|
||||
Blink 'junegunn/goyo.vim'
|
||||
Blink 'junegunn/limelight.vim'
|
||||
let g:goyo_width = 120
|
||||
|
||||
command Zen :Goyo
|
||||
|
@ -1,7 +1,7 @@
|
||||
" All Python plugins and settings
|
||||
Plug 'alfredodeza/coveragepy.vim', { 'for': 'python' }
|
||||
Plug 'alfredodeza/pytest.vim', { 'for': 'python' }
|
||||
Plug 'tmhedberg/SimpylFold', { 'for': 'python' }
|
||||
Blink 'alfredodeza/coveragepy.vim'
|
||||
Blink 'alfredodeza/pytest.vim'
|
||||
Blink 'tmhedberg/SimpylFold'
|
||||
nmap <silent><leader>ptp <Esc>:Pytest project<CR>
|
||||
nmap <silent><leader>ptf <Esc>:Pytest file<CR>
|
||||
nmap <silent><leader>ptm <Esc>:Pytest method<CR>
|
||||
|
@ -1,4 +1,4 @@
|
||||
Plug 'mhinz/vim-startify'
|
||||
Blink 'mhinz/vim-startify'
|
||||
let g:startify_list_order = [
|
||||
\ [' My Bookmarks'], 'bookmarks',
|
||||
\ [' Most recently used files in the current directory'], 'dir',
|
||||
|
@ -1,3 +1,3 @@
|
||||
Plug 'majutsushi/tagbar', { 'on': 'TagbarToggle' }
|
||||
Blink 'majutsushi/tagbar'
|
||||
nnoremap <silent> <F8> :TagbarToggle<CR>
|
||||
let g:tagbar_autofocus = 1 " Autofocus tagbar
|
||||
|
@ -1,4 +1,4 @@
|
||||
Plug 'mhinz/vim-grepper'
|
||||
Blink 'mhinz/vim-grepper'
|
||||
" Grepper settings and shortcuts
|
||||
let g:grepper = {
|
||||
\ 'quickfix': 1,
|
||||
|
Loading…
Reference in New Issue
Block a user