From 49570c8dd03448240897b37b68567352b790f16f Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 8 Oct 2023 12:09:20 -0400 Subject: convert to stow --- vim/.gitignore | 1 + vim/.vim/after/ftplugin/rust.vim | 1 + vim/.vim/colors/local.vim | 126 +++++++++++++ vim/.vim/ftdetect/c.vim | 1 + vim/.vim/ftdetect/levdes.vim | 1 + vim/.vim/ftdetect/nhdes.vim | 1 + vim/.vim/ftplugin/c.vim | 1 + vim/.vim/ftplugin/cpp.vim | 2 + vim/.vim/ftplugin/gitcommit.vim | 9 + vim/.vim/ftplugin/go.vim | 5 + vim/.vim/ftplugin/help.vim | 3 + vim/.vim/ftplugin/javascript.vim | 4 + vim/.vim/ftplugin/perl.vim | 11 ++ vim/.vim/ftplugin/puppet.vim | 1 + vim/.vim/ftplugin/python.vim | 19 ++ vim/.vim/ftplugin/ruby.vim | 25 +++ vim/.vim/ftplugin/rust.vim | 18 ++ vim/.vim/ftplugin/sh.vim | 4 + vim/.vim/ftplugin/terraform.vim | 3 + vim/.vim/ftplugin/tex.vim | 98 ++++++++++ vim/.vim/ftplugin/vim.vim | 3 + vim/.vim/ftplugin/vimwiki.vim | 1 + vim/.vim/ftplugin/xs.vim | 10 + vim/.vim/pack/filetype/start/polyglot | 1 + vim/.vim/pack/plugins/start/airline | 1 + vim/.vim/pack/plugins/start/ale | 1 + vim/.vim/pack/plugins/start/autobrace | 1 + vim/.vim/pack/plugins/start/commentary | 1 + vim/.vim/pack/plugins/start/diff-changes | 1 + vim/.vim/pack/plugins/start/editorconfig | 1 + vim/.vim/pack/plugins/start/fzf | 1 + vim/.vim/pack/plugins/start/fzf.vim | 1 + vim/.vim/pack/plugins/start/gundo | 1 + vim/.vim/pack/plugins/start/history-sync | 1 + vim/.vim/pack/plugins/start/startify | 1 + vim/.vim/pack/plugins/start/textobj | 1 + vim/.vim/plugin/dircreate.vim | 31 ++++ vim/.vim/plugin/eolws.vim | 6 + vim/.vim/plugin/keywordprg.vim | 33 ++++ vim/.vim/plugin/opinionated-defaults.vim | 157 ++++++++++++++++ vim/.vim/plugin/rainbow_paren.vim | 96 ++++++++++ vim/.vim/spell/en.utf-8.add | 111 +++++++++++ vim/.vim/syntax/levdes.vim | 304 +++++++++++++++++++++++++++++++ vim/.vim/syntax/nhdes.vim | 99 ++++++++++ vim/.vim/syntax/perl.vim | 1 + vim/.vimrc | 154 ++++++++++++++++ vim/Makefile | 19 ++ vim/after/ftplugin/rust.vim | 1 - vim/colors/local.vim | 126 ------------- vim/ftdetect/c.vim | 1 - vim/ftdetect/levdes.vim | 1 - vim/ftdetect/nhdes.vim | 1 - vim/ftplugin/c.vim | 1 - vim/ftplugin/cpp.vim | 2 - vim/ftplugin/gitcommit.vim | 9 - vim/ftplugin/go.vim | 5 - vim/ftplugin/help.vim | 3 - vim/ftplugin/javascript.vim | 4 - vim/ftplugin/perl.vim | 11 -- vim/ftplugin/puppet.vim | 1 - vim/ftplugin/python.vim | 19 -- vim/ftplugin/ruby.vim | 25 --- vim/ftplugin/rust.vim | 18 -- vim/ftplugin/sh.vim | 4 - vim/ftplugin/terraform.vim | 3 - vim/ftplugin/tex.vim | 98 ---------- vim/ftplugin/vim.vim | 3 - vim/ftplugin/vimwiki.vim | 1 - vim/ftplugin/xs.vim | 10 - vim/pack/filetype/start/polyglot | 1 - vim/pack/plugins/start/airline | 1 - vim/pack/plugins/start/ale | 1 - vim/pack/plugins/start/autobrace | 1 - vim/pack/plugins/start/commentary | 1 - vim/pack/plugins/start/diff-changes | 1 - vim/pack/plugins/start/editorconfig | 1 - vim/pack/plugins/start/fzf | 1 - vim/pack/plugins/start/fzf.vim | 1 - vim/pack/plugins/start/gundo | 1 - vim/pack/plugins/start/history-sync | 1 - vim/pack/plugins/start/startify | 1 - vim/pack/plugins/start/textobj | 1 - vim/plugin/dircreate.vim | 31 ---- vim/plugin/eolws.vim | 6 - vim/plugin/keywordprg.vim | 33 ---- vim/plugin/opinionated-defaults.vim | 157 ---------------- vim/plugin/rainbow_paren.vim | 96 ---------- vim/spell/en.utf-8.add | 111 ----------- vim/syntax/levdes.vim | 304 ------------------------------- vim/syntax/nhdes.vim | 99 ---------- vim/syntax/perl.vim | 1 - 91 files changed, 1372 insertions(+), 1198 deletions(-) create mode 100644 vim/.gitignore create mode 100644 vim/.vim/after/ftplugin/rust.vim create mode 100644 vim/.vim/colors/local.vim create mode 100644 vim/.vim/ftdetect/c.vim create mode 100644 vim/.vim/ftdetect/levdes.vim create mode 100644 vim/.vim/ftdetect/nhdes.vim create mode 100644 vim/.vim/ftplugin/c.vim create mode 100644 vim/.vim/ftplugin/cpp.vim create mode 100644 vim/.vim/ftplugin/gitcommit.vim create mode 100644 vim/.vim/ftplugin/go.vim create mode 100644 vim/.vim/ftplugin/help.vim create mode 100644 vim/.vim/ftplugin/javascript.vim create mode 100644 vim/.vim/ftplugin/perl.vim create mode 100644 vim/.vim/ftplugin/puppet.vim create mode 100644 vim/.vim/ftplugin/python.vim create mode 100644 vim/.vim/ftplugin/ruby.vim create mode 100644 vim/.vim/ftplugin/rust.vim create mode 100644 vim/.vim/ftplugin/sh.vim create mode 100644 vim/.vim/ftplugin/terraform.vim create mode 100644 vim/.vim/ftplugin/tex.vim create mode 100644 vim/.vim/ftplugin/vim.vim create mode 100644 vim/.vim/ftplugin/vimwiki.vim create mode 100644 vim/.vim/ftplugin/xs.vim create mode 160000 vim/.vim/pack/filetype/start/polyglot create mode 160000 vim/.vim/pack/plugins/start/airline create mode 160000 vim/.vim/pack/plugins/start/ale create mode 160000 vim/.vim/pack/plugins/start/autobrace create mode 160000 vim/.vim/pack/plugins/start/commentary create mode 160000 vim/.vim/pack/plugins/start/diff-changes create mode 160000 vim/.vim/pack/plugins/start/editorconfig create mode 160000 vim/.vim/pack/plugins/start/fzf create mode 160000 vim/.vim/pack/plugins/start/fzf.vim create mode 160000 vim/.vim/pack/plugins/start/gundo create mode 160000 vim/.vim/pack/plugins/start/history-sync create mode 160000 vim/.vim/pack/plugins/start/startify create mode 160000 vim/.vim/pack/plugins/start/textobj create mode 100644 vim/.vim/plugin/dircreate.vim create mode 100644 vim/.vim/plugin/eolws.vim create mode 100644 vim/.vim/plugin/keywordprg.vim create mode 100644 vim/.vim/plugin/opinionated-defaults.vim create mode 100644 vim/.vim/plugin/rainbow_paren.vim create mode 100644 vim/.vim/spell/en.utf-8.add create mode 100644 vim/.vim/syntax/levdes.vim create mode 100644 vim/.vim/syntax/nhdes.vim create mode 100644 vim/.vim/syntax/perl.vim create mode 100644 vim/.vimrc create mode 100644 vim/Makefile delete mode 100644 vim/after/ftplugin/rust.vim delete mode 100644 vim/colors/local.vim delete mode 100644 vim/ftdetect/c.vim delete mode 100644 vim/ftdetect/levdes.vim delete mode 100644 vim/ftdetect/nhdes.vim delete mode 100644 vim/ftplugin/c.vim delete mode 100644 vim/ftplugin/cpp.vim delete mode 100644 vim/ftplugin/gitcommit.vim delete mode 100644 vim/ftplugin/go.vim delete mode 100644 vim/ftplugin/help.vim delete mode 100644 vim/ftplugin/javascript.vim delete mode 100644 vim/ftplugin/perl.vim delete mode 100644 vim/ftplugin/puppet.vim delete mode 100644 vim/ftplugin/python.vim delete mode 100644 vim/ftplugin/ruby.vim delete mode 100644 vim/ftplugin/rust.vim delete mode 100644 vim/ftplugin/sh.vim delete mode 100644 vim/ftplugin/terraform.vim delete mode 100644 vim/ftplugin/tex.vim delete mode 100644 vim/ftplugin/vim.vim delete mode 100644 vim/ftplugin/vimwiki.vim delete mode 100644 vim/ftplugin/xs.vim delete mode 160000 vim/pack/filetype/start/polyglot delete mode 160000 vim/pack/plugins/start/airline delete mode 160000 vim/pack/plugins/start/ale delete mode 160000 vim/pack/plugins/start/autobrace delete mode 160000 vim/pack/plugins/start/commentary delete mode 160000 vim/pack/plugins/start/diff-changes delete mode 160000 vim/pack/plugins/start/editorconfig delete mode 160000 vim/pack/plugins/start/fzf delete mode 160000 vim/pack/plugins/start/fzf.vim delete mode 160000 vim/pack/plugins/start/gundo delete mode 160000 vim/pack/plugins/start/history-sync delete mode 160000 vim/pack/plugins/start/startify delete mode 160000 vim/pack/plugins/start/textobj delete mode 100644 vim/plugin/dircreate.vim delete mode 100644 vim/plugin/eolws.vim delete mode 100644 vim/plugin/keywordprg.vim delete mode 100644 vim/plugin/opinionated-defaults.vim delete mode 100644 vim/plugin/rainbow_paren.vim delete mode 100644 vim/spell/en.utf-8.add delete mode 100644 vim/syntax/levdes.vim delete mode 100644 vim/syntax/nhdes.vim delete mode 100644 vim/syntax/perl.vim (limited to 'vim') 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/.vim/after/ftplugin/rust.vim b/vim/.vim/after/ftplugin/rust.vim new file mode 100644 index 0000000..f30a884 --- /dev/null +++ b/vim/.vim/after/ftplugin/rust.vim @@ -0,0 +1 @@ +set tw=78 diff --git a/vim/.vim/colors/local.vim b/vim/.vim/colors/local.vim new file mode 100644 index 0000000..7e22c18 --- /dev/null +++ b/vim/.vim/colors/local.vim @@ -0,0 +1,126 @@ +highlight clear +syntax reset +set background=dark +let g:colors_name = expand(':t:r') + +let s:g = { + \"black": "#000000", + \"red": "#ed5f74", + \"green": "#1ea672", + \"yellow": "#d97917", + \"blue": "#688ef1", + \"magenta": "#c96ed0", + \"cyan": "#3a97d4", + \"white": "#e3e8ee", + \"brightblack": "#697386", + \"brightred": "#fbb5b2", + \"brightgreen": "#85d996", + \"brightyellow": "#efc078", + \"brightblue": "#9fcdff", + \"brightmagenta": "#f0b4e4", + \"brightcyan": "#7fd3ed", + \"brightwhite": "#ffffff", + \"darkblack": "#000000", + \"darkred": "#742833", + \"darkgreen": "#00643c", + \"darkyellow": "#6e3500", + \"darkblue": "#2c4074", + \"darkmagenta": "#602864", + \"darkcyan": "#144c71", + \"darkwhite": "#3e4043", + \"darkerwhite": "#090e14", +\} + +let s:c = { + \"black": "0", + \"red": "1", + \"green": "2", + \"yellow": "3", + \"blue": "4", + \"magenta": "5", + \"cyan": "6", + \"white": "7", + \"brightblack": "8", + \"brightred": "9", + \"brightgreen": "10", + \"brightyellow": "11", + \"brightblue": "12", + \"brightmagenta": "13", + \"brightcyan": "14", + \"brightwhite": "15", +\} + +function s:hi(name, fg, bg) + if a:fg == "" + let ctermfg = "" + let guifg = "" + elseif a:fg =~ "^#" + let ctermfg = "" + let guifg = "guifg=" . a:fg + else + let ctermfg = "ctermfg=" . s:c[a:fg] + let guifg = "guifg=" . s:g[a:fg] + endif + + if a:bg == "" + let ctermbg = "" + let guibg = "" + elseif a:bg =~ "^#" + let ctermbg = "" + let guibg = "guibg=" . a:bg + else + let ctermbg = "ctermbg=" . s:c[a:bg] + let guibg = "guibg=" . s:g[a:bg] + endif + + silent exe "highlight clear " . a:name + if a:fg != "" || a:bg != "" + silent exe "highlight " . a:name . " " . ctermfg . " " . ctermbg . " " . guifg . " " . guibg + endif +endfunction + +" text +call hi("Comment", "brightblack", "") +call hi("Constant", "red", "") +call hi("Delimiter", "blue", "") +call hi("Error", "black", "brightmagenta") +call hi("Function", "brightcyan", "") +call hi("Identifier", "", "") +call hi("Include", "blue", "") +call hi("Operator", "", "") +call hi("PreProc", "magenta", "") +call hi("Special", "magenta", "") +call hi("SpecialKey", "magenta", "") +call hi("Statement", "yellow", "") +call hi("Title", "magenta", "") +call hi("Todo", "black", "brightyellow") +call hi("Type", "green", "") + +autocmd FileType go call hi("goBuiltins", "yellow", "") +autocmd FileType go call hi("goFunctionCall", "brightcyan", "") +autocmd FileType markdown call hi("mkdListItem", "yellow", "") +autocmd FileType perl call hi("Identifier", "brightcyan", "") +autocmd FileType puppet call hi("puppetStringDelimiter", "red", "") +autocmd FileType ruby call hi("rubyInterpolationDelimiter", "magenta", "") +autocmd FileType ruby call hi("rubyPercentStringDelimiter", "yellow", "") +autocmd FileType ruby call hi("rubyStringDelimiter", "red", "") +autocmd FileType ruby call hi("rubyRegexDelimiter", "red", "") +autocmd FileType sh call hi("shQuote", "red", "") +autocmd FileType vim call hi("vimBracket", "magenta", "") +autocmd FileType vim call hi("vimMapMod", "magenta", "") + +" ui +call hi("DiffAdd", "", s:g["darkgreen"]) +call hi("DiffChange", "", s:g["darkblue"]) +call hi("DiffDelete", "", s:g["darkred"]) +call hi("DiffText", "", s:g["darkmagenta"]) +call hi("Folded", "brightgreen", s:g["darkgreen"]) +call hi("MatchParen", "brightcyan", s:g["darkcyan"]) +call hi("MoreMsg", "green", s:g["darkgreen"]) +call hi("NonText", "brightblue", s:g["darkerwhite"]) +call hi("Search", "", s:g["darkmagenta"]) +call hi("SpellBad", "", s:g["darkred"]) +call hi("SpellCap", "", s:g["darkblue"]) +call hi("SpellRare", "", s:g["darkgreen"]) +call hi("SpellLocal", "", s:g["darkmagenta"]) +call hi("Visual", "", s:g["darkwhite"]) diff --git a/vim/.vim/ftdetect/c.vim b/vim/.vim/ftdetect/c.vim new file mode 100644 index 0000000..8dac68b --- /dev/null +++ b/vim/.vim/ftdetect/c.vim @@ -0,0 +1 @@ +let c_syntax_for_h = 1 diff --git a/vim/.vim/ftdetect/levdes.vim b/vim/.vim/ftdetect/levdes.vim new file mode 100644 index 0000000..c016fd8 --- /dev/null +++ b/vim/.vim/ftdetect/levdes.vim @@ -0,0 +1 @@ +au! BufRead,BufNewFile *crawl*/*.des set filetype=levdes diff --git a/vim/.vim/ftdetect/nhdes.vim b/vim/.vim/ftdetect/nhdes.vim new file mode 100644 index 0000000..5886d51 --- /dev/null +++ b/vim/.vim/ftdetect/nhdes.vim @@ -0,0 +1 @@ +au! BufRead,BufNewFile *nethack*/*.des set filetype=nhdes diff --git a/vim/.vim/ftplugin/c.vim b/vim/.vim/ftplugin/c.vim new file mode 100644 index 0000000..13c7d4a --- /dev/null +++ b/vim/.vim/ftplugin/c.vim @@ -0,0 +1 @@ +setlocal cinoptions+=:0,l1,g0,(0,W1s diff --git a/vim/.vim/ftplugin/cpp.vim b/vim/.vim/ftplugin/cpp.vim new file mode 100644 index 0000000..83d7802 --- /dev/null +++ b/vim/.vim/ftplugin/cpp.vim @@ -0,0 +1,2 @@ +let b:load_doxygen_syntax = 1 +setlocal cinoptions+=:0,l1,g0,(0,W1s diff --git a/vim/.vim/ftplugin/gitcommit.vim b/vim/.vim/ftplugin/gitcommit.vim new file mode 100644 index 0000000..b1c1450 --- /dev/null +++ b/vim/.vim/ftplugin/gitcommit.vim @@ -0,0 +1,9 @@ +setlocal viminfo= +augroup local_gitcommit + autocmd! + autocmd BufWinEnter + \ if getline(1) == '' | + \ exe "normal! ggO" | + \ startinsert | + \ endif +augroup END diff --git a/vim/.vim/ftplugin/go.vim b/vim/.vim/ftplugin/go.vim new file mode 100644 index 0000000..c4c065b --- /dev/null +++ b/vim/.vim/ftplugin/go.vim @@ -0,0 +1,5 @@ +setlocal ts=4 +let b:ale_fixers = {"go": ["gofmt"]} +let b:ale_fix_on_save = 1 + +map :ALEGoToDefinition diff --git a/vim/.vim/ftplugin/help.vim b/vim/.vim/ftplugin/help.vim new file mode 100644 index 0000000..475e0a7 --- /dev/null +++ b/vim/.vim/ftplugin/help.vim @@ -0,0 +1,3 @@ +setlocal keywordprg=:help +nnoremap K K +vnoremap K K diff --git a/vim/.vim/ftplugin/javascript.vim b/vim/.vim/ftplugin/javascript.vim new file mode 100644 index 0000000..e5b284f --- /dev/null +++ b/vim/.vim/ftplugin/javascript.vim @@ -0,0 +1,4 @@ +let b:ale_fixers = {"javascript": ["eslint", "prettier"]} +let b:ale_fix_on_save = 1 +let b:ale_javascript_eslint_executable = "node_modules/.bin/eslint" +let b:ale_javascript_prettier_executable = "node_modules/.bin/prettier" diff --git a/vim/.vim/ftplugin/perl.vim b/vim/.vim/ftplugin/perl.vim new file mode 100644 index 0000000..3571e98 --- /dev/null +++ b/vim/.vim/ftplugin/perl.vim @@ -0,0 +1,11 @@ +let b:ale_linters = { 'perl': ['perlcritic'] } +" rainbow parens break syntax-based indent +autocmd vimrc BufEnter let b:indent_use_syntax = 0 + +" look up words in perldoc rather than man for K +function! s:perldoc(word) + exe 'silent read! perldoc -o PlainText -f "' . a:word . '" 2>/dev/null || perldoc -o PlainText "' . a:word . '"' + setlocal ft=man +endfunction +nnoremap K :call Help(0, [':'], 'perldoc') +vnoremap K :call Help(1, [':'], 'perldoc') diff --git a/vim/.vim/ftplugin/puppet.vim b/vim/.vim/ftplugin/puppet.vim new file mode 100644 index 0000000..d1652a3 --- /dev/null +++ b/vim/.vim/ftplugin/puppet.vim @@ -0,0 +1 @@ +let g:puppet_align_hashes = 0 diff --git a/vim/.vim/ftplugin/python.vim b/vim/.vim/ftplugin/python.vim new file mode 100644 index 0000000..5bf8dba --- /dev/null +++ b/vim/.vim/ftplugin/python.vim @@ -0,0 +1,19 @@ +" look up words in pydoc rather than man for K +function! s:pydoc(word) + let l:pydoc_manpager = $MANPAGER + let l:pydoc_pager = $PAGER + let $MANPAGER = 'cat' + let $PAGER = 'cat' + exe 'silent read! pydoc "' . a:word . '" 2>/dev/null' + let $MANPAGER = l:pydoc_manpager + let $PAGER = l:pydoc_pager + setlocal ft=man +endfunction +nnoremap K :call Help(0, ['.'], 'pydoc') +vnoremap K :call Help(1, ['.'], 'pydoc') + +map :ALEGoToDefinition + +let b:ale_fixers = { 'python': ['black', 'isort'] } +let b:ale_fix_on_save = 1 +let b:ale_python_flake8_options = '--max-line-length 1000 --ignore=E203,W503 --extend-select=W504' \ No newline at end of file diff --git a/vim/.vim/ftplugin/ruby.vim b/vim/.vim/ftplugin/ruby.vim new file mode 100644 index 0000000..035f432 --- /dev/null +++ b/vim/.vim/ftplugin/ruby.vim @@ -0,0 +1,25 @@ +function! s:rubocop_in_bundler() + let l:gemfiles = glob("*.gemspec", 1, 1) + if filereadable("Gemfile") + let l:gemfiles += ["Gemfile"] + endif + for l:file in l:gemfiles + for l:line in readfile(l:file) + if l:line =~ 'gem.*rubocop' + return 1 + endif + endfor + endfor + return 0 +endfunction +if s:rubocop_in_bundler() + let b:ale_ruby_rubocop_executable = 'bundle' +endif + +" look up words in ri rather than man for K +function! s:ri(word) + exe 'silent read! ri -T -f rdoc "' . a:word . '" 2>/dev/null' + setlocal ft= +endfunction +nnoremap K :call Help(0, [':', '.'], 'ri') +vnoremap K :call Help(1, [':', '.'], 'ri') diff --git a/vim/.vim/ftplugin/rust.vim b/vim/.vim/ftplugin/rust.vim new file mode 100644 index 0000000..2b9606e --- /dev/null +++ b/vim/.vim/ftplugin/rust.vim @@ -0,0 +1,18 @@ +let b:ale_linters = { 'rust': ['analyzer'] } +let b:ale_rust_analyzer_config = { + \'checkOnSave': { 'command': 'clippy' }, + \'cargo': { 'allFeatures': v:true }, + \'diagnostics': { 'disabled': ['inactive-code'] }, +\} +let b:ale_fixers = { 'rust': ['rustfmt'] } +let b:ale_fix_on_save = 1 +let b:ale_rust_rustfmt_options = "--edition 2018" + +map :ALEGoToDefinition + +if filereadable("Cargo.toml") + compiler cargo + setlocal makeprg=cargo\ build +else + setlocal makeprg=rustc\ % +endif diff --git a/vim/.vim/ftplugin/sh.vim b/vim/.vim/ftplugin/sh.vim new file mode 100644 index 0000000..728eb70 --- /dev/null +++ b/vim/.vim/ftplugin/sh.vim @@ -0,0 +1,4 @@ +let b:is_bash = 1 +let b:ale_fixers = { 'sh': ['shfmt'] } +let b:ale_fix_on_save = 1 +let b:ale_sh_shfmt_options = '-i 4' diff --git a/vim/.vim/ftplugin/terraform.vim b/vim/.vim/ftplugin/terraform.vim new file mode 100644 index 0000000..5764f2e --- /dev/null +++ b/vim/.vim/ftplugin/terraform.vim @@ -0,0 +1,3 @@ +setlocal commentstring=#\ %s +let b:ale_fixers = { 'terraform': ['terraform'] } +let b:ale_fix_on_save = 1 diff --git a/vim/.vim/ftplugin/tex.vim b/vim/.vim/ftplugin/tex.vim new file mode 100644 index 0000000..03c0821 --- /dev/null +++ b/vim/.vim/ftplugin/tex.vim @@ -0,0 +1,98 @@ +let b:tex_flavor="latex" + +" :make converts to pdf +setlocal makeprg=(cd\ /tmp\ &&\ pdflatex\ --synctex=1\ --halt-on-error\ %:p) + +function! s:zathura() + if s:is_running('^zathura') + " zathura automatically reloads + return + endif + call remote_startserver("vim-zathura") + call system('zathura --fork -x "vim --servername vim-zathura --remote +%{line} %{input}" ' . s:current_pdf()) +endfunction + +function! s:current_pdf() + let base = expand(':t:r') + if base == '' + let base = expand('%:t:r') + endif + return '/tmp/' . base . '.pdf' +endfunction + +function! s:is_running(re) + let processes = split(system('ps xo args'), '\n') + for process in processes + if process =~ a:re + return 1 + endif + endfor + return 0 +endfunction + +function! s:synctex() + if s:is_running('^zathura') + exe "silent !zathura --synctex-forward " . line('.') . ":" . col('.') . ":" . expand('%:p') . " " . s:current_pdf() + redraw + endif +endfunction + +let g:_tex_last_line_seen = -1 +function! s:cursor_moved() + let line = line('.') + if line != g:_tex_last_line_seen + call s:synctex() + endif + let g:_tex_last_line_seen = line +endfunction + +" don't load the pdf if the make failed +function! s:make_errors() + let qf = getqflist() + for line in qf + if line['type'] == 'E' + return 1 + endif + endfor + return 0 +endfunction + +augroup _tex + autocmd! + if executable('zathura') && strlen(expand('$DISPLAY')) + autocmd QuickFixCmdPost make if !s:make_errors() | call s:zathura() | endif + endif + " currently this is not usable until + " https://git.pwmt.org/pwmt/zathura/-/issues/157 is fixed + " autocmd CursorMoved call s:cursor_moved() +augroup END + +" see :help errorformat-LaTeX +setlocal errorformat= + \%E!\ LaTeX\ %trror:\ %m, + \%E!\ %m, + \%+WLaTeX\ %.%#Warning:\ %.%#line\ %l%.%#, + \%+W%.%#\ at\ lines\ %l--%*\\d, + \%WLaTeX\ %.%#Warning:\ %m, + \%Cl.%l\ %m, + \%+C\ \ %m., + \%+C%.%#-%.%#, + \%+C%.%#[]%.%#, + \%+C[]%.%#, + \%+C%.%#%[{}\\]%.%#, + \%+C<%.%#>%.%#, + \%C\ \ %m, + \%-GSee\ the\ LaTeX%m, + \%-GType\ \ H\ %m, + \%-G\ ...%.%#, + \%-G%.%#\ (C)\ %.%#, + \%-G(see\ the\ transcript%.%#), + \%-G\\s%#, + \%+O(%f)%r, + \%+P(%f%r, + \%+P\ %\\=(%f%r, + \%+P%*[^()](%f%r, + \%+P[%\\d%[^()]%#(%f%r, + \%+Q)%r, + \%+Q%*[^()])%r, + \%+Q[%\\d%*[^()])%r diff --git a/vim/.vim/ftplugin/vim.vim b/vim/.vim/ftplugin/vim.vim new file mode 100644 index 0000000..475e0a7 --- /dev/null +++ b/vim/.vim/ftplugin/vim.vim @@ -0,0 +1,3 @@ +setlocal keywordprg=:help +nnoremap K K +vnoremap K K diff --git a/vim/.vim/ftplugin/vimwiki.vim b/vim/.vim/ftplugin/vimwiki.vim new file mode 100644 index 0000000..aac5bcb --- /dev/null +++ b/vim/.vim/ftplugin/vimwiki.vim @@ -0,0 +1 @@ +nmap VimwikiNextLink diff --git a/vim/.vim/ftplugin/xs.vim b/vim/.vim/ftplugin/xs.vim new file mode 100644 index 0000000..8dc989f --- /dev/null +++ b/vim/.vim/ftplugin/xs.vim @@ -0,0 +1,10 @@ +setlocal cindent +setlocal cinoptions+=:0,l1,g0,(0,W1s + +" look up words in perldoc rather than man for K if they exist +function! s:perldoc_or_man(word) + exe 'silent read! perldoc -o PlainText -a "' . a:word . '" 2>/dev/null || man -Pcat ' . a:word + setlocal ft=man +endfunction +nnoremap K :call Help(0, [], 'perldoc_or_man') +vnoremap K :call Help(1, [], 'perldoc_or_man') diff --git a/vim/.vim/pack/filetype/start/polyglot b/vim/.vim/pack/filetype/start/polyglot new file mode 160000 index 0000000..bc8a81d --- /dev/null +++ b/vim/.vim/pack/filetype/start/polyglot @@ -0,0 +1 @@ +Subproject commit bc8a81d3592dab86334f27d1d43c080ebf680d42 diff --git a/vim/.vim/pack/plugins/start/airline b/vim/.vim/pack/plugins/start/airline new file mode 160000 index 0000000..038e3a6 --- /dev/null +++ b/vim/.vim/pack/plugins/start/airline @@ -0,0 +1 @@ +Subproject commit 038e3a6ca59f11b3bb6a94087c1792322d1a1d5c diff --git a/vim/.vim/pack/plugins/start/ale b/vim/.vim/pack/plugins/start/ale new file mode 160000 index 0000000..c3f9bcc --- /dev/null +++ b/vim/.vim/pack/plugins/start/ale @@ -0,0 +1 @@ +Subproject commit c3f9bccb8c04b01d5d0712b8691658af0b0ddb16 diff --git a/vim/.vim/pack/plugins/start/autobrace b/vim/.vim/pack/plugins/start/autobrace new file mode 160000 index 0000000..e51de9e --- /dev/null +++ b/vim/.vim/pack/plugins/start/autobrace @@ -0,0 +1 @@ +Subproject commit e51de9e6265ade6195c8983edf58c462695acfe6 diff --git a/vim/.vim/pack/plugins/start/commentary b/vim/.vim/pack/plugins/start/commentary new file mode 160000 index 0000000..e87cd90 --- /dev/null +++ b/vim/.vim/pack/plugins/start/commentary @@ -0,0 +1 @@ +Subproject commit e87cd90dc09c2a203e13af9704bd0ef79303d755 diff --git a/vim/.vim/pack/plugins/start/diff-changes b/vim/.vim/pack/plugins/start/diff-changes new file mode 160000 index 0000000..97cf3bc --- /dev/null +++ b/vim/.vim/pack/plugins/start/diff-changes @@ -0,0 +1 @@ +Subproject commit 97cf3bc8b51f27452b4174e4f770758d42162d0f diff --git a/vim/.vim/pack/plugins/start/editorconfig b/vim/.vim/pack/plugins/start/editorconfig new file mode 160000 index 0000000..1d54632 --- /dev/null +++ b/vim/.vim/pack/plugins/start/editorconfig @@ -0,0 +1 @@ +Subproject commit 1d54632f7fcad38df8e428f349bc58b15af4b206 diff --git a/vim/.vim/pack/plugins/start/fzf b/vim/.vim/pack/plugins/start/fzf new file mode 160000 index 0000000..352ea07 --- /dev/null +++ b/vim/.vim/pack/plugins/start/fzf @@ -0,0 +1 @@ +Subproject commit 352ea072269dfe2a3c429785a95a2f22887ccda3 diff --git a/vim/.vim/pack/plugins/start/fzf.vim b/vim/.vim/pack/plugins/start/fzf.vim new file mode 160000 index 0000000..dc71692 --- /dev/null +++ b/vim/.vim/pack/plugins/start/fzf.vim @@ -0,0 +1 @@ +Subproject commit dc71692255b62d1f67dc55c8e51ab1aa467b1d46 diff --git a/vim/.vim/pack/plugins/start/gundo b/vim/.vim/pack/plugins/start/gundo new file mode 160000 index 0000000..c5efef1 --- /dev/null +++ b/vim/.vim/pack/plugins/start/gundo @@ -0,0 +1 @@ +Subproject commit c5efef192b975b8e7d5fa3c6db932648d3b76323 diff --git a/vim/.vim/pack/plugins/start/history-sync b/vim/.vim/pack/plugins/start/history-sync new file mode 160000 index 0000000..279aa75 --- /dev/null +++ b/vim/.vim/pack/plugins/start/history-sync @@ -0,0 +1 @@ +Subproject commit 279aa756157ab818df67e854e953f6e05809b4a3 diff --git a/vim/.vim/pack/plugins/start/startify b/vim/.vim/pack/plugins/start/startify new file mode 160000 index 0000000..81e36c3 --- /dev/null +++ b/vim/.vim/pack/plugins/start/startify @@ -0,0 +1 @@ +Subproject commit 81e36c352a8deea54df5ec1e2f4348685569bed2 diff --git a/vim/.vim/pack/plugins/start/textobj b/vim/.vim/pack/plugins/start/textobj new file mode 160000 index 0000000..fd84055 --- /dev/null +++ b/vim/.vim/pack/plugins/start/textobj @@ -0,0 +1 @@ +Subproject commit fd84055046d38c7e850fdbf13f92ab2898f81149 diff --git a/vim/.vim/plugin/dircreate.vim b/vim/.vim/plugin/dircreate.vim new file mode 100644 index 0000000..11da7f9 --- /dev/null +++ b/vim/.vim/plugin/dircreate.vim @@ -0,0 +1,31 @@ +function! s:ensure_dir_exists() + let l:required_dir = expand("%:h") + if !isdirectory(l:required_dir) + if ask_quit("Directory '" . l:required_dir . "' doesn't exist.", "&Create it?") + return + endif + + try + call mkdir(l:required_dir, 'p') + catch + call ask_quit("Can't create '" . l:required_dir . "'", "&Continue anyway?") + endtry + endif +endfunction + +function! s:ask_quit(msg, proposed_action) + if confirm(a:msg, "&Quit?\n" . a:proposed_action) == 1 + if len(getbufinfo()) > 1 + silent bd + return 1 + else + exit + end + endif + return 0 +endfunction + +augroup dircreate + autocmd! + autocmd BufNewFile * call ensure_dir_exists() +augroup END diff --git a/vim/.vim/plugin/eolws.vim b/vim/.vim/plugin/eolws.vim new file mode 100644 index 0000000..1f1a003 --- /dev/null +++ b/vim/.vim/plugin/eolws.vim @@ -0,0 +1,6 @@ +augroup eolws + autocmd! + autocmd InsertEnter * syn clear EOLWS | syn match EOLWS excludenl /\s\+\%#\@!$/ + autocmd InsertLeave * syn clear EOLWS | syn match EOLWS excludenl /\s\+$/ +augroup END +highlight EOLWS ctermbg=red guibg=red diff --git a/vim/.vim/plugin/keywordprg.vim b/vim/.vim/plugin/keywordprg.vim new file mode 100644 index 0000000..dfedd80 --- /dev/null +++ b/vim/.vim/plugin/keywordprg.vim @@ -0,0 +1,33 @@ +function! Help(visual, iskeyword, command) + let l:iskeyword = &iskeyword + for l:kw in a:iskeyword + exe 'set iskeyword+=' . l:kw + endfor + if a:visual + let l:oldreg = @a + normal! gv"aygv + let l:word = @a + let @a = l:oldreg + else + let l:word = expand('') + endif + let &iskeyword = l:iskeyword + + exe 'noswapfile ' . &helpheight . 'new ' . l:word + setlocal buftype=nofile + setlocal bufhidden=wipe + setlocal nobuflisted + + setlocal modifiable + exe 'call ' . a:command . '("' . l:word . '")' + normal! ggdd + setlocal nomodifiable +endfunction + +function! s:man(word) + exe 'silent read! man -Pcat ' . a:word + setlocal filetype=man +endfunction + +nnoremap K :call Help(0, [], 'man') +xnoremap K :call Help(1, [], 'man') diff --git a/vim/.vim/plugin/opinionated-defaults.vim b/vim/.vim/plugin/opinionated-defaults.vim new file mode 100644 index 0000000..6ce034b --- /dev/null +++ b/vim/.vim/plugin/opinionated-defaults.vim @@ -0,0 +1,157 @@ +""" GENERAL """ +set nocompatible +syntax on +filetype indent plugin on +augroup opinionated_defaults + autocmd! +augroup END + + +""" PERSISTENCE """ + +" remember as many history items as possible (command, search, etc) +set history=10000 +" enable persistent undo (undo even after closing and reopening vim) +if has('persistent_undo') + let s:undocachedir = $HOME . '/.cache/vim/undo' + if !isdirectory(s:undocachedir) + call mkdir(s:undocachedir, 'p') + endif + exe "set undodir=" . s:undocachedir + set undofile +endif +" use a separate swapfile directory +let s:swapfiledir = $HOME . '/.cache/vim/swap' +if !isdirectory(s:swapfiledir) + call mkdir(s:swapfiledir, 'p') +endif +exe "set directory=" . s:swapfiledir . "//" +" use a separate view directory +let s:viewdir = $HOME . '/.cache/vim/view' +if !isdirectory(s:viewdir) + call mkdir(s:viewdir, 'p') +endif +exe "set viewdir=" . s:viewdir + + +""" BUFFERS """ + +" automatically write the buffer before :make, shell commands, etc +set autowrite +" ask to save modified buffers when quitting, instead of throwing an error +set confirm +" allow switching to other buffers when the current one is modified +set hidden +" these two restore the last known cursor position when a buffer is loaded +set nostartofline +autocmd opinionated_defaults BufReadPost * + \ if line("'\"") <= line('$') | + \ exe 'normal! g`"' | + \ endif + + +""" DISPLAY """ + +" show as much of a line as possible if it doesn't all fit on the screen +set display+=truncate +" more useful display of nonprinting characters (<07> instead of ^G) +set display+=uhex +" don't redraw in the middle of noninteractive commands (maps, macros, etc) +set lazyredraw +" always give a message for the number of lines delete/changed +set report=0 +" keep some additional context visible when scrolling +set scrolloff=5 +if has('cmdline_info') + " display the current partial command and size of the visual selection + set showcmd +endif +if has('conceal') + " enable syntax-specific hiding of text + set conceallevel=2 +endif +if has('linebreak') + " display a marker when a line was wrapped + set showbreak=> +endif + + +""" EDITING """ + +" automatically use an indent that matches the previous line +set autoindent +" allow backspacing over everything +set backspace=indent,eol,start +" remove leading comment characters intelligently when joining lines +set formatoptions+=j +" always join with a single space, even between sentences +set nojoinspaces +" try to always keep indentation lined up on shiftwidth boundaries +set shiftround +" keep softtabstop and shiftwidth in sync +set softtabstop=-1 + + +""" COMMAND MODE """ + +" make command mode completion work more like the shell: +" first, complete the longest common sequence, +" then show a list, +" then cycle through completing the full names in the list in order +set wildmode=longest,list,full +if exists('+wildignorecase') + " make command mode completion case insensitive + set wildignorecase +endif + + +""" SEARCH """ + +" make searches case-insensitive +set ignorecase +" unless they include a capital letter +set smartcase +if has('extra_search') + " highlight all matches when searching + set hlsearch +endif + + +""" TERMINAL STUFF """ + +" wait a much shorter amount of time for escape sequences +" (this makes much more responsive) +set ttimeoutlen=50 +" send text to the terminal in such a way that line wrapping is done at the +" terminal level, so copying and pasting wrapped lines works correctly +" (assuming you temporarily unset showbreak) +set ttyfast +" entirely disable error bells: +" make all bells visual bells +set visualbell +" and then disable visual bells +set t_vb= + + +""" COLORS """ + +" force vim to use 256 colors +" (it typically can't detect this while in screen/tmux since TERM=screen +" doesn't advertise it, even though ~everything does support it these days) +set t_Co=256 +" globally highlight diff conflict markers +match ErrorMsg '^\(<\||\|=\|>\)\{7\}\([^=].\+\)\?$' + + +""" MAPPINGS """ + +" keep the current selection when indenting +xnoremap < >gv +" make Y behave analogously to D instead of dd +nnoremap Y y$ +" make arrow keys move visually (since j/k already move linewise) +noremap gk +noremap gj +inoremap gk +inoremap gj diff --git a/vim/.vim/plugin/rainbow_paren.vim b/vim/.vim/plugin/rainbow_paren.vim new file mode 100644 index 0000000..9c26134 --- /dev/null +++ b/vim/.vim/plugin/rainbow_paren.vim @@ -0,0 +1,96 @@ +" this script by Shawn M Moore aka Sartak +" also by Michael R Geddes aka frogonwheels +" originally by anonymous + +" this in the public domain +" last updated 25 Mar 07 + +" this does nothing unless you, +" let g:rainbow = 1 + +" and set which kinds of character pairs you want to rainbow +" let g:rainbow_paren = 1 " () +" let g:rainbow_brace = 1 " {} +" let g:rainbow_bracket = 1 " [] +" let g:rainbow_angle = 1 " <> + +" if you want the different types to nest, such that the braces in ({}) are +" colored the same as the internal parens of (()), then +" let g:rainbow_nested = 1 + +function! Rainbow() + let s:basename = 'level' + exe 'hi '.s:basename.'1c ctermfg=6 guifg=#1673b0' + exe 'hi '.s:basename.'2c ctermfg=2 guifg=#008551' + exe 'hi '.s:basename.'3c ctermfg=3 guifg=#b25200' + exe 'hi '.s:basename.'4c ctermfg=4 guifg=#4369cc' + exe 'hi '.s:basename.'5c ctermfg=5 guifg=#a045a7' + " this color is never nested, it only appears on the outermost layer + exe 'hi '.s:basename.'6c ctermfg=1 guifg=#c7394e' + + " helper function + func s:DoSyn(cur, top, left, right, uniq) + let uniq = a:uniq + if exists("g:rainbow_nested") && g:rainbow_nested != 0 + let uniq = "" + endif + + let cmd = 'syn region '.s:basename.uniq.a:cur.' transparent fold matchgroup='.s:basename.a:cur.'c start=/'.a:left.'/ end=/'.a:right.'/ contains=TOP' + + let i = a:cur + + if i == 1 + let i = a:top + endif + + while i <= a:top + let cmd = cmd . ',' . s:basename . uniq . i + let i = i + 1 + endwhile + exe cmd + endfunc + + func s:DoSyntaxes(count) + let i = 1 + + while i <= a:count + " if you define new pairs, make sure to take into account that the + " delimiter is currently / and that it uses regex, so you need to escape + " regex metachars (like what is done for brackets) + + if exists("g:rainbow_paren") && g:rainbow_paren != 0 + " ocaml uses (* *) for comments; these shouldn't be highlighted + if &filetype == "ocaml" + call s:DoSyn(i, a:count, "(\\*\\@!", "\\*\\@", "d") + endif + + let i = i + 1 + endwhile + endfun + + call s:DoSyntaxes(6) " 6 is the number of colors we have + + delfun s:DoSyn + delfun s:DoSyntaxes +endfunction + +if exists("g:rainbow") && g:rainbow + augroup rainbow + autocmd BufWinEnter,FileType * call Rainbow() + augroup END +endif diff --git a/vim/.vim/spell/en.utf-8.add b/vim/.vim/spell/en.utf-8.add new file mode 100644 index 0000000..14fe17c --- /dev/null +++ b/vim/.vim/spell/en.utf-8.add @@ -0,0 +1,111 @@ +schedulable +mutex +hippocampus +anterograde +playtesters +gameplay +SQL +API +endianness +timestamp +Luehrs +doy +tozt +UIUC +Hydrogeology +Geochemists +Tcl +Tk +PDF +SVG +PostScript +http +TrueType +OpenMP +perl +org +MooseX +NonMoose +interoperate +github +IRC +multiplayer +plugin +TAEB +taeb +sartak +NetHack +nethack +Pty +sourceforge +OCaml +LablGTK +LuaIRC +luaforge +luairc +Lua +CTCP +DCC +CPAN +JavaScript +CSS +sed +Debian +Gentoo +XP +Cygwin +Darcs +Inline +webmaster +rollerblading +Illini +templating +programmatically +JS +Xslate +misparsed +CSV +ParseXLSX +XLSX +ParseExcel +WriteExcel +tmux +unshifted +xbindkeys +Firefox +remappings +Pentadactyl +Zsh +readline +vim +vimrc +zshrc +inputrc +structs +inlined +println +printf +builtin +parsable +Mozilla +inlinable +LLVM +backend +sandboxed +Acid2 +fn +mut +utf8 +interoperating +Mozilla's +stringification +enum +enums +destructuring +NES +blog +https +doyster +pdf +termcast +Avaaz diff --git a/vim/.vim/syntax/levdes.vim b/vim/.vim/syntax/levdes.vim new file mode 100644 index 0000000..a4f1982 --- /dev/null +++ b/vim/.vim/syntax/levdes.vim @@ -0,0 +1,304 @@ +" Vim syntax file +" Language: Dungeon Crawl level design (.des) files. +" Maintainer: Darshan Shaligram +" Last Change: 2007 Jun 28 +" Remark: Basic Vim syntax highlighting for Dungeon Crawl Stone Soup +" level design (.des) files. +" +" How to use this: +" * Put levdes.vim (this file) under ~/.vim/syntax (or similar directory for +" your system - usually C:\Program Files\Vim\vimfiles\syntax on Windows). +" * In your .vimrc, or in a new file ~/.vim/ftdetect/levdes.vim, add this line: +" au BufRead,BufNewFile *.des set syntax=levdes +" Thereafter, any .des files you edit in (g)vim will use syntax highlighting. + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'des' +endif + +syn include @desLua syntax/lua.vim + +syn case match + +syn match desLuaBlock /\(lua\)\?\s\+{{/ contained +syn match desOtherLuaBlock /^\(prelude\|lua\|validate\|epilogue\|veto\)\?\s*{{/ contained +syn match desLuaBlockEnd /}}/ contained +"syn match desColonLine /^\s*:/ contained + +syn cluster desLuaGroup contains=desLuaBlock,desOtherLuaBlock,desLuaBlockEnd + +syn region desLua start=/^\s*\(lua\)\?\s*{{/ end=/}}\s*$/ contains=@desLuaGroup,@desLua keepend +syn region desLuaCol start=/^\s*:/ end=/$/ contains=@desLuaGroup,@desLua keepend +syn region desVal start=/^\s*validate\?\s*{{/ end=/}}\s*$/ contains=@desLuaGroup,@desLua keepend +syn region desPre start=/^\s*prelude\?\s*{{/ end=/}}\s*$/ contains=@desLuaGroup,@desLua keepend +syn region desEpi start=/^\s*epilogue\?\s*{{/ end=/}}\s*$/ contains=@desLuagroup,@deslua keepend +syn region desVet start=/^\s*veto\?\s*{{/ end=/}}\s*$/ contains=@desLuagroup,@deslua keepend + +setlocal iskeyword+=: +setlocal iskeyword+=- + +" These have extra matching going on, so not in desDeclarator (global) +syn keyword desDec NAME: COLOUR: SUBST: NSUBST: SHUFFLE: CLEAR: LROCKCOL: LFLOORCOL: contained + +syn region desSubst start=/^SUBST:\s*/ end=/$/ contains=desDec,desSubstArg,desSubstSep,@desMapElements keepend +syn region desNsubst start=/^NSUBST:\s*/ end=/$/ contains=desDec,desSubstArg,desSubstSep,@desMapElements keepend +syn region desShuffle start=/^SHUFFLE:\s*/ end=/$/ contains=desDec,desMapFrag keepend +syn region desClear start=/^CLEAR:\s*/ end=/$/ contains=desDec,desSubstArg keepend +syn region desColourline start=/^\(COLOUR\|L[A-Z]*COL\):/ end=/$/ contains=desDec,desColour keepend + +" Absolutely always highlight the vault name as just that +syn region desNameline start=/^NAME:/ end=/$/ contains=desDec,desVaultname keepend +syn match desVaultname /\w*/ contained + +syn match desGod contained /ashenzari\|beogh\|cheibriados\|dithmenos\|elyvilon/ +syn match desGod contained /fedhas\|gozag\|jiyva\|kikubaaqudgha\|lugonu/ +syn match desGod contained /makhleb\|nemelex_xobeh\|okawaru\|qazlal\|ru/ +syn match desGod contained /sif_muna\|trog\|vehumet\|xom\|yredelemnul\|zin/ +syn match desGod contained /the_shining_one/ + +syn keyword desDeclarator ORIENT: DEPTH: PLACE: MONS: FLAGS: default-depth: TAGS: CHANCE: WEIGHT: +syn keyword desDeclarator ITEM: KFEAT: KMONS: KITEM: KMASK: KPROP: MARKER: WELCOME: +syn keyword desDeclarator LFLOORTILE: LROCKTILE: FTILE: RTILE: TILE: SUBVAULT: FHEIGHT: DESC: ORDER: + +" keywords +" ORIENT +syn keyword desOrientation north south east west northwest northeast southwest southeast encompass float centre + +" DEPTH | PLACE +syn keyword desOrientation Depths Temple Orc Elf Lair Swamp Shoals Snake Spider Slime Vaults Blade Crypt Tomb +"Note: `Zot` totally highlights in e.g. the items `rune of Zot` and `Orb of Zot`. Not worth fixing. +syn keyword desOrientation Hell Dis Geh Coc Tar Zot Forest Abyss Pan Zig Lab Bazaar Trove Sewer Ossuary +syn keyword desOrientation Bailey IceCv Volcano WizLab + +"Note: This is the list above, but lower-cased +syn match desBranch contained /d\|temple\|orc\|elf\|lair\|swamp\|shoals\|snake\|spider\|slime\|vaults\|blade\|crypt\|tomb/ +syn match desBranch contained /hell\|dis\|geh\|coc\|tar\|zot\|forest\|abyss\|pan\|zig\|lab\|bazaar\|trove\|sewer\|ossuary/ +syn match desBranch contained /bailey\|icecv\|volcano\|wizlab/ + +syn match desBranchname contained /dungeon\|depths\|temple\|orcish_mines\|elven_halls\|lair\|swamp\|shoals/ +syn match desBranchname contained /snake_pit\|spider_nest\|slime_pits\|vaults\|hall_of_blades\|crypt\|tomb/ +syn match desBranchname contained /hell\|dis\|gehenna\|cocytus\|tartarus\|zot\|forest\|abyss\|pandemonium/ +syn match desBranchname contained /ziggurat\|labyrinth\|bazaar\|trove\|sewer\|ossuary/ +syn match desBranchname contained /bailey\|ice_cave\|volcano\|wizlab/ + +" TAGS +" in abyss.cc +syn keyword desOrientation abyss_exit +" in decks.cc and dgn-labyrinth.cc (without `minotaur` because monster) +syn keyword desOrientation lab generate_loot +" from dlua.ziggurat +syn keyword desOrientation ziggurat_pillar centered +" map building in dungeon.cc (`transparent` is handled later) +"Note: `dummy` mis-catches `training dummy` about half as often as actually used as tag +syn keyword desOrientation dummy arrival no_exits extra ruin layout pan decor +syn keyword desOrientation allow_dup uniq luniq +syn keyword desOrientation no_hmirror no_vmirror no_rotate +syn keyword desOrientation no_dump +" vault placement in maps.cc +syn keyword desOrientation unrand place_unique special_room tutorial +syn keyword desOrientation water_ok overwrite_floor_cell replace_portal +" V vault building (mostly dlua/v_layouts and v_rooms) +syn keyword desOrientation vaults_room vaults_empty vaults_hard no_windows preserve_wall + +" ITEM | KITEM (in mapdef.cc, without `random`) +syn keyword desOrientation randbook any good_item star_item superb_item gold nothing +syn keyword desOrientation acquire mundane damaged cursed randart not_cursed useful unobtainable +syn keyword desOrientation mimic no_mimic no_pickup no_uniq allow_uniq +"Note: `rotting` removed here which often caught `rotting devil` but was unused as item tag +syn keyword desOrientation corpse chunk skeleton never_decay + +" MONS | KMONS (in mapdef.cc) +syn keyword desOrientation fix_slot priest_spells actual_spells god_gift +syn keyword desOrientation generate_awake patrolling band +syn keyword desOrientation hostile friendly good_neutral fellow_slime strict_neutral neutral +"Note: `spectre` removed: mis-catches `silent spectre` but was unused as modifier (`spectral` exists) +syn keyword desOrientation zombie skeleton simulacrum spectral +syn keyword desOrientation seen always_corpse never_corpse +syn keyword desOrientation base nonbase +syn keyword desOrientation n_suf n_adj n_rpl n_the +syn keyword desOrientation name_suffix name_adjective name_replace name_definite +syn keyword desOrientation n_des n_spe n_zom n_noc +syn keyword desOrientation name_descriptor name_species name_zombie name_nocorpse + +" COLOUR +" Base +syn keyword desColour contained blue green cyan red magenta brown darkgrey +syn keyword desColour contained lightblue lightgreen lightcyan lightred lightmagenta yellow lightgrey white +" Elemental +syn keyword desColour contained fire ice earth electricity air poison water magic mutagenic warp enchant +syn keyword desColour contained heal holy dark death unholy vehumet beogh crystal blood smoke slime jewel +syn keyword desColour contained elven dwarven orcish flash kraken floor rock mist shimmer_blue decay +syn keyword desColour contained silver gold iron bone elven_brick waves tree mangrove tornado liquefied +syn keyword desColour contained orb_glow disjunction random + +" TILE +syn keyword desOrientation no_random + +" KFEAT +syn keyword desOrientation known mimic + +" abyss TAGS in mapdef.cc +syn keyword desOrientation abyss abyss_rune +syn keyword desOrientation overwritable +" KMASK (in mapdef.cc) +syn keyword desOrientation vault no_item_gen no_monster_gen no_pool_fixup no_wall_fixup opaque no_trap_gen + +" KPROP +syn keyword desOrientation bloody highlight mold no_cloud_gen no_tele_into no_submerge no_tide no_jiyva + +syn match desComment "^\s*#.*$&" + +"Note: `;` and `|` are necessary due to monster/randbook `spells:`, +" `.` can be an empty spell slot and `'` is contained in certain spell names, +" `$` and `-` are used in depth definitions (but `,` should not match there). +syn match desProperty /\w*:[[:alnum:]_\.';|\$-]\+/ contains=desAttribute +" Without `oneline` this wraps around and matches e.g. some SUBST: on the next line +syn region desAttribute start=/\" contains=desBranch +syn match desEntry "\" +syn match desEntry "\" +syn match desEntry "\<\(no\)\=layout_\w*\>" +syn match desEntry "\" +syn match desEntry "\" +syn match desEntry "\" +syn match desEntry "\" contains=desBranch +syn match desEntry "\" +syn match desEntry "\" contains=desGod +syn match desEntry "\" contains=desGod +syn match desEntry "\" contains=desGod +syn match desEntry "\" contains=desGod +syn match desEntry "\" contains=desBranchname +syn match desEntry "\" contains=desBranchname +syn match desEntry "\" contains=desBranchname + +" 'transparent' is a Vim syntax keyword +syn match desTransparent "\" +syn match desRange "\d*-\d*" +syn match desNumber "\s\d*" +syn match desWeight "w\(eight\)\=:\d*" +syn match desWeight "q:\d*\(-\d*\)\=" +syn match desSlash "/" + +syn keyword desMapBookend MAP ENDMAP contained +syn match desMapWall /x/ contained +syn match desMapPermaWall /X/ contained +syn match desMapStoneWall /c/ contained +syn match desMapGlassWall /[mno]/ contained +syn match desMapMetalWall /v/ contained +syn match desMapCrystalWall /b/ contained +syn match desMapTree /t/ contained + +syn match desMapFloor /\./ contained +syn match desMapDoor /[+=]/ contained + +syn match desMapShallow /W/ contained +syn match desMapWater /w/ contained +syn match desMapLava /l/ contained + +syn match desMapEntry /@/ contained +syn match desMapStairs /[}{)(\]\[]/ contained +syn match desMapTrap /[\^~]/ contained + +syn match desMapGold /\$/ contained +syn match desMapValuable /[%*|]/ contained + +syn match desMapMonst /[0-9]/ contained + +syn cluster desMapElements contains=desMapBookend +syn cluster desMapElements add=desMapWall,desMapPermaWall,desMapStoneWall,desMapGlassWall,desMapCrystalWall,desMapMetalWall,desMapTree +syn cluster desMapElements add=desMapFloor,desMapDoor +syn cluster desMapElements add=desMapShallow,desMapWater,desMapLava +syn cluster desMapElements add=desMapEntry,desMapStairs,desMapTrap +syn cluster desMapElements add=desMapGold,desMapValuable +syn cluster desMapElements add=desMapMons + +syn match desSubstArg /\S/ contained nextgroup=desSubstSep skipwhite +syn match desSubstSep /[:=]/ contained nextgroup=desMapFrag skipwhite +syn match desColourSep /[:=]/ contained nextgroup=desColour skipwhite +syn region desMapFrag start=/./ end=/$/ contains=@desMapElements contained + +syn region desMap start=/^\s*\\s*$/ end=/^\s*\\s*$/ contains=@desMapElements keepend + +hi link desDec Statement +hi link desDeclarator Statement +hi link desVaultname Identifier +hi link desMapBookend Statement +hi link desLuaBlock Statement +hi link desOtherLuaBlock Statement +hi link desLuaBlockEnd Statement +"hi link desColonLine Statement +hi link desComment Comment +hi link desMap String +hi link desSubstArg String +hi link desRange String +hi link desEntry Type +hi link desNumber String +hi link desWeight String +hi link desSlash Comment + +hi link desSubstSep Type +hi link desOrientation Type +hi link desAttribute Type +hi link desProperty Special +hi link desGod Special +hi link desBranch Special +hi link desBranchname Special +hi link desColour Type +hi link desTransparent Type + +" It would be really nice if this worked for people who switch bg +" post-loading, like "normal" highlights do. Does someone know how? +if &bg == "dark" + hi desMapWall guifg=darkgray term=bold gui=bold ctermfg=white + hi desMapPermaWall guifg=#a0a000 gui=bold ctermfg=yellow + hi desMapStoneWall guifg=black gui=bold ctermfg=gray + hi desMapGlassWall guifg=lightcyan ctermfg=lightcyan + hi desMapMetalWall guifg=#004090 term=bold gui=bold ctermfg=lightblue + hi desMapCrystalWall guifg=#009040 term=bold gui=bold ctermfg=green + hi desMapTree guifg=#00aa00 ctermfg=darkgreen + hi desMapFloor guifg=#008000 ctermfg=darkgray + hi desMapDoor guifg=brown gui=bold ctermfg=white + hi desMapShallow guifg=lightcyan ctermfg=darkcyan + hi desMapWater guifg=lightblue ctermfg=darkblue + hi desMapLava guifg=red gui=bold ctermfg=darkred + + hi desMapEntry guifg=black guibg=white gui=bold ctermfg=white ctermbg=black + hi desMapStairs guifg=orange gui=bold ctermfg=magenta + hi desMapTrap guifg=red gui=bold ctermfg=darkred + + hi desMapGold guifg=#c09000 ctermfg=yellow + hi desMapValuable guifg=darkgreen gui=bold ctermfg=yellow + hi desMapMonst guifg=red ctermfg=red +else + hi desMapWall guifg=darkgray term=bold gui=bold ctermfg=brown + hi desMapPermaWall guifg=#a0a000 gui=bold ctermfg=yellow + hi desMapStoneWall guifg=black gui=bold ctermfg=darkgray + hi desMapGlassWall guifg=lightcyan ctermfg=lightcyan + hi desMapMetalWall guifg=#004090 term=bold gui=bold ctermfg=blue + hi desMapCrystalWall guifg=#009040 term=bold gui=bold ctermfg=green + hi desMapTree guifg=#00aa00 ctermfg=darkgreen + hi desMapFloor guifg=#008000 ctermfg=lightgray + hi desMapDoor guifg=brown gui=bold ctermfg=black ctermbg=brown + hi desMapShallow guifg=lightcyan ctermfg=darkcyan + hi desMapWater guifg=lightblue ctermfg=darkblue + hi desMapLava guifg=red gui=bold ctermfg=red + + hi desMapEntry guifg=black guibg=white gui=bold ctermfg=white ctermbg=black + hi desMapStairs guifg=orange gui=bold ctermfg=white + hi desMapTrap guifg=red gui=bold ctermfg=red + + hi desMapGold guifg=#c09000 ctermfg=yellow + hi desMapValuable guifg=darkgreen gui=bold ctermfg=lightgreen + hi desMapMonst guifg=red ctermfg=darkred +endif + +syn sync minlines=45 + +let b:current_syntax="levdes" diff --git a/vim/.vim/syntax/nhdes.vim b/vim/.vim/syntax/nhdes.vim new file mode 100644 index 0000000..dcafdf3 --- /dev/null +++ b/vim/.vim/syntax/nhdes.vim @@ -0,0 +1,99 @@ +" Vim syntax file +" Language: NetHack DES file +" Author: Pasi Kallinen +" Version: 20061119 +" Copyright: Copyright (c) 2006 Pasi Kallinen +" Licence: You may redistribute this under the same terms as NetHack itself + +if exists("b:current_syntax") + finish +endif + +syn sync minlines=30 + +" we're case sensitive +syn case match + +" some keywords use '-' +setlocal iskeyword+=- + +syn region nhDesComment start=/^[ \t]*#/ end=/$/ + +syn keyword nhDesCommandNoArgs + \ NOMAP RANDOM_CORRIDORS WALLIFY + +syn keyword nhDesCommandWithArgs + \ ALTAR BRANCH CHANCE CONTAINER CORRIDOR DOOR DRAWBRIDGE ENGRAVING + \ FLAGS FOUNTAIN GEOMETRY GOLD INIT_MAP LADDER LEVEL MAZE MAZEWALK + \ MESSAGE MONSTER NAME NON_DIGGABLE NON_PASSWALL OBJECT POOL PORTAL + \ RANDOM_MONSTERS RANDOM_OBJECTS RANDOM_PLACES REGION ROOM SINK STAIR + \ SUBROOM TELEPORT_REGION TRAP + +syn keyword nhDesRegister + \ align monster object place + +syn keyword nhDesConstant + \ altar arboreal asleep awake blessed bottom broken burn center chaos + \ closed coaligned \contained cursed down dust east engrave false filled + \ half-left half-right hardfloor hostile law left levregion lit locked + \ mark m_feature m_monster m_object neutral noalign nodoor nommap + \ noncoaligned none north noteleport open peaceful random right sanctum + \ shortsighted shrine south top true uncursed unfilled unlit up west + +syn region nhDesString start=/"/ end=/"/ +syn match nhDesChar /'.'/ + +syn match nhDesCoord /(\s*\d\+\s*,\s*\d\+\s*)/ +syn match nhDesRegion /(\s*\d\+\s*,\s*\d\+\s*,\s*\d\+\s*,\s*\d\+\s*)/ + +syn match nhDesMapCharDoor /[+S]/ contained +syn match nhDesMapCharFloor /[\.B]/ contained +syn match nhDesMapCharCorridor /[#H]/ contained +syn match nhDesMapCharWall /[\-\| ]/ contained +syn match nhDesMapCharWater /[WP}{]/ contained +syn match nhDesMapCharThrone /\\/ contained +syn match nhDesMapCharAir /A/ contained +syn match nhDesMapCharCloud /C/ contained +syn match nhDesMapCharLava /L/ contained +syn match nhDesMapCharSink /K/ contained +syn match nhDesMapCharIce /I/ contained +syn match nhDesMapCharTree /T/ contained +syn match nhDesMapCharIronbars /F/ contained +syn match nhDesMapCharLinenum /[0123456789]/ contained +" TODO: Any better way to do this? +syn match nhDesMapCharError /[^+S\.B#H\-\| WP}{\\ACLKITF0-9]/ contained + +syn region nhDesMap matchgroup=nhDesCommandNoArgs start=/^MAP$/ end=/^ENDMAP$/ + \ contains=nhDesMapCharError,nhDesMapCharDoor,nhDesMapCharFloor, + \ nhDesMapCharCorridor,nhDesMapCharWall,nhDesMapCharWater, + \ nhDesMapCharThrone,nhDesMapCharAir,nhDesMapCharCloud,nhDesMapCharLava, + \ nhDesMapCharSink,nhDesMapCharIce,nhDesMapCharTree,nhDesMapCharIronbars, + \ nhDesMapCharLinenum + +hi def link nhDesComment Comment +hi def link nhDesCommandNoArgs KeyWord +hi def link nhDesCommandWithArgs KeyWord +hi def link nhDesRegister Constant +hi def link nhDesConstant Constant +hi def link nhDesString String +hi def link nhDesChar String +hi def link nhDesCoord Number +hi def link nhDesRegion Number + +highlight nhDesMapCharDoor ctermbg=black ctermfg=brown guibg=black guifg=brown +highlight nhDesMapCharFloor ctermbg=black ctermfg=grey guibg=black guifg=grey +highlight nhDesMapCharCorridor ctermbg=black ctermfg=grey guibg=black guifg=grey +highlight nhDesMapCharWall ctermbg=black ctermfg=grey guibg=black guifg=grey +highlight nhDesMapCharWater ctermbg=black ctermfg=darkblue guibg=black guifg=darkblue +highlight nhDesMapCharThrone ctermbg=black ctermfg=yellow guibg=black guifg=yellow +highlight nhDesMapCharAir ctermbg=black ctermfg=lightblue guibg=black guifg=lightblue +highlight nhDesMapCharCloud ctermbg=black ctermfg=grey guibg=black guifg=grey +highlight nhDesMapCharLava ctermbg=black ctermfg=red guibg=black guifg=red +highlight nhDesMapCharSink ctermbg=black ctermfg=grey guibg=black guifg=grey +highlight nhDesMapCharIce ctermbg=black ctermfg=lightblue guibg=black guifg=lightblue +highlight nhDesMapCharTree ctermbg=black ctermfg=green guibg=black guifg=green +highlight nhDesMapCharIronbars ctermbg=black ctermfg=cyan guibg=black guifg=cyan +highlight nhDesMapCharLinenum ctermbg=black ctermfg=darkgrey guibg=black guifg=darkgrey +highlight nhDesMapCharError ctermbg=red ctermfg=yellow guibg=red guifg=yellow + +let b:current_syntax = "nhdes" diff --git a/vim/.vim/syntax/perl.vim b/vim/.vim/syntax/perl.vim new file mode 100644 index 0000000..c70fa27 --- /dev/null +++ b/vim/.vim/syntax/perl.vim @@ -0,0 +1 @@ +let perl_sub_signatures = 1 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 M :makek +" }}} +" S for spell checking {{{ +noremap S &spell ? ":\setlocal nospell\" : ":\setlocal spell\" +" }}} +" easier tag traversal {{{ +nnoremap +nnoremap +autocmd vimrc CmdWinEnter * nnoremap +" }}} +" buffer switching {{{ +nnoremap H :bp +nnoremap L :bn +" }}} +" use tab for completion {{{ +inoremap + \ strpart(getline('.'), 0, col('.') - 1) =~ '\(^\\|\s\+\)$' + \ ? "\" + \ : "\" +inoremap +" }}} +" fixups for my keyboard remappings {{{ +nmap ) 0 +nmap g) g0 +nmap \ +" }}} +" miscellaneous {{{ +nnoremap e c +nnoremap E C +nnoremap r +nnoremap , : +xnoremap , : +nnoremap ! :! +xnoremap ! :! +autocmd vimrc BufEnter * exe "nnoremap T :e " . expand('%') +nnoremap / :nohl +nnoremap :w +nnoremap \ :q +nnoremap :bd +" }}} +" }}} +" plugin configuration {{{ +" ale +" airline +" autobrace +" commentary {{{ +map x :Commentary +" }}} +" diff-changes {{{ +nnoremap ds :DiffAgainstFilesystem +nnoremap dc :DiffAgainstVCS +nnoremap de :DiffStop +" }}} +" 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(), + \ 1, + \ 0 ? fzf#vim#with_preview(s:ag_opts, 'up:60%') + \ : fzf#vim#with_preview(s:ag_opts, s:horiz_preview_layout, '?'), + \ 0) +nnoremap t :call fzf_files() +nnoremap ff :Rg +nnoremap fh :Helptags +nnoremap ft :Filetypes +" }}} +" gundo {{{ +if has("python") + nnoremap U :silent GundoToggle + 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 diff --git a/vim/after/ftplugin/rust.vim b/vim/after/ftplugin/rust.vim deleted file mode 100644 index f30a884..0000000 --- a/vim/after/ftplugin/rust.vim +++ /dev/null @@ -1 +0,0 @@ -set tw=78 diff --git a/vim/colors/local.vim b/vim/colors/local.vim deleted file mode 100644 index 7e22c18..0000000 --- a/vim/colors/local.vim +++ /dev/null @@ -1,126 +0,0 @@ -highlight clear -syntax reset -set background=dark -let g:colors_name = expand(':t:r') - -let s:g = { - \"black": "#000000", - \"red": "#ed5f74", - \"green": "#1ea672", - \"yellow": "#d97917", - \"blue": "#688ef1", - \"magenta": "#c96ed0", - \"cyan": "#3a97d4", - \"white": "#e3e8ee", - \"brightblack": "#697386", - \"brightred": "#fbb5b2", - \"brightgreen": "#85d996", - \"brightyellow": "#efc078", - \"brightblue": "#9fcdff", - \"brightmagenta": "#f0b4e4", - \"brightcyan": "#7fd3ed", - \"brightwhite": "#ffffff", - \"darkblack": "#000000", - \"darkred": "#742833", - \"darkgreen": "#00643c", - \"darkyellow": "#6e3500", - \"darkblue": "#2c4074", - \"darkmagenta": "#602864", - \"darkcyan": "#144c71", - \"darkwhite": "#3e4043", - \"darkerwhite": "#090e14", -\} - -let s:c = { - \"black": "0", - \"red": "1", - \"green": "2", - \"yellow": "3", - \"blue": "4", - \"magenta": "5", - \"cyan": "6", - \"white": "7", - \"brightblack": "8", - \"brightred": "9", - \"brightgreen": "10", - \"brightyellow": "11", - \"brightblue": "12", - \"brightmagenta": "13", - \"brightcyan": "14", - \"brightwhite": "15", -\} - -function s:hi(name, fg, bg) - if a:fg == "" - let ctermfg = "" - let guifg = "" - elseif a:fg =~ "^#" - let ctermfg = "" - let guifg = "guifg=" . a:fg - else - let ctermfg = "ctermfg=" . s:c[a:fg] - let guifg = "guifg=" . s:g[a:fg] - endif - - if a:bg == "" - let ctermbg = "" - let guibg = "" - elseif a:bg =~ "^#" - let ctermbg = "" - let guibg = "guibg=" . a:bg - else - let ctermbg = "ctermbg=" . s:c[a:bg] - let guibg = "guibg=" . s:g[a:bg] - endif - - silent exe "highlight clear " . a:name - if a:fg != "" || a:bg != "" - silent exe "highlight " . a:name . " " . ctermfg . " " . ctermbg . " " . guifg . " " . guibg - endif -endfunction - -" text -call hi("Comment", "brightblack", "") -call hi("Constant", "red", "") -call hi("Delimiter", "blue", "") -call hi("Error", "black", "brightmagenta") -call hi("Function", "brightcyan", "") -call hi("Identifier", "", "") -call hi("Include", "blue", "") -call hi("Operator", "", "") -call hi("PreProc", "magenta", "") -call hi("Special", "magenta", "") -call hi("SpecialKey", "magenta", "") -call hi("Statement", "yellow", "") -call hi("Title", "magenta", "") -call hi("Todo", "black", "brightyellow") -call hi("Type", "green", "") - -autocmd FileType go call hi("goBuiltins", "yellow", "") -autocmd FileType go call hi("goFunctionCall", "brightcyan", "") -autocmd FileType markdown call hi("mkdListItem", "yellow", "") -autocmd FileType perl call hi("Identifier", "brightcyan", "") -autocmd FileType puppet call hi("puppetStringDelimiter", "red", "") -autocmd FileType ruby call hi("rubyInterpolationDelimiter", "magenta", "") -autocmd FileType ruby call hi("rubyPercentStringDelimiter", "yellow", "") -autocmd FileType ruby call hi("rubyStringDelimiter", "red", "") -autocmd FileType ruby call hi("rubyRegexDelimiter", "red", "") -autocmd FileType sh call hi("shQuote", "red", "") -autocmd FileType vim call hi("vimBracket", "magenta", "") -autocmd FileType vim call hi("vimMapMod", "magenta", "") - -" ui -call hi("DiffAdd", "", s:g["darkgreen"]) -call hi("DiffChange", "", s:g["darkblue"]) -call hi("DiffDelete", "", s:g["darkred"]) -call hi("DiffText", "", s:g["darkmagenta"]) -call hi("Folded", "brightgreen", s:g["darkgreen"]) -call hi("MatchParen", "brightcyan", s:g["darkcyan"]) -call hi("MoreMsg", "green", s:g["darkgreen"]) -call hi("NonText", "brightblue", s:g["darkerwhite"]) -call hi("Search", "", s:g["darkmagenta"]) -call hi("SpellBad", "", s:g["darkred"]) -call hi("SpellCap", "", s:g["darkblue"]) -call hi("SpellRare", "", s:g["darkgreen"]) -call hi("SpellLocal", "", s:g["darkmagenta"]) -call hi("Visual", "", s:g["darkwhite"]) diff --git a/vim/ftdetect/c.vim b/vim/ftdetect/c.vim deleted file mode 100644 index 8dac68b..0000000 --- a/vim/ftdetect/c.vim +++ /dev/null @@ -1 +0,0 @@ -let c_syntax_for_h = 1 diff --git a/vim/ftdetect/levdes.vim b/vim/ftdetect/levdes.vim deleted file mode 100644 index c016fd8..0000000 --- a/vim/ftdetect/levdes.vim +++ /dev/null @@ -1 +0,0 @@ -au! BufRead,BufNewFile *crawl*/*.des set filetype=levdes diff --git a/vim/ftdetect/nhdes.vim b/vim/ftdetect/nhdes.vim deleted file mode 100644 index 5886d51..0000000 --- a/vim/ftdetect/nhdes.vim +++ /dev/null @@ -1 +0,0 @@ -au! BufRead,BufNewFile *nethack*/*.des set filetype=nhdes diff --git a/vim/ftplugin/c.vim b/vim/ftplugin/c.vim deleted file mode 100644 index 13c7d4a..0000000 --- a/vim/ftplugin/c.vim +++ /dev/null @@ -1 +0,0 @@ -setlocal cinoptions+=:0,l1,g0,(0,W1s diff --git a/vim/ftplugin/cpp.vim b/vim/ftplugin/cpp.vim deleted file mode 100644 index 83d7802..0000000 --- a/vim/ftplugin/cpp.vim +++ /dev/null @@ -1,2 +0,0 @@ -let b:load_doxygen_syntax = 1 -setlocal cinoptions+=:0,l1,g0,(0,W1s diff --git a/vim/ftplugin/gitcommit.vim b/vim/ftplugin/gitcommit.vim deleted file mode 100644 index b1c1450..0000000 --- a/vim/ftplugin/gitcommit.vim +++ /dev/null @@ -1,9 +0,0 @@ -setlocal viminfo= -augroup local_gitcommit - autocmd! - autocmd BufWinEnter - \ if getline(1) == '' | - \ exe "normal! ggO" | - \ startinsert | - \ endif -augroup END diff --git a/vim/ftplugin/go.vim b/vim/ftplugin/go.vim deleted file mode 100644 index c4c065b..0000000 --- a/vim/ftplugin/go.vim +++ /dev/null @@ -1,5 +0,0 @@ -setlocal ts=4 -let b:ale_fixers = {"go": ["gofmt"]} -let b:ale_fix_on_save = 1 - -map :ALEGoToDefinition diff --git a/vim/ftplugin/help.vim b/vim/ftplugin/help.vim deleted file mode 100644 index 475e0a7..0000000 --- a/vim/ftplugin/help.vim +++ /dev/null @@ -1,3 +0,0 @@ -setlocal keywordprg=:help -nnoremap K K -vnoremap K K diff --git a/vim/ftplugin/javascript.vim b/vim/ftplugin/javascript.vim deleted file mode 100644 index e5b284f..0000000 --- a/vim/ftplugin/javascript.vim +++ /dev/null @@ -1,4 +0,0 @@ -let b:ale_fixers = {"javascript": ["eslint", "prettier"]} -let b:ale_fix_on_save = 1 -let b:ale_javascript_eslint_executable = "node_modules/.bin/eslint" -let b:ale_javascript_prettier_executable = "node_modules/.bin/prettier" diff --git a/vim/ftplugin/perl.vim b/vim/ftplugin/perl.vim deleted file mode 100644 index 3571e98..0000000 --- a/vim/ftplugin/perl.vim +++ /dev/null @@ -1,11 +0,0 @@ -let b:ale_linters = { 'perl': ['perlcritic'] } -" rainbow parens break syntax-based indent -autocmd vimrc BufEnter let b:indent_use_syntax = 0 - -" look up words in perldoc rather than man for K -function! s:perldoc(word) - exe 'silent read! perldoc -o PlainText -f "' . a:word . '" 2>/dev/null || perldoc -o PlainText "' . a:word . '"' - setlocal ft=man -endfunction -nnoremap K :call Help(0, [':'], 'perldoc') -vnoremap K :call Help(1, [':'], 'perldoc') diff --git a/vim/ftplugin/puppet.vim b/vim/ftplugin/puppet.vim deleted file mode 100644 index d1652a3..0000000 --- a/vim/ftplugin/puppet.vim +++ /dev/null @@ -1 +0,0 @@ -let g:puppet_align_hashes = 0 diff --git a/vim/ftplugin/python.vim b/vim/ftplugin/python.vim deleted file mode 100644 index 5bf8dba..0000000 --- a/vim/ftplugin/python.vim +++ /dev/null @@ -1,19 +0,0 @@ -" look up words in pydoc rather than man for K -function! s:pydoc(word) - let l:pydoc_manpager = $MANPAGER - let l:pydoc_pager = $PAGER - let $MANPAGER = 'cat' - let $PAGER = 'cat' - exe 'silent read! pydoc "' . a:word . '" 2>/dev/null' - let $MANPAGER = l:pydoc_manpager - let $PAGER = l:pydoc_pager - setlocal ft=man -endfunction -nnoremap K :call Help(0, ['.'], 'pydoc') -vnoremap K :call Help(1, ['.'], 'pydoc') - -map :ALEGoToDefinition - -let b:ale_fixers = { 'python': ['black', 'isort'] } -let b:ale_fix_on_save = 1 -let b:ale_python_flake8_options = '--max-line-length 1000 --ignore=E203,W503 --extend-select=W504' \ No newline at end of file diff --git a/vim/ftplugin/ruby.vim b/vim/ftplugin/ruby.vim deleted file mode 100644 index 035f432..0000000 --- a/vim/ftplugin/ruby.vim +++ /dev/null @@ -1,25 +0,0 @@ -function! s:rubocop_in_bundler() - let l:gemfiles = glob("*.gemspec", 1, 1) - if filereadable("Gemfile") - let l:gemfiles += ["Gemfile"] - endif - for l:file in l:gemfiles - for l:line in readfile(l:file) - if l:line =~ 'gem.*rubocop' - return 1 - endif - endfor - endfor - return 0 -endfunction -if s:rubocop_in_bundler() - let b:ale_ruby_rubocop_executable = 'bundle' -endif - -" look up words in ri rather than man for K -function! s:ri(word) - exe 'silent read! ri -T -f rdoc "' . a:word . '" 2>/dev/null' - setlocal ft= -endfunction -nnoremap K :call Help(0, [':', '.'], 'ri') -vnoremap K :call Help(1, [':', '.'], 'ri') diff --git a/vim/ftplugin/rust.vim b/vim/ftplugin/rust.vim deleted file mode 100644 index 2b9606e..0000000 --- a/vim/ftplugin/rust.vim +++ /dev/null @@ -1,18 +0,0 @@ -let b:ale_linters = { 'rust': ['analyzer'] } -let b:ale_rust_analyzer_config = { - \'checkOnSave': { 'command': 'clippy' }, - \'cargo': { 'allFeatures': v:true }, - \'diagnostics': { 'disabled': ['inactive-code'] }, -\} -let b:ale_fixers = { 'rust': ['rustfmt'] } -let b:ale_fix_on_save = 1 -let b:ale_rust_rustfmt_options = "--edition 2018" - -map :ALEGoToDefinition - -if filereadable("Cargo.toml") - compiler cargo - setlocal makeprg=cargo\ build -else - setlocal makeprg=rustc\ % -endif diff --git a/vim/ftplugin/sh.vim b/vim/ftplugin/sh.vim deleted file mode 100644 index 728eb70..0000000 --- a/vim/ftplugin/sh.vim +++ /dev/null @@ -1,4 +0,0 @@ -let b:is_bash = 1 -let b:ale_fixers = { 'sh': ['shfmt'] } -let b:ale_fix_on_save = 1 -let b:ale_sh_shfmt_options = '-i 4' diff --git a/vim/ftplugin/terraform.vim b/vim/ftplugin/terraform.vim deleted file mode 100644 index 5764f2e..0000000 --- a/vim/ftplugin/terraform.vim +++ /dev/null @@ -1,3 +0,0 @@ -setlocal commentstring=#\ %s -let b:ale_fixers = { 'terraform': ['terraform'] } -let b:ale_fix_on_save = 1 diff --git a/vim/ftplugin/tex.vim b/vim/ftplugin/tex.vim deleted file mode 100644 index 03c0821..0000000 --- a/vim/ftplugin/tex.vim +++ /dev/null @@ -1,98 +0,0 @@ -let b:tex_flavor="latex" - -" :make converts to pdf -setlocal makeprg=(cd\ /tmp\ &&\ pdflatex\ --synctex=1\ --halt-on-error\ %:p) - -function! s:zathura() - if s:is_running('^zathura') - " zathura automatically reloads - return - endif - call remote_startserver("vim-zathura") - call system('zathura --fork -x "vim --servername vim-zathura --remote +%{line} %{input}" ' . s:current_pdf()) -endfunction - -function! s:current_pdf() - let base = expand(':t:r') - if base == '' - let base = expand('%:t:r') - endif - return '/tmp/' . base . '.pdf' -endfunction - -function! s:is_running(re) - let processes = split(system('ps xo args'), '\n') - for process in processes - if process =~ a:re - return 1 - endif - endfor - return 0 -endfunction - -function! s:synctex() - if s:is_running('^zathura') - exe "silent !zathura --synctex-forward " . line('.') . ":" . col('.') . ":" . expand('%:p') . " " . s:current_pdf() - redraw - endif -endfunction - -let g:_tex_last_line_seen = -1 -function! s:cursor_moved() - let line = line('.') - if line != g:_tex_last_line_seen - call s:synctex() - endif - let g:_tex_last_line_seen = line -endfunction - -" don't load the pdf if the make failed -function! s:make_errors() - let qf = getqflist() - for line in qf - if line['type'] == 'E' - return 1 - endif - endfor - return 0 -endfunction - -augroup _tex - autocmd! - if executable('zathura') && strlen(expand('$DISPLAY')) - autocmd QuickFixCmdPost make if !s:make_errors() | call s:zathura() | endif - endif - " currently this is not usable until - " https://git.pwmt.org/pwmt/zathura/-/issues/157 is fixed - " autocmd CursorMoved call s:cursor_moved() -augroup END - -" see :help errorformat-LaTeX -setlocal errorformat= - \%E!\ LaTeX\ %trror:\ %m, - \%E!\ %m, - \%+WLaTeX\ %.%#Warning:\ %.%#line\ %l%.%#, - \%+W%.%#\ at\ lines\ %l--%*\\d, - \%WLaTeX\ %.%#Warning:\ %m, - \%Cl.%l\ %m, - \%+C\ \ %m., - \%+C%.%#-%.%#, - \%+C%.%#[]%.%#, - \%+C[]%.%#, - \%+C%.%#%[{}\\]%.%#, - \%+C<%.%#>%.%#, - \%C\ \ %m, - \%-GSee\ the\ LaTeX%m, - \%-GType\ \ H\ %m, - \%-G\ ...%.%#, - \%-G%.%#\ (C)\ %.%#, - \%-G(see\ the\ transcript%.%#), - \%-G\\s%#, - \%+O(%f)%r, - \%+P(%f%r, - \%+P\ %\\=(%f%r, - \%+P%*[^()](%f%r, - \%+P[%\\d%[^()]%#(%f%r, - \%+Q)%r, - \%+Q%*[^()])%r, - \%+Q[%\\d%*[^()])%r diff --git a/vim/ftplugin/vim.vim b/vim/ftplugin/vim.vim deleted file mode 100644 index 475e0a7..0000000 --- a/vim/ftplugin/vim.vim +++ /dev/null @@ -1,3 +0,0 @@ -setlocal keywordprg=:help -nnoremap K K -vnoremap K K diff --git a/vim/ftplugin/vimwiki.vim b/vim/ftplugin/vimwiki.vim deleted file mode 100644 index aac5bcb..0000000 --- a/vim/ftplugin/vimwiki.vim +++ /dev/null @@ -1 +0,0 @@ -nmap VimwikiNextLink diff --git a/vim/ftplugin/xs.vim b/vim/ftplugin/xs.vim deleted file mode 100644 index 8dc989f..0000000 --- a/vim/ftplugin/xs.vim +++ /dev/null @@ -1,10 +0,0 @@ -setlocal cindent -setlocal cinoptions+=:0,l1,g0,(0,W1s - -" look up words in perldoc rather than man for K if they exist -function! s:perldoc_or_man(word) - exe 'silent read! perldoc -o PlainText -a "' . a:word . '" 2>/dev/null || man -Pcat ' . a:word - setlocal ft=man -endfunction -nnoremap K :call Help(0, [], 'perldoc_or_man') -vnoremap K :call Help(1, [], 'perldoc_or_man') diff --git a/vim/pack/filetype/start/polyglot b/vim/pack/filetype/start/polyglot deleted file mode 160000 index bc8a81d..0000000 --- a/vim/pack/filetype/start/polyglot +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bc8a81d3592dab86334f27d1d43c080ebf680d42 diff --git a/vim/pack/plugins/start/airline b/vim/pack/plugins/start/airline deleted file mode 160000 index 038e3a6..0000000 --- a/vim/pack/plugins/start/airline +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 038e3a6ca59f11b3bb6a94087c1792322d1a1d5c diff --git a/vim/pack/plugins/start/ale b/vim/pack/plugins/start/ale deleted file mode 160000 index c3f9bcc..0000000 --- a/vim/pack/plugins/start/ale +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c3f9bccb8c04b01d5d0712b8691658af0b0ddb16 diff --git a/vim/pack/plugins/start/autobrace b/vim/pack/plugins/start/autobrace deleted file mode 160000 index e51de9e..0000000 --- a/vim/pack/plugins/start/autobrace +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e51de9e6265ade6195c8983edf58c462695acfe6 diff --git a/vim/pack/plugins/start/commentary b/vim/pack/plugins/start/commentary deleted file mode 160000 index e87cd90..0000000 --- a/vim/pack/plugins/start/commentary +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e87cd90dc09c2a203e13af9704bd0ef79303d755 diff --git a/vim/pack/plugins/start/diff-changes b/vim/pack/plugins/start/diff-changes deleted file mode 160000 index 97cf3bc..0000000 --- a/vim/pack/plugins/start/diff-changes +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 97cf3bc8b51f27452b4174e4f770758d42162d0f diff --git a/vim/pack/plugins/start/editorconfig b/vim/pack/plugins/start/editorconfig deleted file mode 160000 index 1d54632..0000000 --- a/vim/pack/plugins/start/editorconfig +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1d54632f7fcad38df8e428f349bc58b15af4b206 diff --git a/vim/pack/plugins/start/fzf b/vim/pack/plugins/start/fzf deleted file mode 160000 index 352ea07..0000000 --- a/vim/pack/plugins/start/fzf +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 352ea072269dfe2a3c429785a95a2f22887ccda3 diff --git a/vim/pack/plugins/start/fzf.vim b/vim/pack/plugins/start/fzf.vim deleted file mode 160000 index dc71692..0000000 --- a/vim/pack/plugins/start/fzf.vim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit dc71692255b62d1f67dc55c8e51ab1aa467b1d46 diff --git a/vim/pack/plugins/start/gundo b/vim/pack/plugins/start/gundo deleted file mode 160000 index c5efef1..0000000 --- a/vim/pack/plugins/start/gundo +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c5efef192b975b8e7d5fa3c6db932648d3b76323 diff --git a/vim/pack/plugins/start/history-sync b/vim/pack/plugins/start/history-sync deleted file mode 160000 index 279aa75..0000000 --- a/vim/pack/plugins/start/history-sync +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 279aa756157ab818df67e854e953f6e05809b4a3 diff --git a/vim/pack/plugins/start/startify b/vim/pack/plugins/start/startify deleted file mode 160000 index 81e36c3..0000000 --- a/vim/pack/plugins/start/startify +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 81e36c352a8deea54df5ec1e2f4348685569bed2 diff --git a/vim/pack/plugins/start/textobj b/vim/pack/plugins/start/textobj deleted file mode 160000 index fd84055..0000000 --- a/vim/pack/plugins/start/textobj +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fd84055046d38c7e850fdbf13f92ab2898f81149 diff --git a/vim/plugin/dircreate.vim b/vim/plugin/dircreate.vim deleted file mode 100644 index 11da7f9..0000000 --- a/vim/plugin/dircreate.vim +++ /dev/null @@ -1,31 +0,0 @@ -function! s:ensure_dir_exists() - let l:required_dir = expand("%:h") - if !isdirectory(l:required_dir) - if ask_quit("Directory '" . l:required_dir . "' doesn't exist.", "&Create it?") - return - endif - - try - call mkdir(l:required_dir, 'p') - catch - call ask_quit("Can't create '" . l:required_dir . "'", "&Continue anyway?") - endtry - endif -endfunction - -function! s:ask_quit(msg, proposed_action) - if confirm(a:msg, "&Quit?\n" . a:proposed_action) == 1 - if len(getbufinfo()) > 1 - silent bd - return 1 - else - exit - end - endif - return 0 -endfunction - -augroup dircreate - autocmd! - autocmd BufNewFile * call ensure_dir_exists() -augroup END diff --git a/vim/plugin/eolws.vim b/vim/plugin/eolws.vim deleted file mode 100644 index 1f1a003..0000000 --- a/vim/plugin/eolws.vim +++ /dev/null @@ -1,6 +0,0 @@ -augroup eolws - autocmd! - autocmd InsertEnter * syn clear EOLWS | syn match EOLWS excludenl /\s\+\%#\@!$/ - autocmd InsertLeave * syn clear EOLWS | syn match EOLWS excludenl /\s\+$/ -augroup END -highlight EOLWS ctermbg=red guibg=red diff --git a/vim/plugin/keywordprg.vim b/vim/plugin/keywordprg.vim deleted file mode 100644 index dfedd80..0000000 --- a/vim/plugin/keywordprg.vim +++ /dev/null @@ -1,33 +0,0 @@ -function! Help(visual, iskeyword, command) - let l:iskeyword = &iskeyword - for l:kw in a:iskeyword - exe 'set iskeyword+=' . l:kw - endfor - if a:visual - let l:oldreg = @a - normal! gv"aygv - let l:word = @a - let @a = l:oldreg - else - let l:word = expand('') - endif - let &iskeyword = l:iskeyword - - exe 'noswapfile ' . &helpheight . 'new ' . l:word - setlocal buftype=nofile - setlocal bufhidden=wipe - setlocal nobuflisted - - setlocal modifiable - exe 'call ' . a:command . '("' . l:word . '")' - normal! ggdd - setlocal nomodifiable -endfunction - -function! s:man(word) - exe 'silent read! man -Pcat ' . a:word - setlocal filetype=man -endfunction - -nnoremap K :call Help(0, [], 'man') -xnoremap K :call Help(1, [], 'man') diff --git a/vim/plugin/opinionated-defaults.vim b/vim/plugin/opinionated-defaults.vim deleted file mode 100644 index 6ce034b..0000000 --- a/vim/plugin/opinionated-defaults.vim +++ /dev/null @@ -1,157 +0,0 @@ -""" GENERAL """ -set nocompatible -syntax on -filetype indent plugin on -augroup opinionated_defaults - autocmd! -augroup END - - -""" PERSISTENCE """ - -" remember as many history items as possible (command, search, etc) -set history=10000 -" enable persistent undo (undo even after closing and reopening vim) -if has('persistent_undo') - let s:undocachedir = $HOME . '/.cache/vim/undo' - if !isdirectory(s:undocachedir) - call mkdir(s:undocachedir, 'p') - endif - exe "set undodir=" . s:undocachedir - set undofile -endif -" use a separate swapfile directory -let s:swapfiledir = $HOME . '/.cache/vim/swap' -if !isdirectory(s:swapfiledir) - call mkdir(s:swapfiledir, 'p') -endif -exe "set directory=" . s:swapfiledir . "//" -" use a separate view directory -let s:viewdir = $HOME . '/.cache/vim/view' -if !isdirectory(s:viewdir) - call mkdir(s:viewdir, 'p') -endif -exe "set viewdir=" . s:viewdir - - -""" BUFFERS """ - -" automatically write the buffer before :make, shell commands, etc -set autowrite -" ask to save modified buffers when quitting, instead of throwing an error -set confirm -" allow switching to other buffers when the current one is modified -set hidden -" these two restore the last known cursor position when a buffer is loaded -set nostartofline -autocmd opinionated_defaults BufReadPost * - \ if line("'\"") <= line('$') | - \ exe 'normal! g`"' | - \ endif - - -""" DISPLAY """ - -" show as much of a line as possible if it doesn't all fit on the screen -set display+=truncate -" more useful display of nonprinting characters (<07> instead of ^G) -set display+=uhex -" don't redraw in the middle of noninteractive commands (maps, macros, etc) -set lazyredraw -" always give a message for the number of lines delete/changed -set report=0 -" keep some additional context visible when scrolling -set scrolloff=5 -if has('cmdline_info') - " display the current partial command and size of the visual selection - set showcmd -endif -if has('conceal') - " enable syntax-specific hiding of text - set conceallevel=2 -endif -if has('linebreak') - " display a marker when a line was wrapped - set showbreak=> -endif - - -""" EDITING """ - -" automatically use an indent that matches the previous line -set autoindent -" allow backspacing over everything -set backspace=indent,eol,start -" remove leading comment characters intelligently when joining lines -set formatoptions+=j -" always join with a single space, even between sentences -set nojoinspaces -" try to always keep indentation lined up on shiftwidth boundaries -set shiftround -" keep softtabstop and shiftwidth in sync -set softtabstop=-1 - - -""" COMMAND MODE """ - -" make command mode completion work more like the shell: -" first, complete the longest common sequence, -" then show a list, -" then cycle through completing the full names in the list in order -set wildmode=longest,list,full -if exists('+wildignorecase') - " make command mode completion case insensitive - set wildignorecase -endif - - -""" SEARCH """ - -" make searches case-insensitive -set ignorecase -" unless they include a capital letter -set smartcase -if has('extra_search') - " highlight all matches when searching - set hlsearch -endif - - -""" TERMINAL STUFF """ - -" wait a much shorter amount of time for escape sequences -" (this makes much more responsive) -set ttimeoutlen=50 -" send text to the terminal in such a way that line wrapping is done at the -" terminal level, so copying and pasting wrapped lines works correctly -" (assuming you temporarily unset showbreak) -set ttyfast -" entirely disable error bells: -" make all bells visual bells -set visualbell -" and then disable visual bells -set t_vb= - - -""" COLORS """ - -" force vim to use 256 colors -" (it typically can't detect this while in screen/tmux since TERM=screen -" doesn't advertise it, even though ~everything does support it these days) -set t_Co=256 -" globally highlight diff conflict markers -match ErrorMsg '^\(<\||\|=\|>\)\{7\}\([^=].\+\)\?$' - - -""" MAPPINGS """ - -" keep the current selection when indenting -xnoremap < >gv -" make Y behave analogously to D instead of dd -nnoremap Y y$ -" make arrow keys move visually (since j/k already move linewise) -noremap gk -noremap gj -inoremap gk -inoremap gj diff --git a/vim/plugin/rainbow_paren.vim b/vim/plugin/rainbow_paren.vim deleted file mode 100644 index 9c26134..0000000 --- a/vim/plugin/rainbow_paren.vim +++ /dev/null @@ -1,96 +0,0 @@ -" this script by Shawn M Moore aka Sartak -" also by Michael R Geddes aka frogonwheels -" originally by anonymous - -" this in the public domain -" last updated 25 Mar 07 - -" this does nothing unless you, -" let g:rainbow = 1 - -" and set which kinds of character pairs you want to rainbow -" let g:rainbow_paren = 1 " () -" let g:rainbow_brace = 1 " {} -" let g:rainbow_bracket = 1 " [] -" let g:rainbow_angle = 1 " <> - -" if you want the different types to nest, such that the braces in ({}) are -" colored the same as the internal parens of (()), then -" let g:rainbow_nested = 1 - -function! Rainbow() - let s:basename = 'level' - exe 'hi '.s:basename.'1c ctermfg=6 guifg=#1673b0' - exe 'hi '.s:basename.'2c ctermfg=2 guifg=#008551' - exe 'hi '.s:basename.'3c ctermfg=3 guifg=#b25200' - exe 'hi '.s:basename.'4c ctermfg=4 guifg=#4369cc' - exe 'hi '.s:basename.'5c ctermfg=5 guifg=#a045a7' - " this color is never nested, it only appears on the outermost layer - exe 'hi '.s:basename.'6c ctermfg=1 guifg=#c7394e' - - " helper function - func s:DoSyn(cur, top, left, right, uniq) - let uniq = a:uniq - if exists("g:rainbow_nested") && g:rainbow_nested != 0 - let uniq = "" - endif - - let cmd = 'syn region '.s:basename.uniq.a:cur.' transparent fold matchgroup='.s:basename.a:cur.'c start=/'.a:left.'/ end=/'.a:right.'/ contains=TOP' - - let i = a:cur - - if i == 1 - let i = a:top - endif - - while i <= a:top - let cmd = cmd . ',' . s:basename . uniq . i - let i = i + 1 - endwhile - exe cmd - endfunc - - func s:DoSyntaxes(count) - let i = 1 - - while i <= a:count - " if you define new pairs, make sure to take into account that the - " delimiter is currently / and that it uses regex, so you need to escape - " regex metachars (like what is done for brackets) - - if exists("g:rainbow_paren") && g:rainbow_paren != 0 - " ocaml uses (* *) for comments; these shouldn't be highlighted - if &filetype == "ocaml" - call s:DoSyn(i, a:count, "(\\*\\@!", "\\*\\@", "d") - endif - - let i = i + 1 - endwhile - endfun - - call s:DoSyntaxes(6) " 6 is the number of colors we have - - delfun s:DoSyn - delfun s:DoSyntaxes -endfunction - -if exists("g:rainbow") && g:rainbow - augroup rainbow - autocmd BufWinEnter,FileType * call Rainbow() - augroup END -endif diff --git a/vim/spell/en.utf-8.add b/vim/spell/en.utf-8.add deleted file mode 100644 index 14fe17c..0000000 --- a/vim/spell/en.utf-8.add +++ /dev/null @@ -1,111 +0,0 @@ -schedulable -mutex -hippocampus -anterograde -playtesters -gameplay -SQL -API -endianness -timestamp -Luehrs -doy -tozt -UIUC -Hydrogeology -Geochemists -Tcl -Tk -PDF -SVG -PostScript -http -TrueType -OpenMP -perl -org -MooseX -NonMoose -interoperate -github -IRC -multiplayer -plugin -TAEB -taeb -sartak -NetHack -nethack -Pty -sourceforge -OCaml -LablGTK -LuaIRC -luaforge -luairc -Lua -CTCP -DCC -CPAN -JavaScript -CSS -sed -Debian -Gentoo -XP -Cygwin -Darcs -Inline -webmaster -rollerblading -Illini -templating -programmatically -JS -Xslate -misparsed -CSV -ParseXLSX -XLSX -ParseExcel -WriteExcel -tmux -unshifted -xbindkeys -Firefox -remappings -Pentadactyl -Zsh -readline -vim -vimrc -zshrc -inputrc -structs -inlined -println -printf -builtin -parsable -Mozilla -inlinable -LLVM -backend -sandboxed -Acid2 -fn -mut -utf8 -interoperating -Mozilla's -stringification -enum -enums -destructuring -NES -blog -https -doyster -pdf -termcast -Avaaz diff --git a/vim/syntax/levdes.vim b/vim/syntax/levdes.vim deleted file mode 100644 index a4f1982..0000000 --- a/vim/syntax/levdes.vim +++ /dev/null @@ -1,304 +0,0 @@ -" Vim syntax file -" Language: Dungeon Crawl level design (.des) files. -" Maintainer: Darshan Shaligram -" Last Change: 2007 Jun 28 -" Remark: Basic Vim syntax highlighting for Dungeon Crawl Stone Soup -" level design (.des) files. -" -" How to use this: -" * Put levdes.vim (this file) under ~/.vim/syntax (or similar directory for -" your system - usually C:\Program Files\Vim\vimfiles\syntax on Windows). -" * In your .vimrc, or in a new file ~/.vim/ftdetect/levdes.vim, add this line: -" au BufRead,BufNewFile *.des set syntax=levdes -" Thereafter, any .des files you edit in (g)vim will use syntax highlighting. - -if version < 600 - syntax clear -elseif exists("b:current_syntax") - finish -endif - -if !exists("main_syntax") - let main_syntax = 'des' -endif - -syn include @desLua syntax/lua.vim - -syn case match - -syn match desLuaBlock /\(lua\)\?\s\+{{/ contained -syn match desOtherLuaBlock /^\(prelude\|lua\|validate\|epilogue\|veto\)\?\s*{{/ contained -syn match desLuaBlockEnd /}}/ contained -"syn match desColonLine /^\s*:/ contained - -syn cluster desLuaGroup contains=desLuaBlock,desOtherLuaBlock,desLuaBlockEnd - -syn region desLua start=/^\s*\(lua\)\?\s*{{/ end=/}}\s*$/ contains=@desLuaGroup,@desLua keepend -syn region desLuaCol start=/^\s*:/ end=/$/ contains=@desLuaGroup,@desLua keepend -syn region desVal start=/^\s*validate\?\s*{{/ end=/}}\s*$/ contains=@desLuaGroup,@desLua keepend -syn region desPre start=/^\s*prelude\?\s*{{/ end=/}}\s*$/ contains=@desLuaGroup,@desLua keepend -syn region desEpi start=/^\s*epilogue\?\s*{{/ end=/}}\s*$/ contains=@desLuagroup,@deslua keepend -syn region desVet start=/^\s*veto\?\s*{{/ end=/}}\s*$/ contains=@desLuagroup,@deslua keepend - -setlocal iskeyword+=: -setlocal iskeyword+=- - -" These have extra matching going on, so not in desDeclarator (global) -syn keyword desDec NAME: COLOUR: SUBST: NSUBST: SHUFFLE: CLEAR: LROCKCOL: LFLOORCOL: contained - -syn region desSubst start=/^SUBST:\s*/ end=/$/ contains=desDec,desSubstArg,desSubstSep,@desMapElements keepend -syn region desNsubst start=/^NSUBST:\s*/ end=/$/ contains=desDec,desSubstArg,desSubstSep,@desMapElements keepend -syn region desShuffle start=/^SHUFFLE:\s*/ end=/$/ contains=desDec,desMapFrag keepend -syn region desClear start=/^CLEAR:\s*/ end=/$/ contains=desDec,desSubstArg keepend -syn region desColourline start=/^\(COLOUR\|L[A-Z]*COL\):/ end=/$/ contains=desDec,desColour keepend - -" Absolutely always highlight the vault name as just that -syn region desNameline start=/^NAME:/ end=/$/ contains=desDec,desVaultname keepend -syn match desVaultname /\w*/ contained - -syn match desGod contained /ashenzari\|beogh\|cheibriados\|dithmenos\|elyvilon/ -syn match desGod contained /fedhas\|gozag\|jiyva\|kikubaaqudgha\|lugonu/ -syn match desGod contained /makhleb\|nemelex_xobeh\|okawaru\|qazlal\|ru/ -syn match desGod contained /sif_muna\|trog\|vehumet\|xom\|yredelemnul\|zin/ -syn match desGod contained /the_shining_one/ - -syn keyword desDeclarator ORIENT: DEPTH: PLACE: MONS: FLAGS: default-depth: TAGS: CHANCE: WEIGHT: -syn keyword desDeclarator ITEM: KFEAT: KMONS: KITEM: KMASK: KPROP: MARKER: WELCOME: -syn keyword desDeclarator LFLOORTILE: LROCKTILE: FTILE: RTILE: TILE: SUBVAULT: FHEIGHT: DESC: ORDER: - -" keywords -" ORIENT -syn keyword desOrientation north south east west northwest northeast southwest southeast encompass float centre - -" DEPTH | PLACE -syn keyword desOrientation Depths Temple Orc Elf Lair Swamp Shoals Snake Spider Slime Vaults Blade Crypt Tomb -"Note: `Zot` totally highlights in e.g. the items `rune of Zot` and `Orb of Zot`. Not worth fixing. -syn keyword desOrientation Hell Dis Geh Coc Tar Zot Forest Abyss Pan Zig Lab Bazaar Trove Sewer Ossuary -syn keyword desOrientation Bailey IceCv Volcano WizLab - -"Note: This is the list above, but lower-cased -syn match desBranch contained /d\|temple\|orc\|elf\|lair\|swamp\|shoals\|snake\|spider\|slime\|vaults\|blade\|crypt\|tomb/ -syn match desBranch contained /hell\|dis\|geh\|coc\|tar\|zot\|forest\|abyss\|pan\|zig\|lab\|bazaar\|trove\|sewer\|ossuary/ -syn match desBranch contained /bailey\|icecv\|volcano\|wizlab/ - -syn match desBranchname contained /dungeon\|depths\|temple\|orcish_mines\|elven_halls\|lair\|swamp\|shoals/ -syn match desBranchname contained /snake_pit\|spider_nest\|slime_pits\|vaults\|hall_of_blades\|crypt\|tomb/ -syn match desBranchname contained /hell\|dis\|gehenna\|cocytus\|tartarus\|zot\|forest\|abyss\|pandemonium/ -syn match desBranchname contained /ziggurat\|labyrinth\|bazaar\|trove\|sewer\|ossuary/ -syn match desBranchname contained /bailey\|ice_cave\|volcano\|wizlab/ - -" TAGS -" in abyss.cc -syn keyword desOrientation abyss_exit -" in decks.cc and dgn-labyrinth.cc (without `minotaur` because monster) -syn keyword desOrientation lab generate_loot -" from dlua.ziggurat -syn keyword desOrientation ziggurat_pillar centered -" map building in dungeon.cc (`transparent` is handled later) -"Note: `dummy` mis-catches `training dummy` about half as often as actually used as tag -syn keyword desOrientation dummy arrival no_exits extra ruin layout pan decor -syn keyword desOrientation allow_dup uniq luniq -syn keyword desOrientation no_hmirror no_vmirror no_rotate -syn keyword desOrientation no_dump -" vault placement in maps.cc -syn keyword desOrientation unrand place_unique special_room tutorial -syn keyword desOrientation water_ok overwrite_floor_cell replace_portal -" V vault building (mostly dlua/v_layouts and v_rooms) -syn keyword desOrientation vaults_room vaults_empty vaults_hard no_windows preserve_wall - -" ITEM | KITEM (in mapdef.cc, without `random`) -syn keyword desOrientation randbook any good_item star_item superb_item gold nothing -syn keyword desOrientation acquire mundane damaged cursed randart not_cursed useful unobtainable -syn keyword desOrientation mimic no_mimic no_pickup no_uniq allow_uniq -"Note: `rotting` removed here which often caught `rotting devil` but was unused as item tag -syn keyword desOrientation corpse chunk skeleton never_decay - -" MONS | KMONS (in mapdef.cc) -syn keyword desOrientation fix_slot priest_spells actual_spells god_gift -syn keyword desOrientation generate_awake patrolling band -syn keyword desOrientation hostile friendly good_neutral fellow_slime strict_neutral neutral -"Note: `spectre` removed: mis-catches `silent spectre` but was unused as modifier (`spectral` exists) -syn keyword desOrientation zombie skeleton simulacrum spectral -syn keyword desOrientation seen always_corpse never_corpse -syn keyword desOrientation base nonbase -syn keyword desOrientation n_suf n_adj n_rpl n_the -syn keyword desOrientation name_suffix name_adjective name_replace name_definite -syn keyword desOrientation n_des n_spe n_zom n_noc -syn keyword desOrientation name_descriptor name_species name_zombie name_nocorpse - -" COLOUR -" Base -syn keyword desColour contained blue green cyan red magenta brown darkgrey -syn keyword desColour contained lightblue lightgreen lightcyan lightred lightmagenta yellow lightgrey white -" Elemental -syn keyword desColour contained fire ice earth electricity air poison water magic mutagenic warp enchant -syn keyword desColour contained heal holy dark death unholy vehumet beogh crystal blood smoke slime jewel -syn keyword desColour contained elven dwarven orcish flash kraken floor rock mist shimmer_blue decay -syn keyword desColour contained silver gold iron bone elven_brick waves tree mangrove tornado liquefied -syn keyword desColour contained orb_glow disjunction random - -" TILE -syn keyword desOrientation no_random - -" KFEAT -syn keyword desOrientation known mimic - -" abyss TAGS in mapdef.cc -syn keyword desOrientation abyss abyss_rune -syn keyword desOrientation overwritable -" KMASK (in mapdef.cc) -syn keyword desOrientation vault no_item_gen no_monster_gen no_pool_fixup no_wall_fixup opaque no_trap_gen - -" KPROP -syn keyword desOrientation bloody highlight mold no_cloud_gen no_tele_into no_submerge no_tide no_jiyva - -syn match desComment "^\s*#.*$&" - -"Note: `;` and `|` are necessary due to monster/randbook `spells:`, -" `.` can be an empty spell slot and `'` is contained in certain spell names, -" `$` and `-` are used in depth definitions (but `,` should not match there). -syn match desProperty /\w*:[[:alnum:]_\.';|\$-]\+/ contains=desAttribute -" Without `oneline` this wraps around and matches e.g. some SUBST: on the next line -syn region desAttribute start=/\" contains=desBranch -syn match desEntry "\" -syn match desEntry "\" -syn match desEntry "\<\(no\)\=layout_\w*\>" -syn match desEntry "\" -syn match desEntry "\" -syn match desEntry "\" -syn match desEntry "\" contains=desBranch -syn match desEntry "\" -syn match desEntry "\" contains=desGod -syn match desEntry "\" contains=desGod -syn match desEntry "\" contains=desGod -syn match desEntry "\" contains=desGod -syn match desEntry "\" contains=desBranchname -syn match desEntry "\" contains=desBranchname -syn match desEntry "\" contains=desBranchname - -" 'transparent' is a Vim syntax keyword -syn match desTransparent "\" -syn match desRange "\d*-\d*" -syn match desNumber "\s\d*" -syn match desWeight "w\(eight\)\=:\d*" -syn match desWeight "q:\d*\(-\d*\)\=" -syn match desSlash "/" - -syn keyword desMapBookend MAP ENDMAP contained -syn match desMapWall /x/ contained -syn match desMapPermaWall /X/ contained -syn match desMapStoneWall /c/ contained -syn match desMapGlassWall /[mno]/ contained -syn match desMapMetalWall /v/ contained -syn match desMapCrystalWall /b/ contained -syn match desMapTree /t/ contained - -syn match desMapFloor /\./ contained -syn match desMapDoor /[+=]/ contained - -syn match desMapShallow /W/ contained -syn match desMapWater /w/ contained -syn match desMapLava /l/ contained - -syn match desMapEntry /@/ contained -syn match desMapStairs /[}{)(\]\[]/ contained -syn match desMapTrap /[\^~]/ contained - -syn match desMapGold /\$/ contained -syn match desMapValuable /[%*|]/ contained - -syn match desMapMonst /[0-9]/ contained - -syn cluster desMapElements contains=desMapBookend -syn cluster desMapElements add=desMapWall,desMapPermaWall,desMapStoneWall,desMapGlassWall,desMapCrystalWall,desMapMetalWall,desMapTree -syn cluster desMapElements add=desMapFloor,desMapDoor -syn cluster desMapElements add=desMapShallow,desMapWater,desMapLava -syn cluster desMapElements add=desMapEntry,desMapStairs,desMapTrap -syn cluster desMapElements add=desMapGold,desMapValuable -syn cluster desMapElements add=desMapMons - -syn match desSubstArg /\S/ contained nextgroup=desSubstSep skipwhite -syn match desSubstSep /[:=]/ contained nextgroup=desMapFrag skipwhite -syn match desColourSep /[:=]/ contained nextgroup=desColour skipwhite -syn region desMapFrag start=/./ end=/$/ contains=@desMapElements contained - -syn region desMap start=/^\s*\\s*$/ end=/^\s*\\s*$/ contains=@desMapElements keepend - -hi link desDec Statement -hi link desDeclarator Statement -hi link desVaultname Identifier -hi link desMapBookend Statement -hi link desLuaBlock Statement -hi link desOtherLuaBlock Statement -hi link desLuaBlockEnd Statement -"hi link desColonLine Statement -hi link desComment Comment -hi link desMap String -hi link desSubstArg String -hi link desRange String -hi link desEntry Type -hi link desNumber String -hi link desWeight String -hi link desSlash Comment - -hi link desSubstSep Type -hi link desOrientation Type -hi link desAttribute Type -hi link desProperty Special -hi link desGod Special -hi link desBranch Special -hi link desBranchname Special -hi link desColour Type -hi link desTransparent Type - -" It would be really nice if this worked for people who switch bg -" post-loading, like "normal" highlights do. Does someone know how? -if &bg == "dark" - hi desMapWall guifg=darkgray term=bold gui=bold ctermfg=white - hi desMapPermaWall guifg=#a0a000 gui=bold ctermfg=yellow - hi desMapStoneWall guifg=black gui=bold ctermfg=gray - hi desMapGlassWall guifg=lightcyan ctermfg=lightcyan - hi desMapMetalWall guifg=#004090 term=bold gui=bold ctermfg=lightblue - hi desMapCrystalWall guifg=#009040 term=bold gui=bold ctermfg=green - hi desMapTree guifg=#00aa00 ctermfg=darkgreen - hi desMapFloor guifg=#008000 ctermfg=darkgray - hi desMapDoor guifg=brown gui=bold ctermfg=white - hi desMapShallow guifg=lightcyan ctermfg=darkcyan - hi desMapWater guifg=lightblue ctermfg=darkblue - hi desMapLava guifg=red gui=bold ctermfg=darkred - - hi desMapEntry guifg=black guibg=white gui=bold ctermfg=white ctermbg=black - hi desMapStairs guifg=orange gui=bold ctermfg=magenta - hi desMapTrap guifg=red gui=bold ctermfg=darkred - - hi desMapGold guifg=#c09000 ctermfg=yellow - hi desMapValuable guifg=darkgreen gui=bold ctermfg=yellow - hi desMapMonst guifg=red ctermfg=red -else - hi desMapWall guifg=darkgray term=bold gui=bold ctermfg=brown - hi desMapPermaWall guifg=#a0a000 gui=bold ctermfg=yellow - hi desMapStoneWall guifg=black gui=bold ctermfg=darkgray - hi desMapGlassWall guifg=lightcyan ctermfg=lightcyan - hi desMapMetalWall guifg=#004090 term=bold gui=bold ctermfg=blue - hi desMapCrystalWall guifg=#009040 term=bold gui=bold ctermfg=green - hi desMapTree guifg=#00aa00 ctermfg=darkgreen - hi desMapFloor guifg=#008000 ctermfg=lightgray - hi desMapDoor guifg=brown gui=bold ctermfg=black ctermbg=brown - hi desMapShallow guifg=lightcyan ctermfg=darkcyan - hi desMapWater guifg=lightblue ctermfg=darkblue - hi desMapLava guifg=red gui=bold ctermfg=red - - hi desMapEntry guifg=black guibg=white gui=bold ctermfg=white ctermbg=black - hi desMapStairs guifg=orange gui=bold ctermfg=white - hi desMapTrap guifg=red gui=bold ctermfg=red - - hi desMapGold guifg=#c09000 ctermfg=yellow - hi desMapValuable guifg=darkgreen gui=bold ctermfg=lightgreen - hi desMapMonst guifg=red ctermfg=darkred -endif - -syn sync minlines=45 - -let b:current_syntax="levdes" diff --git a/vim/syntax/nhdes.vim b/vim/syntax/nhdes.vim deleted file mode 100644 index dcafdf3..0000000 --- a/vim/syntax/nhdes.vim +++ /dev/null @@ -1,99 +0,0 @@ -" Vim syntax file -" Language: NetHack DES file -" Author: Pasi Kallinen -" Version: 20061119 -" Copyright: Copyright (c) 2006 Pasi Kallinen -" Licence: You may redistribute this under the same terms as NetHack itself - -if exists("b:current_syntax") - finish -endif - -syn sync minlines=30 - -" we're case sensitive -syn case match - -" some keywords use '-' -setlocal iskeyword+=- - -syn region nhDesComment start=/^[ \t]*#/ end=/$/ - -syn keyword nhDesCommandNoArgs - \ NOMAP RANDOM_CORRIDORS WALLIFY - -syn keyword nhDesCommandWithArgs - \ ALTAR BRANCH CHANCE CONTAINER CORRIDOR DOOR DRAWBRIDGE ENGRAVING - \ FLAGS FOUNTAIN GEOMETRY GOLD INIT_MAP LADDER LEVEL MAZE MAZEWALK - \ MESSAGE MONSTER NAME NON_DIGGABLE NON_PASSWALL OBJECT POOL PORTAL - \ RANDOM_MONSTERS RANDOM_OBJECTS RANDOM_PLACES REGION ROOM SINK STAIR - \ SUBROOM TELEPORT_REGION TRAP - -syn keyword nhDesRegister - \ align monster object place - -syn keyword nhDesConstant - \ altar arboreal asleep awake blessed bottom broken burn center chaos - \ closed coaligned \contained cursed down dust east engrave false filled - \ half-left half-right hardfloor hostile law left levregion lit locked - \ mark m_feature m_monster m_object neutral noalign nodoor nommap - \ noncoaligned none north noteleport open peaceful random right sanctum - \ shortsighted shrine south top true uncursed unfilled unlit up west - -syn region nhDesString start=/"/ end=/"/ -syn match nhDesChar /'.'/ - -syn match nhDesCoord /(\s*\d\+\s*,\s*\d\+\s*)/ -syn match nhDesRegion /(\s*\d\+\s*,\s*\d\+\s*,\s*\d\+\s*,\s*\d\+\s*)/ - -syn match nhDesMapCharDoor /[+S]/ contained -syn match nhDesMapCharFloor /[\.B]/ contained -syn match nhDesMapCharCorridor /[#H]/ contained -syn match nhDesMapCharWall /[\-\| ]/ contained -syn match nhDesMapCharWater /[WP}{]/ contained -syn match nhDesMapCharThrone /\\/ contained -syn match nhDesMapCharAir /A/ contained -syn match nhDesMapCharCloud /C/ contained -syn match nhDesMapCharLava /L/ contained -syn match nhDesMapCharSink /K/ contained -syn match nhDesMapCharIce /I/ contained -syn match nhDesMapCharTree /T/ contained -syn match nhDesMapCharIronbars /F/ contained -syn match nhDesMapCharLinenum /[0123456789]/ contained -" TODO: Any better way to do this? -syn match nhDesMapCharError /[^+S\.B#H\-\| WP}{\\ACLKITF0-9]/ contained - -syn region nhDesMap matchgroup=nhDesCommandNoArgs start=/^MAP$/ end=/^ENDMAP$/ - \ contains=nhDesMapCharError,nhDesMapCharDoor,nhDesMapCharFloor, - \ nhDesMapCharCorridor,nhDesMapCharWall,nhDesMapCharWater, - \ nhDesMapCharThrone,nhDesMapCharAir,nhDesMapCharCloud,nhDesMapCharLava, - \ nhDesMapCharSink,nhDesMapCharIce,nhDesMapCharTree,nhDesMapCharIronbars, - \ nhDesMapCharLinenum - -hi def link nhDesComment Comment -hi def link nhDesCommandNoArgs KeyWord -hi def link nhDesCommandWithArgs KeyWord -hi def link nhDesRegister Constant -hi def link nhDesConstant Constant -hi def link nhDesString String -hi def link nhDesChar String -hi def link nhDesCoord Number -hi def link nhDesRegion Number - -highlight nhDesMapCharDoor ctermbg=black ctermfg=brown guibg=black guifg=brown -highlight nhDesMapCharFloor ctermbg=black ctermfg=grey guibg=black guifg=grey -highlight nhDesMapCharCorridor ctermbg=black ctermfg=grey guibg=black guifg=grey -highlight nhDesMapCharWall ctermbg=black ctermfg=grey guibg=black guifg=grey -highlight nhDesMapCharWater ctermbg=black ctermfg=darkblue guibg=black guifg=darkblue -highlight nhDesMapCharThrone ctermbg=black ctermfg=yellow guibg=black guifg=yellow -highlight nhDesMapCharAir ctermbg=black ctermfg=lightblue guibg=black guifg=lightblue -highlight nhDesMapCharCloud ctermbg=black ctermfg=grey guibg=black guifg=grey -highlight nhDesMapCharLava ctermbg=black ctermfg=red guibg=black guifg=red -highlight nhDesMapCharSink ctermbg=black ctermfg=grey guibg=black guifg=grey -highlight nhDesMapCharIce ctermbg=black ctermfg=lightblue guibg=black guifg=lightblue -highlight nhDesMapCharTree ctermbg=black ctermfg=green guibg=black guifg=green -highlight nhDesMapCharIronbars ctermbg=black ctermfg=cyan guibg=black guifg=cyan -highlight nhDesMapCharLinenum ctermbg=black ctermfg=darkgrey guibg=black guifg=darkgrey -highlight nhDesMapCharError ctermbg=red ctermfg=yellow guibg=red guifg=yellow - -let b:current_syntax = "nhdes" diff --git a/vim/syntax/perl.vim b/vim/syntax/perl.vim deleted file mode 100644 index c70fa27..0000000 --- a/vim/syntax/perl.vim +++ /dev/null @@ -1 +0,0 @@ -let perl_sub_signatures = 1 -- cgit v1.2.3-54-g00ecf