~gpanders/dotfiles

f6b89e96bec11aa51e69eb2014b15919d5a9ad6b — Greg Anders 2 years ago de02c1e
[vim] Update plugin headers and guards
M vim/.vim/after/plugin/ale.vim => vim/.vim/after/plugin/ale.vim +3 -2
@@ 1,8 1,9 @@
" ALE configuration
" This file is executed AFTER ALE is loaded
" Author: Greg Anders
" Author: Greg Anders <greg@gpanders.com>
" Date: 2019-01-23

if !exists('g:loaded_ale')
if !get(g:, 'loaded_ale', 0)
  finish
endif


M vim/.vim/after/plugin/coc.vim => vim/.vim/after/plugin/coc.vim +3 -2
@@ 1,7 1,8 @@
" coc.nvim configuration
" Author: Greg Anders
" Author: Greg Anders <greg@gpanders.com>
" Date: 2019-01-04

if !exists('g:did_coc_loaded') || !has('nvim')
if !get(g:, 'did_coc_loaded', 0) || !has('nvim')
  finish
endif


M vim/.vim/after/plugin/denite.vim => vim/.vim/after/plugin/denite.vim +2 -2
@@ 1,10 1,10 @@
if !exists('g:loaded_denite')
if !get(g:, 'loaded_denite', 0)
  finish
endif

if executable('rg')
  call denite#custom#var('file/rec', 'command',
        \ ['rg', '--files', '--glob', '!.git']) 
        \ ['rg', '--files', '--glob', '!.git'])
  call denite#custom#var('grep', 'command', ['rg'])
  call denite#custom#var('grep', 'default_opts',
        \ ['-S', '--vimgrep', '--no-heading'])

M vim/.vim/after/plugin/dirvish.vim => vim/.vim/after/plugin/dirvish.vim +5 -1
@@ 1,4 1,8 @@
if !exists('g:loaded_dirvish')
" vim-dirvish configuration
" Author: Greg Anders <greg@gpanders.com>
" Date: 2018-12-06

if !get(g:, 'loaded_dirvish', 0)
  unlet g:loaded_netrwPlugin
  runtime plugin/netrwPlugin.vim
  finish

M vim/.vim/after/plugin/dispatch.vim => vim/.vim/after/plugin/dispatch.vim +5 -1
@@ 1,4 1,8 @@
if !exists('g:loaded_dispatch')
" vim-dispatch configuration
" Author: Greg Anders <greg@gpanders.com>
" Date: 2018-12-03

if !get(g:, 'loaded_dispatch', 0)
  finish
endif


M vim/.vim/after/plugin/fugitive.vim => vim/.vim/after/plugin/fugitive.vim +5 -1
@@ 1,4 1,8 @@
if !exists('g:loaded_fugitive')
" vim-fugitive configuration
" Author: Greg Anders <greg@gpanders.com>
" Date: 2018-12-03

if !get(g:, 'loaded_fugitive', 0)
  finish
endif


M vim/.vim/after/plugin/fzf.vim => vim/.vim/after/plugin/fzf.vim +1 -1
@@ 1,5 1,5 @@
" FZF must be installed to ~/.fzf
if !exists('g:loaded_fzf')
if !get(g:, 'loaded_fzf', 0)
  finish
endif


M vim/.vim/after/plugin/gutentags.vim => vim/.vim/after/plugin/gutentags.vim +5 -1
@@ 1,4 1,8 @@
if !exists('g:loaded_gutentags')
" vim-gutentags configuration
" Author: Greg Anders <greg@gpanders.com>
" Date: 2018-12-03

if !get(g:, 'loaded_gutentags', 0)
  finish
endif


M vim/.vim/after/plugin/limelight.vim => vim/.vim/after/plugin/limelight.vim +4 -0
@@ 1,3 1,7 @@
" vim-limelight configuration
" Author: Greg Anders <greg@gpanders.com>
" Date: 2019-02-19

if !exists(':Limelight')
  finish
endif

M vim/.vim/after/plugin/lsp.vim => vim/.vim/after/plugin/lsp.vim +5 -1
@@ 1,4 1,8 @@
if !exists('g:lsp_loaded')
" vim-lsp configuration
" Author: Greg Anders <greg@gpanders.com>
" Date: 2018-12-03

if !get(g:, 'lsp_loaded', 0)
  finish
endif


M vim/.vim/after/plugin/projectionist.vim => vim/.vim/after/plugin/projectionist.vim +20 -6
@@ 1,8 1,20 @@
if !exists('g:loaded_projectionist')
" vim-projectionist configuration
" Author: Greg Anders <greg@gpanders.com>
" Date: 2019-01-04

if !get(g:, 'loaded_projectionist', 0)
  finish
endif

let g:projectionist_heuristics ={
if !exists('g:projectionist_transformations')
  let g:projectionist_transformations = {}
endif

function! g:projectionist_transformations.date(input, o) abort
  return strftime('%Y-%m-%d')
endfunction

let g:projectionist_heuristics = {
      \ 'Cargo.toml&src/': {
      \   'src/*.rs': {'type': 'src'},
      \   'Cargo.toml': {'type': 'toml' }


@@ 11,19 23,21 @@ let g:projectionist_heuristics ={
      \   'vimrc': { 'type': 'vimrc' },
      \   'plugin/*.vim': {
      \     'type': 'plugin',
      \     'template': ['" {} configuration', '" Author: Greg Anders', '', 'if <condition>', "\tfinish", 'endif']
      \     'template': ['" {}', '" Author: Greg Anders <greg@gpanders.com>', '" Date: {date}', '', 'if 0', "\tfinish", 'endif'],
      \     'alternate': 'after/plugin/{}.vim'
      \   },
      \   'after/plugin/*.vim': {
      \     'type': 'plugin',
      \     'template': ['" {}', '" Author: Greg Anders', '', 'if <condition>', "\tfinish", 'endif']
      \     'template': ['" {}', '" Author: Greg Anders <greg@gpanders.com>', '" Date: {date}', '', 'if 0', "\tfinish", 'endif'],
      \     'alternate': 'plugin/{}.vim'
      \   },
      \   'ftplugin/*.vim': {
      \     'type': 'ftplugin',
      \     'template': ['" {} filetype plugin', '" Author: Greg Anders', '', 'if &filetype !=# ''{}''', "\tfinish", 'endif']
      \     'template': ['" {} filetype plugin', '" Author: Greg Anders <greg@gpanders.com>', '', 'if &filetype !=# ''{}''', "\tfinish", 'endif']
      \   },
      \   'after/ftplugin/*.vim': {
      \     'type': 'ftplugin',
      \     'template': ['" {} filetype plugin', '" Author: Greg Anders', '', 'if &filetype !=# ''{}''', "\tfinish", 'endif']
      \     'template': ['" {} filetype plugin', '" Author: Greg Anders <greg@gpanders.com>', '', 'if &filetype !=# ''{}''', "\tfinish", 'endif']
      \   },
      \   'compiler/*.vim': {
      \     'type': 'compiler',

M vim/.vim/after/plugin/qf.vim => vim/.vim/after/plugin/qf.vim +5 -1
@@ 1,4 1,8 @@
if !exists('g:loaded_qf')
" vim-qf configuration
" Author: Greg Anders <greg@gpanders.com>
" Date: 2018-12-09

if !get(g:, 'loaded_qf', 0)
  finish
endif


M vim/.vim/after/plugin/sneak.vim => vim/.vim/after/plugin/sneak.vim +3 -2
@@ 1,7 1,8 @@
" vim-sneak configuration
" Author: Greg Anders
" Author: Greg Anders <greg@gpanders.com>
" Date: 2018-12-03

if !exists('g:loaded_sneak_plugin')
if !get(g:, 'loaded_sneak_plugin', 0)
  finish
endif


M vim/.vim/after/plugin/startify.vim => vim/.vim/after/plugin/startify.vim +5 -2
@@ 1,11 1,14 @@
" vim-startify configuration
" Author: Greg Anders
" Author: Greg Anders <greg@gpanders.com>
" Date: 2019-02-13

if !exists('g:loaded_startify')
if !get(g:, 'loaded_startify', 0)
  finish
endif

let g:startify_session_persistence = 1
let g:startify_change_to_vcs_root = 1
let g:startify_fortune_use_unicode = 1
let g:startify_bookmarks = [{'c': $MYVIMRC}]

" Add wikis to bookmarks

M vim/.vim/after/plugin/tabular.vim => vim/.vim/after/plugin/tabular.vim +5 -1
@@ 1,4 1,8 @@
if !exists('g:tabular_loaded')
" tabular configuration
" Author: Greg Anders <greg@gpanders.com>
" Date: 2019-01-08

if !get(g:, 'tabular_loaded', 0)
  finish
endif


M vim/.vim/after/plugin/test.vim => vim/.vim/after/plugin/test.vim +4 -1
@@ 1,5 1,8 @@
" Configuration for vim-test
if !exists('g:loaded_test')
" Author: Greg Anders <greg@gpanders.com>
" Date: 2019-02-19

if !get(g:, 'loaded_test', 0)
  finish
endif


M vim/.vim/after/plugin/ultisnips.vim => vim/.vim/after/plugin/ultisnips.vim +2 -1
@@ 1,5 1,6 @@
" ultisnips configuration
" Author: Greg Anders
" Author: Greg Anders <greg@gpanders.com>
" Date: 2019-02-27

if !get(g:, 'did_plugin_ultisnips', 0)
  finish

M vim/.vim/after/plugin/vimtex.vim => vim/.vim/after/plugin/vimtex.vim +4 -0
@@ 1,3 1,7 @@
" vimtex configuration
" Author: Greg Anders <greg@gpanders.com>
" Date: 2018-12-03

if executable('skim')
  let g:vimtex_view_method = 'skim'
endif

M vim/.vim/autoload/pack_install.vim => vim/.vim/autoload/pack_install.vim +1 -0
@@ 1,5 1,6 @@
" Install and remove packages from vim's pack directory
" Author: Greg Anders <greg@gpanders.com>
" Date: 2018-12-04

if g:os ==# 'Windows'
  let g:pack_install#pack_dir = $HOME . '\vimfiles\pack\'

M vim/.vim/plugin/ale.vim => vim/.vim/plugin/ale.vim +2 -1
@@ 1,6 1,7 @@
" ALE configuration
" This file is executed BEFORE ALE is loaded
" Author: Greg Anders
" Author: Greg Anders <greg@gpanders.com>
" Date: 2019-02-27

" This variable must be set before ALE is loaded so that it can create the
" proper autocmds

M vim/.vim/plugin/binary.vim => vim/.vim/plugin/binary.vim +7 -0
@@ 1,3 1,10 @@
" Improved editing of binary files
" This makes vim a slightly more tolerable hex editor, although there are
" still better options out there
" Most of the magic happens in the xxd filetype plugin, not here
" Author: Greg Anders <greg@gpanders.com>
" Date: 2018-12-24

augroup Binary
  autocmd!
  autocmd BufReadPost  * if &bin | %!xxd

M vim/.vim/plugin/coc.vim => vim/.vim/plugin/coc.vim +5 -0
@@ 1,3 1,8 @@
" coc configuration
" This file is executed BEFORE coc.nvim is loaded
" Author: Greg Anders <greg@gpanders.com>
" Date: 2019-02-25

" Only load coc when using nvim
if !has('nvim')
  let g:did_coc_loaded = 1

M vim/.vim/plugin/cursorline.vim => vim/.vim/plugin/cursorline.vim +2 -1
@@ 1,5 1,6 @@
" Highlight the current line in the current window but disable in Insert mode
" Author: Greg Anders
" Author: Greg Anders <greg@gpanders.com>
" Date: 2019-02-25

if exists('g:loaded_cursorline')
  finish

M vim/.vim/plugin/dirvish.vim => vim/.vim/plugin/dirvish.vim +5 -0
@@ 1,2 1,7 @@
" vim-dirvish configuration
" This file is executed BEFORE vim-dirvish is loaded
" Author: Greg Anders <greg@gpanders.com>
" Date: 2018-12-19

" Prevent netrw plugin from loading
let g:loaded_netrwPlugin = 1

M vim/.vim/plugin/pack_install.vim => vim/.vim/plugin/pack_install.vim +4 -0
@@ 1,3 1,7 @@
" Ultra-minimal package manager for vim
" Author: Greg Anders <greg@gpanders.com>
" Date: 2018-12-04

" Disable this plugin for now
if 0


M vim/.vim/plugin/pyterm.vim => vim/.vim/plugin/pyterm.vim +4 -0
@@ 1,1 1,5 @@
" Create an interactive Python terminal in vim
" Author: Greg Anders <greg@gpanders.com>
" Date: 2018-12-19

nnoremap <silent> <Plug>(PytermOpen) :<C-U>call pyterm#open()<CR>

M vim/.vim/plugin/read_only.vim => vim/.vim/plugin/read_only.vim +4 -0
@@ 1,3 1,7 @@
" Make read only files more pager-like
" Author: Greg Anders <greg@gpanders.com>
" Date: 2018-12-18

augroup readonly
  au!
  au BufReadPost * if &readonly

M vim/.vim/plugin/slime.vim => vim/.vim/plugin/slime.vim +6 -3
@@ 1,12 1,15 @@
" Configuration for vim-slime
" This file is executed BEFORE vim-slime is loaded
" Author: Greg Anders <greg@gpanders.com>
" Date: 2018-12-19

if exists("$TMUX")
  let g:slime_target = "tmux"
  let g:slime_paste_file = tempname()
  let g:slime_default_config = {
        \"socket_name": split($TMUX, ",")[0],
        \"target_pane": "{right-of}"
        \}
        \ "socket_name": split($TMUX, ",")[0],
        \ "target_pane": "{right-of}"
        \ }
elseif has('nvim')
  let g:slime_target = "neovim"
else

M vim/.vim/plugin/strip_trailing_whitespace.vim => vim/.vim/plugin/strip_trailing_whitespace.vim +3 -0
@@ 127,3 127,6 @@ endfunction
" User command for the above
command! -range=% StripTrailingWhitespace
      \ call <SID>Strip(<line1>, <line2>)

" Mapping for command
nnoremap <Space><C-S> :StripTrailingWhitespace<CR>

M vim/.vim/plugin/vimwiki.vim => vim/.vim/plugin/vimwiki.vim +8 -5
@@ 1,7 1,10 @@
if g:os ==# 'Windows'
  let g:vimwiki_path = $HOME . '\vimfiles\wiki\'
else
  let g:vimwiki_path = $HOME . '/.vim/wiki/'
endif
" vimwiki configuration
" Thihs file is executed BEFORE vimwiki is loaded
" Author: Greg Anders <greg@gpanders.com>
" Date: 2018-12-29

let g:vimwiki_path = $MYVIMRUNTIME . '/wiki/'

" Allow per-machine wiki configuration in g:vimwiki_path/config.vim
" Silently fail if file does not exist
silent! execute 'source ' . g:vimwiki_path . 'config.vim'