summaryrefslogtreecommitdiffstats
path: root/vim
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2023-10-08 12:09:20 -0400
committerJesse Luehrs <doy@tozt.net>2023-10-08 12:59:10 -0400
commit49570c8dd03448240897b37b68567352b790f16f (patch)
tree6c192a52046d5d0dd1b84a838befd8e777cfeafb /vim
parent66939c71da756c1d9e07a88a4a8ea2a018650060 (diff)
downloadconf-49570c8dd03448240897b37b68567352b790f16f.tar.gz
conf-49570c8dd03448240897b37b68567352b790f16f.zip
convert to stow
Diffstat (limited to 'vim')
-rw-r--r--vim/.gitignore1
-rw-r--r--vim/.vim/after/ftplugin/rust.vim (renamed from vim/after/ftplugin/rust.vim)0
-rw-r--r--vim/.vim/colors/local.vim (renamed from vim/colors/local.vim)0
-rw-r--r--vim/.vim/ftdetect/c.vim (renamed from vim/ftdetect/c.vim)0
-rw-r--r--vim/.vim/ftdetect/levdes.vim (renamed from vim/ftdetect/levdes.vim)0
-rw-r--r--vim/.vim/ftdetect/nhdes.vim (renamed from vim/ftdetect/nhdes.vim)0
-rw-r--r--vim/.vim/ftplugin/c.vim (renamed from vim/ftplugin/c.vim)0
-rw-r--r--vim/.vim/ftplugin/cpp.vim (renamed from vim/ftplugin/cpp.vim)0
-rw-r--r--vim/.vim/ftplugin/gitcommit.vim (renamed from vim/ftplugin/gitcommit.vim)0
-rw-r--r--vim/.vim/ftplugin/go.vim (renamed from vim/ftplugin/go.vim)0
-rw-r--r--vim/.vim/ftplugin/help.vim (renamed from vim/ftplugin/help.vim)0
-rw-r--r--vim/.vim/ftplugin/javascript.vim (renamed from vim/ftplugin/javascript.vim)0
-rw-r--r--vim/.vim/ftplugin/perl.vim (renamed from vim/ftplugin/perl.vim)0
-rw-r--r--vim/.vim/ftplugin/puppet.vim (renamed from vim/ftplugin/puppet.vim)0
-rw-r--r--vim/.vim/ftplugin/python.vim (renamed from vim/ftplugin/python.vim)0
-rw-r--r--vim/.vim/ftplugin/ruby.vim (renamed from vim/ftplugin/ruby.vim)0
-rw-r--r--vim/.vim/ftplugin/rust.vim (renamed from vim/ftplugin/rust.vim)0
-rw-r--r--vim/.vim/ftplugin/sh.vim (renamed from vim/ftplugin/sh.vim)0
-rw-r--r--vim/.vim/ftplugin/terraform.vim (renamed from vim/ftplugin/terraform.vim)0
-rw-r--r--vim/.vim/ftplugin/tex.vim (renamed from vim/ftplugin/tex.vim)0
-rw-r--r--vim/.vim/ftplugin/vim.vim (renamed from vim/ftplugin/vim.vim)0
-rw-r--r--vim/.vim/ftplugin/vimwiki.vim (renamed from vim/ftplugin/vimwiki.vim)0
-rw-r--r--vim/.vim/ftplugin/xs.vim (renamed from vim/ftplugin/xs.vim)0
m---------vim/.vim/pack/filetype/start/polyglot (renamed from vim/pack/filetype/start/polyglot)0
m---------vim/.vim/pack/plugins/start/airline (renamed from vim/pack/plugins/start/airline)0
m---------vim/.vim/pack/plugins/start/ale (renamed from vim/pack/plugins/start/ale)0
m---------vim/.vim/pack/plugins/start/autobrace (renamed from vim/pack/plugins/start/autobrace)0
m---------vim/.vim/pack/plugins/start/commentary (renamed from vim/pack/plugins/start/commentary)0
m---------vim/.vim/pack/plugins/start/diff-changes (renamed from vim/pack/plugins/start/diff-changes)0
m---------vim/.vim/pack/plugins/start/editorconfig (renamed from vim/pack/plugins/start/editorconfig)0
m---------vim/.vim/pack/plugins/start/fzf (renamed from vim/pack/plugins/start/fzf)0
m---------vim/.vim/pack/plugins/start/fzf.vim (renamed from vim/pack/plugins/start/fzf.vim)0
m---------vim/.vim/pack/plugins/start/gundo (renamed from vim/pack/plugins/start/gundo)0
m---------vim/.vim/pack/plugins/start/history-sync (renamed from vim/pack/plugins/start/history-sync)0
m---------vim/.vim/pack/plugins/start/startify (renamed from vim/pack/plugins/start/startify)0
m---------vim/.vim/pack/plugins/start/textobj (renamed from vim/pack/plugins/start/textobj)0
-rw-r--r--vim/.vim/plugin/dircreate.vim (renamed from vim/plugin/dircreate.vim)0
-rw-r--r--vim/.vim/plugin/eolws.vim (renamed from vim/plugin/eolws.vim)0
-rw-r--r--vim/.vim/plugin/keywordprg.vim (renamed from vim/plugin/keywordprg.vim)0
-rw-r--r--vim/.vim/plugin/opinionated-defaults.vim (renamed from vim/plugin/opinionated-defaults.vim)0
-rw-r--r--vim/.vim/plugin/rainbow_paren.vim (renamed from vim/plugin/rainbow_paren.vim)0
-rw-r--r--vim/.vim/spell/en.utf-8.add (renamed from vim/spell/en.utf-8.add)0
-rw-r--r--vim/.vim/syntax/levdes.vim (renamed from vim/syntax/levdes.vim)0
-rw-r--r--vim/.vim/syntax/nhdes.vim (renamed from vim/syntax/nhdes.vim)0
-rw-r--r--vim/.vim/syntax/perl.vim (renamed from vim/syntax/perl.vim)0
-rw-r--r--vim/.vimrc154
-rw-r--r--vim/Makefile19
47 files changed, 174 insertions, 0 deletions
diff --git a/vim/.gitignore b/vim/.gitignore
new file mode 100644
index 0000000..fce23eb
--- /dev/null
+++ b/vim/.gitignore
@@ -0,0 +1 @@
+/.vim/spell/*.spl
diff --git a/vim/after/ftplugin/rust.vim b/vim/.vim/after/ftplugin/rust.vim
index f30a884..f30a884 100644
--- a/vim/after/ftplugin/rust.vim
+++ b/vim/.vim/after/ftplugin/rust.vim
diff --git a/vim/colors/local.vim b/vim/.vim/colors/local.vim
index 7e22c18..7e22c18 100644
--- a/vim/colors/local.vim
+++ b/vim/.vim/colors/local.vim
diff --git a/vim/ftdetect/c.vim b/vim/.vim/ftdetect/c.vim
index 8dac68b..8dac68b 100644
--- a/vim/ftdetect/c.vim
+++ b/vim/.vim/ftdetect/c.vim
diff --git a/vim/ftdetect/levdes.vim b/vim/.vim/ftdetect/levdes.vim
index c016fd8..c016fd8 100644
--- a/vim/ftdetect/levdes.vim
+++ b/vim/.vim/ftdetect/levdes.vim
diff --git a/vim/ftdetect/nhdes.vim b/vim/.vim/ftdetect/nhdes.vim
index 5886d51..5886d51 100644
--- a/vim/ftdetect/nhdes.vim
+++ b/vim/.vim/ftdetect/nhdes.vim
diff --git a/vim/ftplugin/c.vim b/vim/.vim/ftplugin/c.vim
index 13c7d4a..13c7d4a 100644
--- a/vim/ftplugin/c.vim
+++ b/vim/.vim/ftplugin/c.vim
diff --git a/vim/ftplugin/cpp.vim b/vim/.vim/ftplugin/cpp.vim
index 83d7802..83d7802 100644
--- a/vim/ftplugin/cpp.vim
+++ b/vim/.vim/ftplugin/cpp.vim
diff --git a/vim/ftplugin/gitcommit.vim b/vim/.vim/ftplugin/gitcommit.vim
index b1c1450..b1c1450 100644
--- a/vim/ftplugin/gitcommit.vim
+++ b/vim/.vim/ftplugin/gitcommit.vim
diff --git a/vim/ftplugin/go.vim b/vim/.vim/ftplugin/go.vim
index c4c065b..c4c065b 100644
--- a/vim/ftplugin/go.vim
+++ b/vim/.vim/ftplugin/go.vim
diff --git a/vim/ftplugin/help.vim b/vim/.vim/ftplugin/help.vim
index 475e0a7..475e0a7 100644
--- a/vim/ftplugin/help.vim
+++ b/vim/.vim/ftplugin/help.vim
diff --git a/vim/ftplugin/javascript.vim b/vim/.vim/ftplugin/javascript.vim
index e5b284f..e5b284f 100644
--- a/vim/ftplugin/javascript.vim
+++ b/vim/.vim/ftplugin/javascript.vim
diff --git a/vim/ftplugin/perl.vim b/vim/.vim/ftplugin/perl.vim
index 3571e98..3571e98 100644
--- a/vim/ftplugin/perl.vim
+++ b/vim/.vim/ftplugin/perl.vim
diff --git a/vim/ftplugin/puppet.vim b/vim/.vim/ftplugin/puppet.vim
index d1652a3..d1652a3 100644
--- a/vim/ftplugin/puppet.vim
+++ b/vim/.vim/ftplugin/puppet.vim
diff --git a/vim/ftplugin/python.vim b/vim/.vim/ftplugin/python.vim
index 5bf8dba..5bf8dba 100644
--- a/vim/ftplugin/python.vim
+++ b/vim/.vim/ftplugin/python.vim
diff --git a/vim/ftplugin/ruby.vim b/vim/.vim/ftplugin/ruby.vim
index 035f432..035f432 100644
--- a/vim/ftplugin/ruby.vim
+++ b/vim/.vim/ftplugin/ruby.vim
diff --git a/vim/ftplugin/rust.vim b/vim/.vim/ftplugin/rust.vim
index 2b9606e..2b9606e 100644
--- a/vim/ftplugin/rust.vim
+++ b/vim/.vim/ftplugin/rust.vim
diff --git a/vim/ftplugin/sh.vim b/vim/.vim/ftplugin/sh.vim
index 728eb70..728eb70 100644
--- a/vim/ftplugin/sh.vim
+++ b/vim/.vim/ftplugin/sh.vim
diff --git a/vim/ftplugin/terraform.vim b/vim/.vim/ftplugin/terraform.vim
index 5764f2e..5764f2e 100644
--- a/vim/ftplugin/terraform.vim
+++ b/vim/.vim/ftplugin/terraform.vim
diff --git a/vim/ftplugin/tex.vim b/vim/.vim/ftplugin/tex.vim
index 03c0821..03c0821 100644
--- a/vim/ftplugin/tex.vim
+++ b/vim/.vim/ftplugin/tex.vim
diff --git a/vim/ftplugin/vim.vim b/vim/.vim/ftplugin/vim.vim
index 475e0a7..475e0a7 100644
--- a/vim/ftplugin/vim.vim
+++ b/vim/.vim/ftplugin/vim.vim
diff --git a/vim/ftplugin/vimwiki.vim b/vim/.vim/ftplugin/vimwiki.vim
index aac5bcb..aac5bcb 100644
--- a/vim/ftplugin/vimwiki.vim
+++ b/vim/.vim/ftplugin/vimwiki.vim
diff --git a/vim/ftplugin/xs.vim b/vim/.vim/ftplugin/xs.vim
index 8dc989f..8dc989f 100644
--- a/vim/ftplugin/xs.vim
+++ b/vim/.vim/ftplugin/xs.vim
diff --git a/vim/pack/filetype/start/polyglot b/vim/.vim/pack/filetype/start/polyglot
-Subproject bc8a81d3592dab86334f27d1d43c080ebf680d4
+Subproject bc8a81d3592dab86334f27d1d43c080ebf680d4
diff --git a/vim/pack/plugins/start/airline b/vim/.vim/pack/plugins/start/airline
-Subproject 038e3a6ca59f11b3bb6a94087c1792322d1a1d5
+Subproject 038e3a6ca59f11b3bb6a94087c1792322d1a1d5
diff --git a/vim/pack/plugins/start/ale b/vim/.vim/pack/plugins/start/ale
-Subproject c3f9bccb8c04b01d5d0712b8691658af0b0ddb1
+Subproject c3f9bccb8c04b01d5d0712b8691658af0b0ddb1
diff --git a/vim/pack/plugins/start/autobrace b/vim/.vim/pack/plugins/start/autobrace
-Subproject e51de9e6265ade6195c8983edf58c462695acfe
+Subproject e51de9e6265ade6195c8983edf58c462695acfe
diff --git a/vim/pack/plugins/start/commentary b/vim/.vim/pack/plugins/start/commentary
-Subproject e87cd90dc09c2a203e13af9704bd0ef79303d75
+Subproject e87cd90dc09c2a203e13af9704bd0ef79303d75
diff --git a/vim/pack/plugins/start/diff-changes b/vim/.vim/pack/plugins/start/diff-changes
-Subproject 97cf3bc8b51f27452b4174e4f770758d42162d0
+Subproject 97cf3bc8b51f27452b4174e4f770758d42162d0
diff --git a/vim/pack/plugins/start/editorconfig b/vim/.vim/pack/plugins/start/editorconfig
-Subproject 1d54632f7fcad38df8e428f349bc58b15af4b20
+Subproject 1d54632f7fcad38df8e428f349bc58b15af4b20
diff --git a/vim/pack/plugins/start/fzf b/vim/.vim/pack/plugins/start/fzf
-Subproject 352ea072269dfe2a3c429785a95a2f22887ccda
+Subproject 352ea072269dfe2a3c429785a95a2f22887ccda
diff --git a/vim/pack/plugins/start/fzf.vim b/vim/.vim/pack/plugins/start/fzf.vim
-Subproject dc71692255b62d1f67dc55c8e51ab1aa467b1d4
+Subproject dc71692255b62d1f67dc55c8e51ab1aa467b1d4
diff --git a/vim/pack/plugins/start/gundo b/vim/.vim/pack/plugins/start/gundo
-Subproject c5efef192b975b8e7d5fa3c6db932648d3b7632
+Subproject c5efef192b975b8e7d5fa3c6db932648d3b7632
diff --git a/vim/pack/plugins/start/history-sync b/vim/.vim/pack/plugins/start/history-sync
-Subproject 279aa756157ab818df67e854e953f6e05809b4a
+Subproject 279aa756157ab818df67e854e953f6e05809b4a
diff --git a/vim/pack/plugins/start/startify b/vim/.vim/pack/plugins/start/startify
-Subproject 81e36c352a8deea54df5ec1e2f4348685569bed
+Subproject 81e36c352a8deea54df5ec1e2f4348685569bed
diff --git a/vim/pack/plugins/start/textobj b/vim/.vim/pack/plugins/start/textobj
-Subproject fd84055046d38c7e850fdbf13f92ab2898f8114
+Subproject fd84055046d38c7e850fdbf13f92ab2898f8114
diff --git a/vim/plugin/dircreate.vim b/vim/.vim/plugin/dircreate.vim
index 11da7f9..11da7f9 100644
--- a/vim/plugin/dircreate.vim
+++ b/vim/.vim/plugin/dircreate.vim
diff --git a/vim/plugin/eolws.vim b/vim/.vim/plugin/eolws.vim
index 1f1a003..1f1a003 100644
--- a/vim/plugin/eolws.vim
+++ b/vim/.vim/plugin/eolws.vim
diff --git a/vim/plugin/keywordprg.vim b/vim/.vim/plugin/keywordprg.vim
index dfedd80..dfedd80 100644
--- a/vim/plugin/keywordprg.vim
+++ b/vim/.vim/plugin/keywordprg.vim
diff --git a/vim/plugin/opinionated-defaults.vim b/vim/.vim/plugin/opinionated-defaults.vim
index 6ce034b..6ce034b 100644
--- a/vim/plugin/opinionated-defaults.vim
+++ b/vim/.vim/plugin/opinionated-defaults.vim
diff --git a/vim/plugin/rainbow_paren.vim b/vim/.vim/plugin/rainbow_paren.vim
index 9c26134..9c26134 100644
--- a/vim/plugin/rainbow_paren.vim
+++ b/vim/.vim/plugin/rainbow_paren.vim
diff --git a/vim/spell/en.utf-8.add b/vim/.vim/spell/en.utf-8.add
index 14fe17c..14fe17c 100644
--- a/vim/spell/en.utf-8.add
+++ b/vim/.vim/spell/en.utf-8.add
diff --git a/vim/syntax/levdes.vim b/vim/.vim/syntax/levdes.vim
index a4f1982..a4f1982 100644
--- a/vim/syntax/levdes.vim
+++ b/vim/.vim/syntax/levdes.vim
diff --git a/vim/syntax/nhdes.vim b/vim/.vim/syntax/nhdes.vim
index dcafdf3..dcafdf3 100644
--- a/vim/syntax/nhdes.vim
+++ b/vim/.vim/syntax/nhdes.vim
diff --git a/vim/syntax/perl.vim b/vim/.vim/syntax/perl.vim
index c70fa27..c70fa27 100644
--- a/vim/syntax/perl.vim
+++ b/vim/.vim/syntax/perl.vim
diff --git a/vim/.vimrc b/vim/.vimrc
new file mode 100644
index 0000000..f8d9886
--- /dev/null
+++ b/vim/.vimrc
@@ -0,0 +1,154 @@
+" options {{{
+set shiftwidth=4
+set expandtab
+set termguicolors
+let &t_8f="\e[38;2;%lu;%lu;%lum"
+let &t_8b="\e[48;2;%lu;%lu;%lum"
+colorscheme local
+" }}}
+" hooks {{{
+augroup vimrc
+ autocmd!
+augroup END
+" }}}
+" bindings {{{
+" general {{{
+let g:mapleader = ';'
+let g:maplocalleader = ';'
+" }}}
+" M to :make {{{
+noremap <silent>M :<C-u>make<CR><CR><C-W>k
+" }}}
+" S for spell checking {{{
+noremap <silent><expr>S &spell ? ":\<C-u>setlocal nospell\<CR>" : ":\<C-u>setlocal spell\<CR>"
+" }}}
+" easier tag traversal {{{
+nnoremap <CR> <C-]>
+nnoremap <BS> <C-T>
+autocmd vimrc CmdWinEnter * nnoremap <buffer><CR> <CR>
+" }}}
+" buffer switching {{{
+nnoremap <silent>H :bp<CR>
+nnoremap <silent>L :bn<CR>
+" }}}
+" use tab for completion {{{
+inoremap <expr> <Tab>
+ \ strpart(getline('.'), 0, col('.') - 1) =~ '\(^\\|\s\+\)$'
+ \ ? "\<Tab>"
+ \ : "\<C-n>"
+inoremap <S-Tab> <C-p>
+" }}}
+" fixups for my keyboard remappings {{{
+nmap <silent>) 0
+nmap <silent>g) g0
+nmap <Bar> \
+" }}}
+" miscellaneous {{{
+nnoremap e c
+nnoremap E C
+nnoremap r <C-r>
+nnoremap , :
+xnoremap , :
+nnoremap ! :!
+xnoremap ! :!
+autocmd vimrc BufEnter * exe "nnoremap T :e " . expand('%')
+nnoremap <silent><Leader>/ :nohl<CR>
+nnoremap <silent><Tab> :w<CR>
+nnoremap <silent>\ :q<CR>
+nnoremap <silent><C-D> :bd<CR>
+" }}}
+" }}}
+" plugin configuration {{{
+" ale
+" airline
+" autobrace
+" commentary {{{
+map <silent><Leader>x :Commentary<CR>
+" }}}
+" diff-changes {{{
+nnoremap <silent>ds :DiffAgainstFilesystem<CR>
+nnoremap <silent>dc :DiffAgainstVCS<CR>
+nnoremap <silent>de :DiffStop<CR>
+" }}}
+" fzf {{{
+let g:fzf_layout = { 'up': '~40%' }
+if &columns >= 160
+ let s:horiz_preview_layout = 'right:50%'
+else
+ let s:horiz_preview_layout = 'right:50%:hidden'
+endif
+let s:ag_opts = {"options": ["-d:", "-n4.."]}
+function! s:fzf_files()
+ silent let out = system("git rev-parse --show-toplevel 2>/dev/null")
+ if strlen(out)
+ exe "GFiles -co --exclude-standard"
+ else
+ exe "Files"
+ endif
+endfunction
+command! -bang -nargs=* Rg
+ \ call fzf#vim#grep('rg --column --line-number --no-heading --color=always --smart-case --no-ignore-messages '.shellescape(<q-args>),
+ \ 1,
+ \ <bang>0 ? fzf#vim#with_preview(s:ag_opts, 'up:60%')
+ \ : fzf#vim#with_preview(s:ag_opts, s:horiz_preview_layout, '?'),
+ \ <bang>0)
+nnoremap <silent> t :call <SID>fzf_files()<CR>
+nnoremap <silent> ff :Rg<CR>
+nnoremap <silent> fh :Helptags<CR>
+nnoremap <silent> ft :Filetypes<CR>
+" }}}
+" gundo {{{
+if has("python")
+ nnoremap <silent>U :silent GundoToggle<CR>
+ let g:gundo_help = 0
+ let g:gundo_preview_bottom = 1
+else
+ let g:gundo_disable = 1
+endif
+" }}}
+" history-sync
+" matchit {{{
+packadd! matchit
+" }}}
+" netrw {{{
+let g:netrw_home = $HOME . '/.cache/vim/netrw'
+if !isdirectory(g:netrw_home)
+ call mkdir(g:netrw_home, 'p')
+endif
+" }}}
+" polyglot {{{
+" this is for things that can't be set in ftplugin files for whatever reason
+let g:go_highlight_functions = 1
+let g:go_highlight_function_calls = 1
+let g:go_highlight_types = 1
+let g:polyglot_disabled = ['csv', 'sensible', 'autoindent', 'pascal']
+" }}}
+" rainbow {{{
+let g:rainbow = 1
+let g:rainbow_paren = 1
+let g:rainbow_bracket = 1
+let g:rainbow_brace = 1
+" }}}
+" startify {{{
+let g:startify_list_order = ['dir', 'bookmarks', 'commands']
+let g:startify_files_number = 7
+let g:startify_commands = [
+ \ {'t': ['Open file', 'Files']},
+ \ {'ff': ['Grep', 'Rg']},
+ \ {'fh': ['Help', 'Helptags']},
+ \ ]
+let g:startify_change_to_vcs_root = 1
+let g:startify_custom_indices = [
+ \'!', '@', '#', '$', '%', '^', '&', '*', '(', ')'
+\]
+let g:startify_custom_header = []
+let g:startify_custom_footer = '[""] + map(split(system("fortune -n200 -s ~/.local/share/fortune | grep -v -E \"^\$\""), "\n"), "\" \".v:val")'
+" }}}
+" textobj {{{
+let g:textobj_defs = {
+\ '/': ['paired'],
+\ '\|': ['paired'],
+\}
+" }}}
+" }}}
+" vim: fdm=marker
diff --git a/vim/Makefile b/vim/Makefile
new file mode 100644
index 0000000..857e003
--- /dev/null
+++ b/vim/Makefile
@@ -0,0 +1,19 @@
+include ../Makefile.include
+
+TAGFILES=$(addsuffix tags,$(wildcard .vim/pack/*/start/*/doc/))
+SPELLFILES=.vim/spell/en.utf-8.add.spl
+
+build: $(TAGFILES) $(SPELLFILES)
+
+install:
+ @mkdir -p $(HOME)/.cache/vim/hist
+ @mkdir -p $(HOME)/.cache/vim/undo
+
+clean:
+ @rm -f $(TAGFILES) $(SPELLFILES)
+
+%/doc/tags : %/doc
+ @vim -u NONE -c':helptags $< | :q'
+
+%.spl : %
+ @vim -u NONE -c':mkspell! $< | :q' \ No newline at end of file