diff options
Diffstat (limited to 'vim')
55 files changed, 0 insertions, 1417 deletions
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('<sfile>: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 <sid>hi("Comment", "brightblack", "") -call <sid>hi("Constant", "red", "") -call <sid>hi("Delimiter", "blue", "") -call <sid>hi("Error", "black", "brightmagenta") -call <sid>hi("Function", "brightcyan", "") -call <sid>hi("Identifier", "", "") -call <sid>hi("Include", "blue", "") -call <sid>hi("Operator", "", "") -call <sid>hi("PreProc", "magenta", "") -call <sid>hi("Special", "magenta", "") -call <sid>hi("SpecialKey", "magenta", "") -call <sid>hi("Statement", "yellow", "") -call <sid>hi("Title", "magenta", "") -call <sid>hi("Todo", "black", "brightyellow") -call <sid>hi("Type", "green", "") - -autocmd FileType go call <sid>hi("goBuiltins", "yellow", "") -autocmd FileType go call <sid>hi("goFunctionCall", "brightcyan", "") -autocmd FileType markdown call <sid>hi("mkdListItem", "yellow", "") -autocmd FileType perl call <sid>hi("Identifier", "brightcyan", "") -autocmd FileType puppet call <sid>hi("puppetStringDelimiter", "red", "") -autocmd FileType ruby call <sid>hi("rubyInterpolationDelimiter", "magenta", "") -autocmd FileType ruby call <sid>hi("rubyPercentStringDelimiter", "yellow", "") -autocmd FileType ruby call <sid>hi("rubyStringDelimiter", "red", "") -autocmd FileType ruby call <sid>hi("rubyRegexDelimiter", "red", "") -autocmd FileType sh call <sid>hi("shQuote", "red", "") -autocmd FileType vim call <sid>hi("vimBracket", "magenta", "") -autocmd FileType vim call <sid>hi("vimMapMod", "magenta", "") - -" ui -call <sid>hi("DiffAdd", "", s:g["darkgreen"]) -call <sid>hi("DiffChange", "", s:g["darkblue"]) -call <sid>hi("DiffDelete", "", s:g["darkred"]) -call <sid>hi("DiffText", "", s:g["darkmagenta"]) -call <sid>hi("Folded", "brightgreen", s:g["darkgreen"]) -call <sid>hi("MatchParen", "brightcyan", s:g["darkcyan"]) -call <sid>hi("MoreMsg", "green", s:g["darkgreen"]) -call <sid>hi("NonText", "brightblue", s:g["darkerwhite"]) -call <sid>hi("Search", "", s:g["darkmagenta"]) -call <sid>hi("SpellBad", "", s:g["darkred"]) -call <sid>hi("SpellCap", "", s:g["darkblue"]) -call <sid>hi("SpellRare", "", s:g["darkgreen"]) -call <sid>hi("SpellLocal", "", s:g["darkmagenta"]) -call <sid>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 <buffer> - \ 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 eb9c22a..0000000 --- a/vim/ftplugin/go.vim +++ /dev/null @@ -1,3 +0,0 @@ -setlocal ts=4 -let b:ale_fixers = {"go": ["gofmt"]} -let b:ale_fix_on_save = 1 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 <buffer> K K -vnoremap <buffer> K K diff --git a/vim/ftplugin/javascript.vim b/vim/ftplugin/javascript.vim deleted file mode 100644 index 414b519..0000000 --- a/vim/ftplugin/javascript.vim +++ /dev/null @@ -1,3 +0,0 @@ -let b:ale_fixers = {"javascript": ["eslint"]} -let b:ale_fix_on_save = 1 -let b:ale_javascript_eslint_executable = "node_modules/.bin/eslint" diff --git a/vim/ftplugin/perl.vim b/vim/ftplugin/perl.vim deleted file mode 100644 index a7705a7..0000000 --- a/vim/ftplugin/perl.vim +++ /dev/null @@ -1,25 +0,0 @@ -let b:ale_linters = { 'perl': ['perlcritic'] } -" rainbow parens break syntax-based indent -autocmd vimrc BufEnter <buffer> 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 <buffer> <silent>K :call Help(0, [':'], '<SID>perldoc')<CR> -vnoremap <buffer> <silent>K :call Help(1, [':'], '<SID>perldoc')<CR> - -function! s:set_excludes() - if filereadable("dist.ini") - for line in readfile("dist.ini", '', 10) - let name = matchstr(line, '\s*name\s*=\s*\zs.*') - if name != "" - exe 'setlocal wildignore+=' . name . '-*/*' - break - endif - endfor - endif -endfunction -autocmd BufReadPost * call <SID>set_excludes() -call <SID>set_excludes() 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 b317797..0000000 --- a/vim/ftplugin/python.vim +++ /dev/null @@ -1,13 +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 <buffer> <silent>K :call Help(0, ['.'], '<SID>pydoc')<CR> -vnoremap <buffer> <silent>K :call Help(1, ['.'], '<SID>pydoc')<CR> 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 <buffer> <silent>K :call Help(0, [':', '.'], '<SID>ri')<CR> -vnoremap <buffer> <silent>K :call Help(1, [':', '.'], '<SID>ri')<CR> diff --git a/vim/ftplugin/rust.vim b/vim/ftplugin/rust.vim deleted file mode 100644 index 2e527e8..0000000 --- a/vim/ftplugin/rust.vim +++ /dev/null @@ -1,12 +0,0 @@ -let b:ale_linters = { 'rust': ['rls'] } -let b:ale_rust_rls_toolchain = 'stable' -let b:ale_rust_rls_config = { 'rust': { 'clippy_preference': 'on' } } -let b:ale_fixers = { 'rust': ['rustfmt'] } -let b:ale_fix_on_save = 1 - -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 fd3281e..0000000 --- a/vim/ftplugin/sh.vim +++ /dev/null @@ -1 +0,0 @@ -let b:is_bash = 1 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 3a62790..0000000 --- a/vim/ftplugin/tex.vim +++ /dev/null @@ -1,96 +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('<afile>: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 - autocmd CursorMoved <buffer> 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\ <return>%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 <buffer> K K -vnoremap <buffer> K K 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 <buffer> <silent>K :call Help(0, [], '<SID>perldoc_or_man')<CR> -vnoremap <buffer> <silent>K :call Help(1, [], '<SID>perldoc_or_man')<CR> diff --git a/vim/pack/filetype/start/ledger b/vim/pack/filetype/start/ledger deleted file mode 160000 -Subproject 3d76cee270b1a9583d535737ac2e63166335d45 diff --git a/vim/pack/filetype/start/polyglot b/vim/pack/filetype/start/polyglot deleted file mode 160000 -Subproject 3ddca5da461ebfaa82104f82e3cbf19d1c326ad diff --git a/vim/pack/plugins/start/airline b/vim/pack/plugins/start/airline deleted file mode 160000 -Subproject c213f2ac44292a6c5548872e63acb0648cc07a9 diff --git a/vim/pack/plugins/start/ale b/vim/pack/plugins/start/ale deleted file mode 160000 -Subproject dd1e1025b8a9b13cb7966bf2baa3e6b42a86285 diff --git a/vim/pack/plugins/start/autobrace b/vim/pack/plugins/start/autobrace deleted file mode 160000 -Subproject e51de9e6265ade6195c8983edf58c462695acfe diff --git a/vim/pack/plugins/start/commentary b/vim/pack/plugins/start/commentary deleted file mode 160000 -Subproject 141d9d32a9fb58fe474fcc89cd7221eb2dd57b3 diff --git a/vim/pack/plugins/start/diff-changes b/vim/pack/plugins/start/diff-changes deleted file mode 160000 -Subproject 97cf3bc8b51f27452b4174e4f770758d42162d0 diff --git a/vim/pack/plugins/start/editorconfig b/vim/pack/plugins/start/editorconfig deleted file mode 160000 -Subproject c718cefc51ccdaf7bd27c4c1ae2de5510343424 diff --git a/vim/pack/plugins/start/fzf b/vim/pack/plugins/start/fzf deleted file mode 160000 -Subproject 65773882505b06970c47285b4ace6208ac5e614 diff --git a/vim/pack/plugins/start/fzf.vim b/vim/pack/plugins/start/fzf.vim deleted file mode 160000 -Subproject 359a80e3a34aacbd5257713b6a88aa085337166 diff --git a/vim/pack/plugins/start/gundo b/vim/pack/plugins/start/gundo deleted file mode 160000 -Subproject 46c443ee9d5854320eb965a1fdee781ba83a070 diff --git a/vim/pack/plugins/start/history-sync b/vim/pack/plugins/start/history-sync deleted file mode 160000 -Subproject 279aa756157ab818df67e854e953f6e05809b4a diff --git a/vim/pack/plugins/start/neosnippet b/vim/pack/plugins/start/neosnippet deleted file mode 160000 -Subproject ed80ae8cee732d52eb841d509a95aca9c27ece7 diff --git a/vim/pack/plugins/start/startify b/vim/pack/plugins/start/startify deleted file mode 160000 -Subproject 9abd2c76845de00eab207576b69332cf0e16d35 diff --git a/vim/pack/plugins/start/textobj b/vim/pack/plugins/start/textobj deleted file mode 160000 -Subproject fd84055046d38c7e850fdbf13f92ab2898f8114 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 <SID>ask_quit("Directory '" . l:required_dir . "' doesn't exist.", "&Create it?") - return - endif - - try - call mkdir(l:required_dir, 'p') - catch - call <SID>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 <SID>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('<cword>') - 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 <silent>K :call Help(0, [], '<SID>man')<CR> -xnoremap <silent>K :call Help(1, [], '<SID>man')<CR> diff --git a/vim/plugin/nopaste.vim b/vim/plugin/nopaste.vim deleted file mode 100644 index cb904f7..0000000 --- a/vim/plugin/nopaste.vim +++ /dev/null @@ -1,19 +0,0 @@ -function! s:nopaste(visual) - if a:visual - silent normal! gv:!nopaste<CR> - else - let l:pos = getpos('.') - silent normal! :%!nopaste<CR> - endif - silent normal! "+yy - let @* = @+ - silent undo - " can't restore visual selection because that will overwrite "* - if !a:visual - call setpos('.', l:pos) - endif - echo @+ -endfunction - -nnoremap <silent><Leader>p :call <SID>nopaste(0)<CR> -xnoremap <silent><Leader>p :<C-U>call <SID>nopaste(1)<CR> diff --git a/vim/plugin/opinionated-defaults.vim b/vim/plugin/opinionated-defaults.vim deleted file mode 100644 index 87eaf57..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 <Esc> 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 -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 <up> gk -noremap <down> gj -inoremap <up> <C-o>gk -inoremap <down> <C-o>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 <sartak at gmail.com> -" also by Michael R Geddes aka frogonwheels <vimmer at frog.wheelycreek.net> -" 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, "(\\*\\@!", "\\*\\@<!)", "a") - else - call s:DoSyn(i, a:count, "(", ")", "a") - endif - endif - - if exists("g:rainbow_brace") && g:rainbow_brace != 0 - call s:DoSyn(i, a:count, "{", "}", "b") - endif - - if exists("g:rainbow_bracket") && g:rainbow_bracket != 0 - call s:DoSyn(i, a:count, "\\[", "\\]", "c") - endif - - if exists("g:rainbow_angle") && g:rainbow_angle != 0 - 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/snippets/_.snippets b/vim/snippets/_.snippets deleted file mode 100644 index 982a614..0000000 --- a/vim/snippets/_.snippets +++ /dev/null @@ -1,4 +0,0 @@ -snippet now - `strftime("%Y-%m-%d %H:%M")` -snippet nows - "`strftime("%Y-%m-%d %H:%M")`" diff --git a/vim/snippets/c.snippets b/vim/snippets/c.snippets deleted file mode 100644 index eece346..0000000 --- a/vim/snippets/c.snippets +++ /dev/null @@ -1,12 +0,0 @@ -snippet guard - #ifndef ${1:`'_' . toupper(substitute(matchstr(expand("%"), '^.*/\zs.*\.h'), '[.-]', '_', 'g'))`} - #define $1 - - ${0} - - #endif -snippet main - int main(int argc, char *argv[]) - { - ${0} - } diff --git a/vim/snippets/perl.snippets b/vim/snippets/perl.snippets deleted file mode 100644 index d522f63..0000000 --- a/vim/snippets/perl.snippets +++ /dev/null @@ -1,123 +0,0 @@ -snippet tbl - local $Test::Builder::Level = $Test::Builder::Level + 1; -snippet ccl - local $Carp::CarpLevel = $Carp::CarpLevel + 1; -snippet linc - local $${1:a} = $$1 + ${2:1}; - ${0} -snippet script - #!/usr/bin/env perl - use strict; - use warnings; - - ${0} -snippet test - #!/usr/bin/env perl - use strict; - use warnings; - use Test::More; - - ${0} - - done_testing; -snippet sub - sub ${1:foo} { - ${0} - } -snippet wd - use Data::Dump; ddx(${1}); - ${0} -snippet wdd - use Data::Dump; push @Data::Dump::FILTERS, sub { return {dump => "$_[1]"} if $_[0]->depth > ${1:1} }; ddx(${2}); - ${0} -snippet package - package ${1:`substitute(matchstr(expand("%"), '^lib/\zs.*\ze\.pm'), '/', '::', 'g')`}; - use strict; - use warnings; - - ${0} - - 1; -snippet test_psgi - test_psgi - app => ${1:MyApp}->new->to_app, - client => sub { - my $cb = shift; - - { - ${0} - } - }; -# -# Moose -# -snippet class - package ${1:`substitute(matchstr(expand("%"), '^lib/\zs.*\ze\.pm'), '/', '::', 'g')`}; - use Moose; - - ${0} - - __PACKAGE__->meta->make_immutable; - no Moose; - - 1; -# XXX: ideally, this would be merged with the one above, but we need posthooks -# for that to happen. also, some way to get the extends line to update with -# the package line would be nice, maybe? -snippet subclass - package ${1:`substitute(matchstr(expand("%"), '^lib/\zs.*\ze\.pm'), '/', '::', 'g')`}; - use Moose; - extends '${2:`matchstr(substitute(matchstr(expand("%"), '^lib/\zs.*\ze\.pm'), '/', '::', 'g'), '.*\ze::.*')`}'; - - ${0} - - __PACKAGE__->meta->make_immutable; - no Moose; - - 1; -snippet role - package ${1:`substitute(matchstr(expand("%"), '^lib/\zs.*\ze\.pm'), '/', '::', 'g')`}; - use Moose::Role; - - ${0} - - no Moose::Role; - - 1; -snippet has - has ${1:attr} => ( - is => '${2:ro}', - isa => '${3:Str}',${0} - ); -snippet hasl - has ${1:attr} => ( - is => '${2:ro}', - isa => '${3:Str}', - lazy_build => 1,${4} - ); - - sub _build_$1 { - my $self = shift; - ${0} - } -snippet m - sub ${1:foo} { - my $self = shift; - ${0} - } -snippet around - around ${1:foo} => sub { - my $orig = shift; - my $self = shift; - ${0} - }; -snippet after - after ${1:foo} => sub { - my $self = shift; - ${0} - }; -snippet before - before ${1:foo} => sub { - my $self = shift; - ${0} - }; diff --git a/vim/snippets/python.snippets b/vim/snippets/python.snippets deleted file mode 100644 index fc0dd70..0000000 --- a/vim/snippets/python.snippets +++ /dev/null @@ -1,8 +0,0 @@ -snippet test - import unittest - - ${1} - - class ${2:`join(map(split(matchstr(expand("%"), '^t\(ests\?\)\?/\zs.*\ze\.py'), '_'), 'toupper(v:val[0]) . v:val[1:]'), '')`}(unittest.TestCase): - def test_${3}(self): - ${0} diff --git a/vim/snippets/ruby.snippets b/vim/snippets/ruby.snippets deleted file mode 100644 index 3bf5f28..0000000 --- a/vim/snippets/ruby.snippets +++ /dev/null @@ -1,22 +0,0 @@ -snippet script - #!/usr/bin/env ruby - - def main - ${0} - end - - if \$0 == __FILE__ - main(*ARGV) - end -snippet def - def ${1:foo} - ${0} - end -snippet class - class ${1:Foo} - ${0} - end -snippet module - module ${1:Foo} - ${0} - end diff --git a/vim/snippets/rust.snippets b/vim/snippets/rust.snippets deleted file mode 100644 index f9e885d..0000000 --- a/vim/snippets/rust.snippets +++ /dev/null @@ -1,16 +0,0 @@ -snippet main - fn main () { - ${0} - } -snippet pr - println!(${0}); -snippet struct - #[deriving(PartialEq, Eq, Show)] - struct ${1} { - ${0} - } -snippet test - #[test] - fn ${1} () { - ${0} - } diff --git a/vim/snippets/sh.snippets b/vim/snippets/sh.snippets deleted file mode 100644 index 2a8e4b0..0000000 --- a/vim/snippets/sh.snippets +++ /dev/null @@ -1,6 +0,0 @@ -snippet script - #!/usr/bin/env bash - set -eux - set -o pipefail - - ${0} diff --git a/vim/snippets/tex.snippets b/vim/snippets/tex.snippets deleted file mode 100644 index 3a79579..0000000 --- a/vim/snippets/tex.snippets +++ /dev/null @@ -1,13 +0,0 @@ -snippet article - \documentclass[11pt]{article} - \usepackage{jesse} - - \headers{${1}} - {\huge \textbf{${2}}} - {${3}} - - \begin{document} - - ${0} - - \end{document} diff --git a/vim/snippets/xs.snippets b/vim/snippets/xs.snippets deleted file mode 100644 index eada925..0000000 --- a/vim/snippets/xs.snippets +++ /dev/null @@ -1,16 +0,0 @@ -snippet xs - #include "EXTERN.h" - #include "perl.h" - #include "XSUB.h" - - MODULE = ${1:`matchstr(expand("%"), '^.*\ze\.xs')`} PACKAGE = ${2:$1} - - PROTOTYPES: DISABLE - - - ${0} -snippet xsub - ${3:void} - ${1:name}(${2}) - CODE: - ${0} 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 <scintilla@gmail.com> -" 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=/\</ end=/:/ contained oneline - -syn match desEntry "\<\w*_entry\>" contains=desBranch -syn match desEntry "\<serial_\w*\>" -syn match desEntry "\<no_species_\w\w\>" -syn match desEntry "\<\(no\)\=layout_\w*\>" -syn match desEntry "\<l\=uniq_\w*\>" -syn match desEntry "\<chance_\w*\>" -syn match desEntry "\<fallback_\w*\>" -syn match desEntry "\<vaults_entry_\w*\>" contains=desBranch -syn match desEntry "\<vaults_orient_\w\>" -syn match desEntry "\<altar_\w*\>" contains=desGod -syn match desEntry "\<uniq_altar_\w*\>" contains=desGod -syn match desEntry "\<temple_overflow_\w*\>" contains=desGod -syn match desEntry "\<overflow_altar_\w*\>" contains=desGod -syn match desEntry "\<enter_\w*\>" contains=desBranchname -syn match desEntry "\<exit_\w*\>" contains=desBranchname -syn match desEntry "\<ruin_\w*\>" contains=desBranchname - -" 'transparent' is a Vim syntax keyword -syn match desTransparent "\<transparent\>" -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*\<MAP\>\s*$/ end=/^\s*\<ENDMAP\>\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 <paxed@alt.org> -" 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 |