Make more portable using vim-blink

This commit is contained in:
ViViDboarder 2024-07-19 15:05:09 -07:00
parent f011bbe426
commit 14a598379a
14 changed files with 53 additions and 82 deletions

2
.gitignore vendored
View File

@ -10,6 +10,7 @@ neovim/tmp/
vim/.netrwhist vim/.netrwhist
vim/UltiSnips vim/UltiSnips
vim/autoload/plug.vim vim/autoload/plug.vim
vim/autoload/blink.vim
vim/autoload/plug.vim.old vim/autoload/plug.vim.old
vim/backup/ vim/backup/
vim/plugged/ vim/plugged/
@ -19,3 +20,4 @@ vim/spell/
vim/tmp/ vim/tmp/
vim/tmp/viminfo.* vim/tmp/viminfo.*
vim/view/ vim/view/
vim/pack/

View File

@ -52,14 +52,16 @@ function! IsGuiApp()
\ || has('gui_vimr') || exists('g:gui_oni') \ || has('gui_vimr') || exists('g:gui_oni')
endfunction endfunction
" Auto install vim-plug " Auto install vim-blink
if empty(glob('~/.vim/autoload/plug.vim')) let data_dir = expand('~/.vim')
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs if empty(glob(data_dir . '/autoload/blink.vim'))
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim call mkdir(expand(data_dir.'/autoload'),'p')
augroup pluginstall silent execute '!curl -fLo ' . data_dir . '/autoload/blink.vim --create-dirs https://raw.githubusercontent.com/IamTheFij/vim-blink/cmd-array/blink.vim'
autocmd VimEnter * PlugInstall augroup blinkinstall
autocmd VimEnter * BlinkUpdate
augroup end augroup end
endif endif
call blink#init()
call s:smart_source_rc('init') call s:smart_source_rc('init')
call s:smart_source_rc('input') call s:smart_source_rc('input')

View File

@ -13,29 +13,29 @@ endfunction
" }} Functions " }} Functions
" General " General
Plug 'godlygeek/tabular' " Tabular spacing Blink 'gregsexton/MatchTag'
Plug 'gregsexton/MatchTag' Blink 'tpope/vim-endwise'
Plug 'tpope/vim-endwise' Blink 'tpope/vim-eunuch'
Plug 'tpope/vim-eunuch' Blink 'tpope/vim-repeat'
Plug 'tpope/vim-repeat' Blink 'tpope/vim-rsi'
Plug 'tpope/vim-rsi' Blink 'tpope/vim-surround'
Plug 'tpope/vim-surround' Blink 'tpope/vim-vinegar'
Plug 'tpope/vim-vinegar' Blink 'vim-scripts/file-line'
Plug 'vim-scripts/file-line'
call s:smart_source_rc('plugins/airline') call s:smart_source_rc('plugins/airline')
call s:smart_source_rc('plugins/startify') call s:smart_source_rc('plugins/startify')
call s:smart_source_rc('plugins/goyo-limelight') call s:smart_source_rc('plugins/goyo-limelight')
Plug 'milkypostman/vim-togglelist' Blink 'milkypostman/vim-togglelist'
nnoremap <silent> <F6> :call ToggleQuickfixList()<CR> nnoremap <silent> <F6> :call ToggleQuickfixList()<CR>
nnoremap <silent> <F7> :call ToggleLocationList()<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 " let g:tmuxline_powerline_separators = 0
" Searching " Searching
if !executable('fzf') if executable('fzf')
call s:smart_source_rc('plugins/fzf')
else
call s:smart_source_rc('plugins/ctrlp') call s:smart_source_rc('plugins/ctrlp')
endif endif
call s:smart_source_rc('plugins/fzf')
call s:smart_source_rc('plugins/vim-grepper') call s:smart_source_rc('plugins/vim-grepper')
" Git / Version control " Git / Version control
@ -43,21 +43,14 @@ call s:smart_source_rc('plugins/fugitive')
call s:smart_source_rc('plugins/gitgutter') call s:smart_source_rc('plugins/gitgutter')
" Programming " Programming
Plug 'FooSoft/vim-argwrap' Blink 'FooSoft/vim-argwrap'
nnoremap <silent> <leader>a :ArgWrap<CR> nnoremap <silent> <leader>a :ArgWrap<CR>
Plug 'tomtom/tcomment_vim', { 'on': ['TComment', 'TCommentBlock'] } Blink 'tomtom/tcomment_vim'
nnoremap // :TComment<CR> nnoremap // :TComment<CR>
vnoremap // :TCommentBlock<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 " 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 " Lint and completion
if has('nvim') || v:version >= 800 if has('nvim') || v:version >= 800
" let g:ale_completion_enabled = 1 " let g:ale_completion_enabled = 1
@ -69,50 +62,32 @@ if has('nvim') || v:version >= 800
return !col || getline('.')[col - 1] =~? '\s' return !col || getline('.')[col - 1] =~? '\s'
endfunction 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 set completeopt+=preview
imap <silent> <C-Space> <Plug>(ale_complete) imap <silent> <C-Space> <Blink>(ale_complete)
" inoremap <silent><expr> <C-Space> " inoremap <silent><expr> <C-Space>
" \ pumvisible() ? "\<C-n>" : " \ pumvisible() ? "\<C-n>" :
" \ <SID>check_back_space() ? "\<TAB>" : " \ <SID>check_back_space() ? "\<TAB>" :
" \ <Plug>(ale_complete) " \ <Blink>(ale_complete)
end end
" Programming Tag navigation " Programming Tag navigation
call s:smart_source_rc('plugins/tagbar') call s:smart_source_rc('plugins/tagbar')
Plug 'ludovicchabant/vim-gutentags' Blink 'ludovicchabant/vim-gutentags'
command! TagsUpdate :GutentagsUpdate command! TagsUpdate :GutentagsUpdate
" Filetype configuration " Filetype configuration
" Languages with custom configuration " Languages with custom configuration
" Custom Go " Custom Go
Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' } Blink 'fatih/vim-go'
" Custom rust " Custom rust
let g:rustfmt_autosave = 1 let g:rustfmt_autosave = 1
Plug 'rust-lang/rust.vim' Blink 'rust-lang/rust.vim'
" Lots of custom python " Lots of custom python
call s:smart_source_rc('plugins/python') call s:smart_source_rc('plugins/python')
" Disable polyglot for languages with more robust plugins " Disable polyglot for languages with more robust plugins
let g:polyglot_disabled = ['go', 'rust'] let g:polyglot_disabled = ['go', 'rust']
Plug 'sheerun/vim-polyglot' Blink 'sheerun/vim-polyglot'
" Custom rule for ansible playbook detection " Custom rule for ansible playbook detection
augroup ansible_playbook augroup ansible_playbook
au BufRead,BufNewFile */playbooks/*.yml set filetype=yaml.ansible au BufRead,BufNewFile */playbooks/*.yml set filetype=yaml.ansible
@ -120,20 +95,12 @@ augroup ansible_playbook
augroup end augroup end
" Languages not in polyglot " Languages not in polyglot
Plug 'ViViDboarder/force-vim', { 'for': ['apex', 'visualforce'] } Blink 'ViViDboarder/force-vim'
Plug 'ViViDboarder/vim-forcedotcom' Blink 'ViViDboarder/vim-forcedotcom'
Plug 'hsanson/vim-android' Blink 'hsanson/vim-android'
Plug 'pdurbin/vim-tsv' Blink 'pdurbin/vim-tsv'
" }} " }}
" Themes " Themes
Plug 'altercation/vim-colors-solarized' Blink 'altercation/vim-colors-solarized'
Plug 'vim-scripts/wombat256.vim' Blink '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()

View File

@ -1,5 +1,5 @@
Plug 'vim-airline/vim-airline' Blink 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes' Blink 'vim-airline/vim-airline-themes'
" Use short-form mode text " Use short-form mode text
let g:airline_mode_map = { let g:airline_mode_map = {
\ '__' : '-', \ '__' : '-',

View File

@ -1,5 +1,5 @@
" Install ALE " Install ALE
Plug 'dense-analysis/ale' Blink 'dense-analysis/ale'
let g:airline#extensions#ale#enabled = 1 let g:airline#extensions#ale#enabled = 1
" Speed up first load time for quick editing " Speed up first load time for quick editing
let g:ale_lint_on_enter = 0 let g:ale_lint_on_enter = 0

View File

@ -1,4 +1,4 @@
Plug 'ctrlpvim/ctrlp.vim' Blink 'ctrlpvim/ctrlp.vim'
" Configuration for ctrlp.vim " Configuration for ctrlp.vim
let g:ctrlp_in_use = 1 let g:ctrlp_in_use = 1

View File

@ -1,4 +1,4 @@
Plug 'tpope/vim-fugitive' ", { 'on': ['Git'] } Blink 'tpope/vim-fugitive'
" Mappings " Mappings
nnoremap <leader>gb :Git blame<CR> nnoremap <leader>gb :Git blame<CR>
nnoremap <leader>gc :Git commit<CR> nnoremap <leader>gc :Git commit<CR>

View File

@ -1,5 +1,5 @@
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': 'yes \| ./install' } Blink 'junegunn/fzf'
Plug 'junegunn/fzf.vim' Blink 'junegunn/fzf.vim'
let g:fzf_command_prefix = 'FZF' let g:fzf_command_prefix = 'FZF'
" Jump to existing window if possible " Jump to existing window if possible
let g:fzf_buffers_jump = 1 let g:fzf_buffers_jump = 1

View File

@ -1,4 +1,4 @@
Plug 'airblade/vim-gitgutter', { 'on': ['GitGutterSignsToggle'] } Blink 'airblade/vim-gitgutter'
" Settings to keep gitgutter fast " Settings to keep gitgutter fast
let g:gitgutter_enabled = 1 let g:gitgutter_enabled = 1
" Will toggle signs when I want them " Will toggle signs when I want them

View File

@ -1,6 +1,6 @@
" Both these plugins work well together for distraction free editing " Both these plugins work well together for distraction free editing
Plug 'junegunn/goyo.vim', { 'on': 'Goyo' } Blink 'junegunn/goyo.vim'
Plug 'junegunn/limelight.vim', { 'on': 'Limelight' } Blink 'junegunn/limelight.vim'
let g:goyo_width = 120 let g:goyo_width = 120
command Zen :Goyo command Zen :Goyo

View File

@ -1,7 +1,7 @@
" All Python plugins and settings " All Python plugins and settings
Plug 'alfredodeza/coveragepy.vim', { 'for': 'python' } Blink 'alfredodeza/coveragepy.vim'
Plug 'alfredodeza/pytest.vim', { 'for': 'python' } Blink 'alfredodeza/pytest.vim'
Plug 'tmhedberg/SimpylFold', { 'for': 'python' } Blink 'tmhedberg/SimpylFold'
nmap <silent><leader>ptp <Esc>:Pytest project<CR> nmap <silent><leader>ptp <Esc>:Pytest project<CR>
nmap <silent><leader>ptf <Esc>:Pytest file<CR> nmap <silent><leader>ptf <Esc>:Pytest file<CR>
nmap <silent><leader>ptm <Esc>:Pytest method<CR> nmap <silent><leader>ptm <Esc>:Pytest method<CR>

View File

@ -1,4 +1,4 @@
Plug 'mhinz/vim-startify' Blink 'mhinz/vim-startify'
let g:startify_list_order = [ let g:startify_list_order = [
\ [' My Bookmarks'], 'bookmarks', \ [' My Bookmarks'], 'bookmarks',
\ [' Most recently used files in the current directory'], 'dir', \ [' Most recently used files in the current directory'], 'dir',

View File

@ -1,3 +1,3 @@
Plug 'majutsushi/tagbar', { 'on': 'TagbarToggle' } Blink 'majutsushi/tagbar'
nnoremap <silent> <F8> :TagbarToggle<CR> nnoremap <silent> <F8> :TagbarToggle<CR>
let g:tagbar_autofocus = 1 " Autofocus tagbar let g:tagbar_autofocus = 1 " Autofocus tagbar

View File

@ -1,4 +1,4 @@
Plug 'mhinz/vim-grepper' Blink 'mhinz/vim-grepper'
" Grepper settings and shortcuts " Grepper settings and shortcuts
let g:grepper = { let g:grepper = {
\ 'quickfix': 1, \ 'quickfix': 1,