diff --git a/.xinitrc b/.config/X11/xinitrc similarity index 100% rename from .xinitrc rename to .config/X11/xinitrc diff --git a/.config/alacritty.yml b/.config/alacritty.yml index 8376d4e..33cf665 100644 --- a/.config/alacritty.yml +++ b/.config/alacritty.yml @@ -17,19 +17,19 @@ scrolling: # Font configuration font: normal: - family: JetBrainsMono Nerd Font + family: PragmataPro Mono Liga style: Regular italic: - family: JetBrainsMono Nerd Font + family: PragmataPro Mono Liga style: Italic bold: - family: JetBrainsMono Nerd Font + family: PragmataPro Mono Liga style: Bold # Point size - size: 10 + size: 11 # Offset is the extra space around each character. `offset.y` can be thought of # as modifying the line spacing, and `offset.x` as modifying the letter spacing. @@ -67,7 +67,7 @@ colors: cyan: '#6fc3df' white: '#fcfcfc' -background_opacity: 1 +background_opacity: 0.92 selection: semantic_escape_chars: "" diff --git a/.config/fontconfig/fonts.conf b/.config/fontconfig/fonts.conf index 9476f4e..107f5f9 100644 --- a/.config/fontconfig/fonts.conf +++ b/.config/fontconfig/fonts.conf @@ -22,13 +22,6 @@ Noto Color Emoji - - monospace - - NotoSansMono Nerd Font - Noto Color Emoji - - diff --git a/.config/git/config b/.config/git/config index d1e8785..a23a13c 100644 --- a/.config/git/config +++ b/.config/git/config @@ -1,3 +1,6 @@ +[alias] + st = status + [hub] protocol = ssh @@ -25,11 +28,30 @@ autocrlf = input whitespace = warn excludesfile = /home/deadguy/.config/git/gitignore - pager = delta --plus-color="#012800" --minus-color="#340001" + pager = delta [interactive] diffFilter = delta --color-only +[delta] + features = side-by-side line-numbers decorations + syntax-theme = Dracula + plus-style = syntax "#003800" + minus-style = syntax "#3f0001" + whitespace-error-style = 22 reverse + +[delta "decorations"] + commit-decoration-style = bold yellow box ul + file-style = bold yellow ul + file-decoration-style = none + hunk-header-decoration-style = cyan box ul + +[delta "line-numbers"] + line-numbers-left-style = cyan + line-numbers-right-style = cyan + line-numbers-minus-style = 124 + line-numbers-plus-style = 28 + [web] browser = firefox @@ -45,6 +67,7 @@ [diff] tool = nvr + colorMoved = default [difftool "nvr"] cmd = nvr -s -d $LOCAL $REMOTE diff --git a/.config/ncmpcpp/config b/.config/ncmpcpp/config index 52b3218..c3fda5e 100644 --- a/.config/ncmpcpp/config +++ b/.config/ncmpcpp/config @@ -24,7 +24,7 @@ empty_tag_color = blue state_flags_color = red # SONG -song_list_format = "$5{$4%a}|{$8} {$8%t}|{$2►$2}|{$5►$8 %f} $R {$7%l}" +song_list_format = "$5{$4%a}|{$8} {$8%t}|{$2►$2}|{$5►$8 %f} $R {$7%l}" song_status_format = {$8%b}|{$6 "%a"}$8 song_window_title_format = "{%a - }{%t}|{%f}" song_columns_list_format = "(30)[blue]{a} (40)[red]{t|f} (30)[cyan]{br} (4f)[green]{lr}" diff --git a/.config/nvim/after/ftplugin/css.vim b/.config/nvim/after/ftplugin/css.vim new file mode 100644 index 0000000..cb50a73 --- /dev/null +++ b/.config/nvim/after/ftplugin/css.vim @@ -0,0 +1,2 @@ +let b:ale_linters = ['stylelint'] +let b:ale_fixers = ['stylelint'] diff --git a/.config/nvim/ftplugin/foxdot.vim b/.config/nvim/after/ftplugin/foxdot.vim similarity index 100% rename from .config/nvim/ftplugin/foxdot.vim rename to .config/nvim/after/ftplugin/foxdot.vim diff --git a/.config/nvim/ftplugin/help.vim b/.config/nvim/after/ftplugin/help.vim similarity index 100% rename from .config/nvim/ftplugin/help.vim rename to .config/nvim/after/ftplugin/help.vim diff --git a/.config/nvim/after/ftplugin/html.vim b/.config/nvim/after/ftplugin/html.vim new file mode 100644 index 0000000..77325c5 --- /dev/null +++ b/.config/nvim/after/ftplugin/html.vim @@ -0,0 +1,2 @@ +let b:ale_linters = ['prettier_standard'] +let b:ale_fixers = ['prettier_standard'] diff --git a/.config/nvim/after/ftplugin/javascript.vim b/.config/nvim/after/ftplugin/javascript.vim new file mode 100644 index 0000000..d8c92bf --- /dev/null +++ b/.config/nvim/after/ftplugin/javascript.vim @@ -0,0 +1,2 @@ +let b:ale_linters = ['prettier_standard'] +let g:ale_fixers = ['prettier_standard'] diff --git a/.config/nvim/after/ftplugin/json.vim b/.config/nvim/after/ftplugin/json.vim new file mode 100644 index 0000000..77325c5 --- /dev/null +++ b/.config/nvim/after/ftplugin/json.vim @@ -0,0 +1,2 @@ +let b:ale_linters = ['prettier_standard'] +let b:ale_fixers = ['prettier_standard'] diff --git a/.config/nvim/after/ftplugin/jsx.vim b/.config/nvim/after/ftplugin/jsx.vim new file mode 100644 index 0000000..77325c5 --- /dev/null +++ b/.config/nvim/after/ftplugin/jsx.vim @@ -0,0 +1,2 @@ +let b:ale_linters = ['prettier_standard'] +let b:ale_fixers = ['prettier_standard'] diff --git a/.config/nvim/ftplugin/mail.vim b/.config/nvim/after/ftplugin/mail.vim similarity index 100% rename from .config/nvim/ftplugin/mail.vim rename to .config/nvim/after/ftplugin/mail.vim diff --git a/.config/nvim/after/ftplugin/make.vim b/.config/nvim/after/ftplugin/make.vim new file mode 100644 index 0000000..bbd8967 --- /dev/null +++ b/.config/nvim/after/ftplugin/make.vim @@ -0,0 +1 @@ +setlocal noexpandtab diff --git a/.config/nvim/ftplugin/man.vim b/.config/nvim/after/ftplugin/man.vim similarity index 100% rename from .config/nvim/ftplugin/man.vim rename to .config/nvim/after/ftplugin/man.vim diff --git a/.config/nvim/after/ftplugin/markdown.vim b/.config/nvim/after/ftplugin/markdown.vim new file mode 100644 index 0000000..a2f9733 --- /dev/null +++ b/.config/nvim/after/ftplugin/markdown.vim @@ -0,0 +1,21 @@ +setlocal nonumber norelativenumber laststatus=0 showmode +setlocal signcolumn=no textwidth=80 wrap sw=2 +setlocal tabstop=2 expandtab softtabstop=2 linebreak +setlocal autoindent noruler colorcolumn=80 +setlocal spell spelllang=es,en_us,cjk +set complete+=kspell + +" Spellcheck +nnoremap [s +nnoremap ]s +nnoremap z= +nnoremap z=1 +nnoremap zg + +" Todo list +nnoremap i-[] +nnoremap :.s/\[\]/\[x\] +inoremap -[] +inoremap :.s/\[\]/\[x\] + +let b:ale_fixers = ['prettier_standard'] diff --git a/.config/nvim/after/ftplugin/scss.vim b/.config/nvim/after/ftplugin/scss.vim new file mode 100644 index 0000000..cb50a73 --- /dev/null +++ b/.config/nvim/after/ftplugin/scss.vim @@ -0,0 +1,2 @@ +let b:ale_linters = ['stylelint'] +let b:ale_fixers = ['stylelint'] diff --git a/.config/nvim/ftplugin/sh.vim b/.config/nvim/after/ftplugin/sh.vim similarity index 88% rename from .config/nvim/ftplugin/sh.vim rename to .config/nvim/after/ftplugin/sh.vim index d2a883f..1063e35 100644 --- a/.config/nvim/ftplugin/sh.vim +++ b/.config/nvim/after/ftplugin/sh.vim @@ -7,3 +7,4 @@ endif let b:sh_indent_options['continuation-line'] = 4 let b:ale_linters = ['shellcheck'] +let b:ale_fixers = ['shfmt'] diff --git a/.config/nvim/after/ftplugin/typescript.vim b/.config/nvim/after/ftplugin/typescript.vim new file mode 100644 index 0000000..9ac19ee --- /dev/null +++ b/.config/nvim/after/ftplugin/typescript.vim @@ -0,0 +1,3 @@ +let b:ale_linters = ['tsserver', 'eslint'] +let b:ale_fixers = ['prettier_standard'] + diff --git a/.config/nvim/after/ftplugin/vim.vim b/.config/nvim/after/ftplugin/vim.vim new file mode 100644 index 0000000..cad5b94 --- /dev/null +++ b/.config/nvim/after/ftplugin/vim.vim @@ -0,0 +1 @@ +let b:ale_linters = ['vint'] diff --git a/.config/nvim/after/plugin/color.vim b/.config/nvim/after/plugin/color.vim new file mode 100644 index 0000000..96696be --- /dev/null +++ b/.config/nvim/after/plugin/color.vim @@ -0,0 +1,19 @@ +highlight! VertSplit ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=#080808 gui=NONE +highlight! TabLineFill ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=#ef2f27 gui=NONE +highlight! TablineSel ctermbg=NONE ctermfg=234 guibg=NONE guifg=#008bbd +highlight! CocWarningHighlight ctermfg=4 cterm=undercurl guifg=#c4ab39 gui=undercurl +highlight! CocErrorHighlight ctermfg=red cterm=undercurl guifg=#c4384b gui=undercurl +highlight! CocUnderline cterm=undercurl gui=undercurl +highlight! PmenuSel guibg=#111111 guifg=#6699cc +highlight! Folded ctermbg=NONE guibg=NONE +highlight! RedrawDebugClear guibg=#080808 +highlight! NvimInternalError guifg=#080808 +highlight! DiffAdded guifg=#333333 +highlight! PmenuThumb guifg=#333333 +highlight! link CocErrorSign WarningMsg +highlight! link CocWarningSign Number +highlight! link CocInfoSign Type + +if &diff + highlight! link DiffText MatchParen +endif diff --git a/.config/nvim/after/plugin/vim-jsx.vim b/.config/nvim/after/plugin/vim-jsx.vim new file mode 100644 index 0000000..8a4fa1f --- /dev/null +++ b/.config/nvim/after/plugin/vim-jsx.vim @@ -0,0 +1,11 @@ +" Stop the vim-jsx plug-in from aggressively blowing away our ftdetection. +" +" Without something like this, our ftdetect/{jest,jsx}.vim config will +" set the filetype in test files to "javascript.jest" or +" "javascript.jest.jsx", but then vim-jsx will come along and unconditionally +" set it to "javascript.jsx", which isn't helpful. Currently I'm not working in +" any projects that use a ".jsx" extension so this workaround is viable +" (unfortunately, there's no other mechanism for disabling this functionality in +" vim-jsx). +let g:jsx_ext_required=1 +let g:vim_jsx_pretty_colorful_config = 1 diff --git a/.config/nvim/autoload/dead/functions.vim b/.config/nvim/autoload/dead/functions.vim new file mode 100644 index 0000000..09f407f --- /dev/null +++ b/.config/nvim/autoload/dead/functions.vim @@ -0,0 +1,18 @@ +function! dead#functions#MyHighlights() abort + highlight Trail ctermbg=red guibg=red + call matchadd('Trail', '\s\+$', 100) + highlight ColorColumn ctermbg=magenta + call matchadd('ColorColumn', '\%81v', 100) +endfunction + +function! dead#functions#PopOutOfInsertMode() abort + if v:insertmode + call feedkeys("\\") + endif +endfunction + +function! dead#functions#Relativize(v) abort + if &number + let &relativenumber = a:v + endif +endfunction diff --git a/.config/nvim/autoload/dead/statusline.vim b/.config/nvim/autoload/dead/statusline.vim new file mode 100644 index 0000000..06d233a --- /dev/null +++ b/.config/nvim/autoload/dead/statusline.vim @@ -0,0 +1,79 @@ +function! dead#statusline#ModeColor() abort + return get(g:modes, mode(), '%*')[0] +endfunction + +function! dead#statusline#CurrentMode() abort + return ' ' . get(g:modes, mode(), '-')[1] . ' ' +endfunction + +function! dead#statusline#StatusLine() abort + let l:statusline='' + let l:statusline.=dead#statusline#ModeColor() + let l:statusline.=dead#statusline#CurrentMode() + let l:statusline.=dead#statusline#LinePasteMode() + let l:statusline.='%<' + let l:statusline.='%1* ' + let l:statusline.='%= ' + let l:statusline.=coc#status() + let l:statusline.=dead#statusline#LinterStatus() + let l:statusline.='%3* %p%% %c ' + let l:statusline.='' + return l:statusline +endfunction + +function! dead#statusline#StatusLineNC() abort + let l:statusline='' + let l:statusline.='%t' + let l:statusline.='%<' + let l:statusline.='%= ' + return l:statusline +endfunction + +function! dead#statusline#HelpStatusLine() abort + let l:statusline='' + let l:statusline.= '%#error#[HELP] %t ' + let l:statusline.='%1* ' + let l:statusline.='%<' + let l:statusline.='%= ' + let l:statusline.=' %p%% ' + return l:statusline +endfunction + +function! dead#statusline#UpdateInactiveWindows() + for winnum in range(1, winnr('$')) + if winnum != winnr() + call setwinvar(winnum, '&statusline', '%!dead#statusline#StatusLineNC()') + endif + endfor +endfunction + +function! dead#statusline#RefreshStatusLine(mode) + if (a:mode == "active" && &filetype !=? 'help') + setlocal statusline=%!dead#statusline#StatusLine() + else + setlocal statusline=%!dead#statusline#StatusLineNC() + endif + if &filetype ==? 'help' + setlocal statusline=%!dead#statusline#HelpStatusLine() + endif +endfunction + +function! dead#statusline#LinterStatus() abort + let l:counts = ale#statusline#Count(bufnr('')) + let l:all_errors = l:counts.error + l:counts.style_error + let l:all_non_errors = l:counts.total - l:all_errors + return l:counts.total == 0 ? '' : printf( + \ '  :%d  :%d ', + \ l:all_non_errors, + \ l:all_errors + \) +endfunction + +function! dead#statusline#LinePasteMode() abort + let paste_status = &paste + if paste_status == 1 + return ' paste ' + else + return '' + endif +endfunction diff --git a/.config/nvim/autoload/dead/tabline.vim b/.config/nvim/autoload/dead/tabline.vim new file mode 100644 index 0000000..fa29862 --- /dev/null +++ b/.config/nvim/autoload/dead/tabline.vim @@ -0,0 +1,28 @@ +scriptencoding utf-8 + +function! dead#tabline#Tabline() abort + let s = '' + for i in range(tabpagenr('$')) + let tab = i + 1 + let winnr = tabpagewinnr(tab) + let buflist = tabpagebuflist(tab) + let bufnr = buflist[winnr - 1] + let bufname = bufname(bufnr) + let bufmodified = getbufvar(bufnr, '&mod') + + let s .= '%' . tab . 'T' + let s .= (tab == tabpagenr() ? '%#TabLineSel#' : '%#TabLine#') + let s .= ' ' . tab .':' + let s .= (bufname !=? '' ? fnamemodify(bufname, ':t') . ' ' : '[Untitled] ') + + if bufmodified + let s .= ' + ' + endif + endfor + + let s .= '%#TabLineFill#' + if (exists('g:tablineclosebutton')) + let s .= '%=%999XX' + endif + return s +endfunction diff --git a/.config/nvim/ftdetect/arduino.vim b/.config/nvim/ftdetect/arduino.vim deleted file mode 100644 index 75d2148..0000000 --- a/.config/nvim/ftdetect/arduino.vim +++ /dev/null @@ -1 +0,0 @@ -au BufRead,BufNewFile *.ino setlocal ft=arduino diff --git a/.config/nvim/ftdetect/foxdot.vim b/.config/nvim/ftdetect/foxdot.vim deleted file mode 100644 index aa031a9..0000000 --- a/.config/nvim/ftdetect/foxdot.vim +++ /dev/null @@ -1 +0,0 @@ -autocmd BufRead,BufNewFile *.foxdot setfiletype foxdot diff --git a/.config/nvim/ftdetect/gdscript.vim b/.config/nvim/ftdetect/gdscript.vim deleted file mode 100644 index d50f678..0000000 --- a/.config/nvim/ftdetect/gdscript.vim +++ /dev/null @@ -1 +0,0 @@ -au BufNewFile,BufRead *.gd set filetype=gdscript diff --git a/.config/nvim/ftdetect/ignore.vim b/.config/nvim/ftdetect/ignore.vim new file mode 100644 index 0000000..47c1ecf --- /dev/null +++ b/.config/nvim/ftdetect/ignore.vim @@ -0,0 +1 @@ +autocmd BufNewFile,BufRead .eslintignore,.gitignore,.prettierignore set filetype=ignore diff --git a/.config/nvim/ftdetect/jest.vim b/.config/nvim/ftdetect/jest.vim new file mode 100644 index 0000000..7cf02ed --- /dev/null +++ b/.config/nvim/ftdetect/jest.vim @@ -0,0 +1,18 @@ +autocmd FileType * call s:Test() + +function! s:Test() + if match(&filetype, '\v') == -1 + return + endif + + if match(&filetype, '\v') != -1 + return + endif + + let l:file=expand('') + + if match(l:file, '\v(_spec|Spec|-test|\.test)\.(js|jsx|ts|tsx)$') != -1 || + \ match(l:file, '\v/__tests__|tests?/.+\.(js|jsx|ts|tsx)$') != -1 + noautocmd set filetype+=.jest + endif +endfunction diff --git a/.config/nvim/ftdetect/jsx.vim b/.config/nvim/ftdetect/jsx.vim new file mode 100644 index 0000000..e948ae5 --- /dev/null +++ b/.config/nvim/ftdetect/jsx.vim @@ -0,0 +1,31 @@ +function! s:ScanFile() + let n = 1 + let nmax = line('$') + if line('$') > 500 + let nmax = 500 + endif + while n < nmax + if getline(n) =~# "\\v" + return 1 + break + endif + let n = n + 1 + endwhile + return 0 +endfunction + +function! s:DetectJSX() + if match(&filetype, '\v') != -1 + return + endif + if s:ScanFile() + call s:SetJSX() + endif +endfunction + +function! s:SetJSX() + noautocmd set filetype+=.jsx +endfunction + +autocmd BufNewFile,BufRead *.js.jsx,*.jsx call s:SetJSX() +autocmd BufNewFile,BufRead *.html,*.js call s:DetectJSX() diff --git a/.config/nvim/ftdetect/logfile.vim b/.config/nvim/ftdetect/logfile.vim deleted file mode 100644 index 3c7220c..0000000 --- a/.config/nvim/ftdetect/logfile.vim +++ /dev/null @@ -1,14 +0,0 @@ -" Auto-detect a NeoMutt log file - -autocmd BufRead * call neomutt_log() - -function! s:neomutt_log() - let match = '\v^\[\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\] NeoMutt' - - let line = getline (1) - if (line !~ match) - return - endif - - set filetype=neomuttlog -endfunction diff --git a/.config/nvim/ftdetect/mail.vim b/.config/nvim/ftdetect/mail.vim deleted file mode 100644 index 6cbf23f..0000000 --- a/.config/nvim/ftdetect/mail.vim +++ /dev/null @@ -1 +0,0 @@ -au BufNewFile,BufRead neomutt-*-\w\+,neomutt[[:alnum:]_-]\\\{6\} set filetype=mail diff --git a/.config/nvim/ftdetect/mutt.vim b/.config/nvim/ftdetect/mutt.vim deleted file mode 100644 index f386a1d..0000000 --- a/.config/nvim/ftdetect/mutt.vim +++ /dev/null @@ -1,2 +0,0 @@ -" Set filetype to muttrc for files with .mutt extension. -autocmd BufNewFile,BufRead *.mutt setfiletype muttrc diff --git a/.config/nvim/ftdetect/neomuttrc.vim b/.config/nvim/ftdetect/neomuttrc.vim deleted file mode 100644 index 6dec2f3..0000000 --- a/.config/nvim/ftdetect/neomuttrc.vim +++ /dev/null @@ -1 +0,0 @@ -au BufNewFile,BufRead [Nn]eomuttrc,.neomuttrc,.neomutt/*muttrc,.config/neomutt/*muttrc set filetype=neomuttrc diff --git a/.config/nvim/ftdetect/supercollider.vim b/.config/nvim/ftdetect/supercollider.vim deleted file mode 100644 index bd3c62e..0000000 --- a/.config/nvim/ftdetect/supercollider.vim +++ /dev/null @@ -1 +0,0 @@ -au BufRead,BufNewFile *.scd,*.sc setlocal ft=supercollider diff --git a/.config/nvim/ftdetect/sxhkdrc.vim b/.config/nvim/ftdetect/sxhkdrc.vim deleted file mode 100644 index 4f49476..0000000 --- a/.config/nvim/ftdetect/sxhkdrc.vim +++ /dev/null @@ -1,5 +0,0 @@ -if &compatible || v:version < 603 - finish -endif - -autocmd BufNewFile,BufRead sxhkdrc,*.sxhkdrc set ft=sxhkdrc diff --git a/.config/nvim/ftdetect/tsx.vim b/.config/nvim/ftdetect/tsx.vim new file mode 100644 index 0000000..d86193a --- /dev/null +++ b/.config/nvim/ftdetect/tsx.vim @@ -0,0 +1,5 @@ +function! s:SetTSX() + noautocmd set filetype+=.tsx +endfunction + +autocmd BufNewFile,BufRead *.tsx call s:SetTSX() diff --git a/.config/nvim/ftplugin/arduino.vim b/.config/nvim/ftplugin/arduino.vim deleted file mode 100644 index 0ba046e..0000000 --- a/.config/nvim/ftplugin/arduino.vim +++ /dev/null @@ -1,26 +0,0 @@ -if exists('b:did_ftplugin') - finish -endif -let b:did_ftplugin = 1 -if !exists('g:arduino_did_initialize') - call arduino#LoadCache() - call arduino#InitializeConfig() - let g:arduino_did_initialize = 1 -endif - -" Use C rules for indentation -setl cindent - -call arduino#RebuildMakePrg() - -if g:arduino_auto_baud - au BufReadPost,BufWritePost *.ino call arduino#SetAutoBaud() -endif - -command! -buffer -bar -nargs=? ArduinoChooseBoard call arduino#ChooseBoard() -command! -buffer -bar -nargs=? ArduinoChooseProgrammer call arduino#ChooseProgrammer() -command! -buffer -bar ArduinoVerify call arduino#Verify() -command! -buffer -bar ArduinoUpload call arduino#Upload() -command! -buffer -bar ArduinoSerial call arduino#Serial() -command! -buffer -bar ArduinoUploadAndSerial call arduino#UploadAndSerial() -command! -buffer -bar -nargs=? ArduinoChoosePort call arduino#ChoosePort() diff --git a/.config/nvim/ftplugin/csh.vim b/.config/nvim/ftplugin/csh.vim deleted file mode 100644 index 433e4cb..0000000 --- a/.config/nvim/ftplugin/csh.vim +++ /dev/null @@ -1,11 +0,0 @@ -setl ts=4 -setl sts=4 -setl sw=4 -setl noet -setl tw=90 - -if !exists("b:sh_indent_options") - let b:sh_indent_options = {} -endif - -let b:sh_indent_options['continuation-line'] = 4 \ No newline at end of file diff --git a/.config/nvim/ftplugin/docx.vim b/.config/nvim/ftplugin/docx.vim deleted file mode 100644 index 3831359..0000000 --- a/.config/nvim/ftplugin/docx.vim +++ /dev/null @@ -1,2 +0,0 @@ -autocmd BufReadPre *.docx set ro -autocmd BufReadPost *.docx %!docx2txt.pl \ No newline at end of file diff --git a/.config/nvim/ftplugin/gitconfig.vim b/.config/nvim/ftplugin/gitconfig.vim new file mode 100644 index 0000000..bbd8967 --- /dev/null +++ b/.config/nvim/ftplugin/gitconfig.vim @@ -0,0 +1 @@ +setlocal noexpandtab diff --git a/.config/nvim/ftplugin/go.vim b/.config/nvim/ftplugin/go.vim new file mode 100644 index 0000000..f9aafd3 --- /dev/null +++ b/.config/nvim/ftplugin/go.vim @@ -0,0 +1,3 @@ +setlocal noexpandtab +setlocal shiftwidth=4 +setlocal tabstop=4 diff --git a/.config/nvim/ftplugin/javascriptreact.vim b/.config/nvim/ftplugin/javascriptreact.vim new file mode 100644 index 0000000..47e5dda --- /dev/null +++ b/.config/nvim/ftplugin/javascriptreact.vim @@ -0,0 +1,3 @@ +" Work around filetype that landed in upstream Vim here: +" https://github.com/vim/vim/issues/4830 +execute 'noautocmd set filetype=' . substitute(&filetype, 'javascriptreact', 'javascript', '') diff --git a/.config/nvim/ftplugin/json.vim b/.config/nvim/ftplugin/json.vim new file mode 100644 index 0000000..080e567 --- /dev/null +++ b/.config/nvim/ftplugin/json.vim @@ -0,0 +1 @@ +let g:vim_json_syntax_conceal=0 diff --git a/.config/nvim/ftplugin/markdown.vim b/.config/nvim/ftplugin/markdown.vim index 04ba07c..4271828 100644 --- a/.config/nvim/ftplugin/markdown.vim +++ b/.config/nvim/ftplugin/markdown.vim @@ -1,19 +1 @@ -setlocal nonumber norelativenumber laststatus=0 showmode -setlocal signcolumn=no textwidth=80 wrap sw=2 -setlocal tabstop=2 expandtab softtabstop=2 linebreak -setlocal autoindent noruler colorcolumn=80 -setlocal spell spelllang=es,en_us,cjk -set complete+=kspell - -" Spellcheck -nnoremap [s -nnoremap ]s -nnoremap z= -nnoremap z=1 -nnoremap zg - -" Todo list -nnoremap i-[] -nnoremap :.s/\[\]/\[x\] -inoremap -[] -inoremap :.s/\[\]/\[x\] +setlocal synmaxcol=0 diff --git a/.config/nvim/ftplugin/neomuttrc.vim b/.config/nvim/ftplugin/neomuttrc.vim deleted file mode 100644 index 86f1cde..0000000 --- a/.config/nvim/ftplugin/neomuttrc.vim +++ /dev/null @@ -1,23 +0,0 @@ -" Vim filetype plugin file -" Language: NeoMutt RC File -" Previous Maintainer: Guillaume Brogi -" Latest Revision: 2017-09-17 -" Original version copied from ftplugin/muttrc.vim - -if exists("b:did_ftplugin") - finish -endif -let b:did_ftplugin = 1 - -let s:cpo_save = &cpo -set cpo&vim - -let b:undo_ftplugin = "setl com< cms< inc< fo<" - -setlocal comments=:# commentstring=#\ %s -setlocal formatoptions-=t formatoptions+=croql - -let &l:include = '^\s*source\>' - -let &cpo = s:cpo_save -unlet s:cpo_save diff --git a/.config/nvim/ftplugin/python.vim b/.config/nvim/ftplugin/python.vim deleted file mode 100644 index 19e789f..0000000 --- a/.config/nvim/ftplugin/python.vim +++ /dev/null @@ -1,35 +0,0 @@ -" Proper indentation for python files -set fileformat=unix -setlocal softtabstop=4 " Pressing tab during editing operations inserts 4 spaces -setlocal tabstop=4 -setlocal shiftwidth=4 " Number of spaces used for each step of an (auto)indent action, e.g. '>>'. -let python_highlight_all=1 " Enable python highlighting - -augroup PythonColorColumn -autocmd! - " When a Python file is read or the text changes in normal or insert mode, - " draw a column marking the maximum line length if a line exceeds this length - autocmd BufRead,TextChanged *.py call ShowColumnIfLineTooLong(80) -augroup END - -" Color the column marking the lengthLimit when the longest line in the file -" exceeds the lengthLimit -function! ShowColumnIfLineTooLong(lengthLimit) - " See https://stackoverflow.com/questions/2075276/longest-line-in-vim#2982789 - let maxLineLength = max(map(getline(1,'$'), 'len(v:val)')) - - if maxLineLength > a:lengthLimit - " Draw the vertical line at the first letter that exceeds the limit - execute "setlocal colorcolumn=" . (a:lengthLimit + 1) - else - setlocal colorcolumn="" - endif -endfunction - -augroup pystuff - autocmd! - autocmd BufNewFile *.py 0r ~/.config/nvim/templates/py.skeleton -augroup END - -" Disable warnings about trailing whitespace for Python files. -let b:ale_warn_about_trailing_whitespace = 0 diff --git a/.config/nvim/ftplugin/qf.vim b/.config/nvim/ftplugin/qf.vim deleted file mode 100644 index 15fec7f..0000000 --- a/.config/nvim/ftplugin/qf.vim +++ /dev/null @@ -1,59 +0,0 @@ -scriptencoding UTF-8 - -"" -" QuickFix custom foldtext expression. -" -" setlocal foldexpr=kutsan#ftplugin#qf#foldexpr() -"" -function! qf#foldtext() abort - let l:lines = v:foldend - v:foldstart + 1 - let l:file = substitute(getline(v:foldstart), '\v\c\|.+', '', '') - - return printf('%s [%s]', l:file, l:lines) -endfunction - -"" -" QuickFix custom fold expression. -" -" setlocal foldtext=kutsan#ftplugin#qf#foldtext(v:lnum) -" -" @param {number} lnum Line number for the 'foldexpr'. -"" -function! qf#foldexpr(lnum) abort - if matchstr(getline(a:lnum), '\v\c^[^|]+') ==# matchstr(getline(a:lnum + 1), '\v\c^[^|]+') - return 1 - else - return '<1' - endif -endfunction - -" Disable built-in ftplugin. -let b:did_ftplugin = v:true - -" Disable relative numbers and use just numbers. -setlocal norelativenumber -setlocal number - -" Use custom fold expression. -setlocal foldmethod=expr -setlocal foldexpr=qf#foldexpr(v:lnum) - -" Use custom foldtext. -setlocal foldtext=qf#foldtext() - -" Start with all folds open. -setlocal foldlevel=99 - -" Make quickfix buffer hidden. -setlocal nobuflisted - -" Set statusline. -setlocal statusline=%{repeat('\ ',4)} " Generate space characters given number of times. -setlocal statusline+= " Show a custom list icon. -setlocal statusline+=%{repeat('\ ',1)} -setlocal statusline+=%t " File name, either [Quickfix List] or [Location List]. -setlocal statusline+=%= " Align all items to right from this point on. -setlocal statusline+=%{repeat('\ ',1)} -setlocal statusline+=%l/%L " Current line number and total item count. -setlocal statusline+=%{repeat('\ ',1)} - diff --git a/.config/nvim/ftplugin/typescriptreact.vim b/.config/nvim/ftplugin/typescriptreact.vim new file mode 100644 index 0000000..330a824 --- /dev/null +++ b/.config/nvim/ftplugin/typescriptreact.vim @@ -0,0 +1,3 @@ +" Work around filetype that landed in upstream Vim here: +" https://github.com/vim/vim/issues/4830 +execute 'noautocmd set filetype=' . substitute(&filetype, 'typescriptreact', 'typescript', '') diff --git a/.config/nvim/ftplugin/zsh.vim b/.config/nvim/ftplugin/zsh.vim deleted file mode 100644 index 7864e41..0000000 --- a/.config/nvim/ftplugin/zsh.vim +++ /dev/null @@ -1,13 +0,0 @@ -setl ts=4 -setl sts=4 -setl sw=4 -setl noet -setl tw=90 - -let b:ale_linters = ['shell'] - -if !exists("b:sh_indent_options") - let b:sh_indent_options = {} -endif - -let b:sh_indent_options['continuation-line'] = 4 \ No newline at end of file diff --git a/.config/nvim/indent/gdscript.vim b/.config/nvim/indent/gdscript.vim deleted file mode 100644 index 098e1c1..0000000 --- a/.config/nvim/indent/gdscript.vim +++ /dev/null @@ -1,198 +0,0 @@ -" Vim indent file -" Language: gdscript -" Maintainer: Bram Moolenaar -" Original Author: David Bustos -" Last Change: 2013 Jul 9 - -" Only load this indent file when no other was loaded. -if exists("b:did_indent") - finish -endif -let b:did_indent = 1 - -" Some preliminary settings -setlocal nolisp " Make sure lisp indenting doesn't supersede us -setlocal autoindent " indentexpr isn't much help otherwise - -setlocal indentexpr=GetGdscriptIndent(v:lnum) -setlocal indentkeys+=<:>,=elif,=except - -" Only define the function once. -if exists("*get_gdscript_indent") - finish -endif -let s:keepcpo= &cpo -set cpo&vim - -" Come here when loading the script the first time. - -let s:maxoff = 50 " maximum number of lines to look backwards for () - -function! GetGdscriptIndent(lnum) - - " if this line is explicitly joined: if the previous line was also joined, - " line it up with that one, otherwise add two 'shiftwidth' - if getline(a:lnum - 1) =~ '\\$' - if a:lnum > 1 && getline(a:lnum - 2) =~ '\\$' - return indent(a:lnum - 1) - endif - return indent(a:lnum - 1) + (exists("g:pyindent_continue") ? eval(g:pyindent_continue) : (shiftwidth() * 2)) - endif - - " if the start of the line is in a string don't change the indent. - if has('syntax_items') - \ && synidattr(synid(a:lnum, 1, 1), "name") =~ "string$" - return -1 - endif - - " search backwards for the previous non-empty line. - let plnum = prevnonblank(v:lnum - 1) - - if plnum == 0 - " this is the first non-empty line, use zero indent. - return 0 - endif - - " if the previous line is inside parenthesis, use the indent of the starting - " line. - " trick: use the non-existing "dummy" variable to break out of the loop when - " going too far back. - call cursor(plnum, 1) - let parlnum = searchpair('(\|{\|\[', '', ')\|}\|\]', 'nbw', - \ "line('.') < " . (plnum - s:maxoff) . " ? dummy :" - \ . " synidattr(synid(line('.'), col('.'), 1), 'name')" - \ . " =~ '\\(comment\\|todo\\|string\\)$'") - if parlnum > 0 - let plindent = indent(parlnum) - let plnumstart = parlnum - else - let plindent = indent(plnum) - let plnumstart = plnum - endif - - - " when inside parenthesis: if at the first line below the parenthesis add - " two 'shiftwidth', otherwise same as previous line. - " i = (a - " + b - " + c) - call cursor(a:lnum, 1) - let p = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bw', - \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" - \ . " synidattr(synid(line('.'), col('.'), 1), 'name')" - \ . " =~ '\\(comment\\|todo\\|string\\)$'") - if p > 0 - if p == plnum - " when the start is inside parenthesis, only indent one 'shiftwidth'. - let pp = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bw', - \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" - \ . " synidattr(synid(line('.'), col('.'), 1), 'name')" - \ . " =~ '\\(comment\\|todo\\|string\\)$'") - if pp > 0 - return indent(plnum) + (exists("g:pyindent_nested_paren") ? eval(g:pyindent_nested_paren) : shiftwidth()) - endif - return indent(plnum) + (exists("g:pyindent_open_paren") ? eval(g:pyindent_open_paren) : (shiftwidth() * 2)) - endif - if plnumstart == p - return indent(plnum) - endif - return plindent - endif - - - " get the line and remove a trailing comment. - " use syntax highlighting attributes when possible. - let pline = getline(plnum) - let pline_len = strlen(pline) - if has('syntax_items') - " if the last character in the line is a comment, do a binary search for - " the start of the comment. synid() is slow, a linear search would take - " too long on a long line. - if synidattr(synid(plnum, pline_len, 1), "name") =~ "\\(comment\\|todo\\)$" - let min = 1 - let max = pline_len - while min < max - let col = (min + max) / 2 - if synidattr(synid(plnum, col, 1), "name") =~ "\\(comment\\|todo\\)$" - let max = col - else - let min = col + 1 - endif - endwhile - let pline = strpart(pline, 0, min - 1) - endif - else - let col = 0 - while col < pline_len - if pline[col] == '#' - let pline = strpart(pline, 0, col) - break - endif - let col = col + 1 - endwhile - endif - - " if the previous line ended with a colon, indent this line - if pline =~ ':\s*$' - return plindent + shiftwidth() - endif - - " if the previous line was a stop-execution statement... - if getline(plnum) =~ '^\s*\(break\|continue\|raise\|return\|pass\)\>' - " see if the user has already dedented - if indent(a:lnum) > indent(plnum) - shiftwidth() - " if not, recommend one dedent - return indent(plnum) - shiftwidth() - endif - " otherwise, trust the user - return -1 - endif - - " if the current line begins with a keyword that lines up with "try" - if getline(a:lnum) =~ '^\s*\(except\|finally\)\>' - let lnum = a:lnum - 1 - while lnum >= 1 - if getline(lnum) =~ '^\s*\(try\|except\)\>' - let ind = indent(lnum) - if ind >= indent(a:lnum) - return -1 " indent is already less than this - endif - return ind " line up with previous try or except - endif - let lnum = lnum - 1 - endwhile - return -1 " no matching "try"! - endif - - " if the current line begins with a header keyword, dedent - if getline(a:lnum) =~ '^\s*\(elif\|else\)\>' - - " unless the previous line was a one-liner - if getline(plnumstart) =~ '^\s*\(for\|if\|try\)\>' - return plindent - endif - - " or the user has already dedented - if indent(a:lnum) <= plindent - shiftwidth() - return -1 - endif - - return plindent - shiftwidth() - endif - - " when after a () construct we probably want to go back to the start line. - " a = (b - " + c) - " here - if parlnum > 0 - return plindent - endif - - return -1 - -endfunction - -let &cpo = s:keepcpo -unlet s:keepcpo - -" vim:sw=2 diff --git a/.config/nvim/indent/sc_indent.vim b/.config/nvim/indent/sc_indent.vim deleted file mode 100644 index 2cd9d9d..0000000 --- a/.config/nvim/indent/sc_indent.vim +++ /dev/null @@ -1,42 +0,0 @@ -"this indent function isn't that smart yet, hopefully it'll improve in the future -if exists ("b:did_indent") - finish -endif -let b:did_indent = 1 - -setlocal indentexpr=GetSCIndent() -setlocal indentkeys+=0),0],0} - -if exists ("*GetSCIndent") - finish -endif - -function GetSCIndent() - - let curr_line = getline(v:lnum) - let lnum = prevnonblank(v:lnum - 1) - - if lnum == 0 - return 0 - endif - - let prev_line = getline(lnum) - - let ind = indent(lnum) - - if prev_line =~ '\(\/\/.*\)\@\ -set matchtime=1 -set cpoptions-=m -set nojoinspaces -set updatetime=300 -set synmaxcol=200 -set splitbelow -set splitright -set notimeout -set ignorecase -set scrolloff=5 -set sidescroll=5 -set shortmess+=aoOIWcs -set foldnestmax=10 -set foldmethod=marker -set foldclose=all -set foldlevelstart=10 -set selectmode=key -set keymodel=startsel -set signcolumn=yes -set tabstop=2 -set shiftwidth=2 -set softtabstop=2 -set shiftround -set linebreak -set breakindent -set expandtab -set nosmarttab -set title -set redrawtime=500 -set ttimeoutlen=10 -set nowritebackup -set completeopt-=preview -set nostartofline -set undofile -set undolevels=1000 -set undoreload=10000 -set formatoptions+=nl -set formatoptions-=crot -set fillchars+=vert:\ -set listchars+=precedes:<,extends:> -set conceallevel=1 -set diffopt+=algorithm:histogram,indent-heuristic -set pastetoggle= -match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$' - let mapleader="\" let maplocalleader=',' -let formatlistpat='^\s*\(\d\+[\]:.)}\t ]\|[*-][\t ]\)\s*' -let g:netrw_dirhistmax=0 -" }}} -" Functions {{{ -function! MyHighlights() abort - highlight Trail ctermbg=red guibg=red - call matchadd('Trail', '\s\+$', 100) - highlight ColorColumn ctermbg=magenta - call matchadd('ColorColumn', '\%81v', 100) -endfunction - -function! PopOutOfInsertMode() abort - if v:insertmode - call feedkeys("\\") - endif -endfunction - -function! Relativize(v) abort - if &number - let &relativenumber = a:v - endif -endfunction - -function! CmdLine(str) - call feedkeys(':' . a:str) -endfunction -" }}} -" AutoCommands {{{ -if !exists('autocommands_loaded') && has('autocmd') - let autocommands_loaded = 1 - - aug relativize - au BufWinEnter,FocusGained,InsertLeave,WinEnter * call Relativize(1) - au BufWinLeave,FocusLost,InsertEnter,WinLeave * call Relativize(0) - aug END - - aug miscs - au CursorHold * silent call CocActionAsync('highlight') - au User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') - au ColorScheme * call MyHighlights() - aug END - - aug inserts - au InsertEnter * setlocal nocursorline - au InsertLeave * setlocal cursorline nopaste - au InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif - au FocusLost,TabLeave * call PopOutOfInsertMode() - au WinLeave * setlocal nocursorline - aug END - - aug file_types - au BufNewFile ~/doc/blog/*.wiki 0r ~/.config/nvim/templates/wiki.skeleton - au FileType typescript,json setlocal formatexpr=CocAction('formatSelected') - au FileType gitcommit,gitrebase,gitconfig set bufhidden=delete - au BufNewFile,BufRead requirements*.txt set syntax=python - aug END - - aug statusline - au VimEnter * call UpdateInactiveWindows() - au VimEnter,WinEnter,BufWinEnter * call RefreshStatusLine('active') - au WinLeave * call RefreshStatusLine('inactive') - augroup END - - aug on_save - au BufWritePre * :%s/\s\+$//e - au BufWritePost *xresources !xrdb % - au BufWritePost *sxhkdrc !pkill -USR1 sxhkd - au BufWritePost *.tex !pdflatex % - au QuitPre * if empty(&buftype) | lclose | endif - aug END -endif " }}} " {{{ Ale let g:ale_lint_delay = 0 @@ -159,42 +24,12 @@ let g:ale_sign_error = '' let g:ale_sign_warning = '' let g:ale_sign_info = '●' let g:ale_loclist_msg_format = '[%linter%] %s% (code)% [%severity%]' - -let g:ale_linter_aliases = { -\ 'jsx': ['css', 'javascript'], -\ 'vue': ['vue', 'javascript'], -\} -let g:ale_linters = { -\ 'javascript': ['prettier_standard'], -\ 'jsx': ['prettier_standard'], -\ 'typescript': ['tsserver', 'eslint'], -\ 'json': ['prettier_standard'], -\ 'html': ['prettier_standard'], -\ 'css': ['stylelint'], -\ 'scss': ['stylelint'], -\ 'bash': ['shellcheck'], -\ 'sh': ['shellcheck'], -\ 'vim': ['vint'], -\ 'tex': ['chktex'], -\} -let g:ale_fixers = { -\ '*': ['remove_trailing_lines', 'trim_whitespace'], -\ 'jsx': ['prettier_standard'], -\ 'javascript': ['prettier_standard'], -\ 'typescript': ['prettier_standard'], -\ 'json': ['prettier_standard'], -\ 'html': ['prettier_standard'], -\ 'scss': ['stylelint'], -\ 'css': ['stylelint'], -\ 'bash': ['shfmt'], -\ 'sh': ['shfmt'], -\ 'markdown': ['prettier_standard'], -\} +let g:ale_linter_aliases = { 'jsx': ['css', 'javascript'] } +let g:ale_fixers = { '*': ['remove_trailing_lines', 'trim_whitespace'] } let g:ale_pattern_options = { \ '\.min\.js$': {'ale_linters': [], 'ale_fixers': []}, \ '\.min\.css$': {'ale_linters': [], 'ale_fixers': []}, \} - nmap (ale_previous_wrap) nmap (ale_next_wrap) " }}} @@ -212,29 +47,21 @@ nnoremap :CocCommand explorer " Config nnoremap :CocConfig +inoremap + \ pumvisible() ? coc#_select_confirm() : + \ coc#expandableOrJumpable() ? "\=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\" : + \ check_back_space() ? "\" : + \ coc#refresh() + function! s:check_back_space() abort let col = col('.') - 1 return !col || getline('.')[col - 1] =~# '\s' endfunction -inoremap - \ pumvisible() ? "\" : - \ coc#jumpable() ? "\=coc#rpc#request('snippetNext',[])\" : - \ check_back_space() ? "\" : - \ coc#refresh() - -inoremap - \ pumvisible() ? "\" : - \ coc#jumpable() ? "\=coc#rpc#request('snippetPrev',[])\" : - \ "\" +let g:coc_snippet_next = '' " to confirm completion -if exists('*complete_info') - inoremap complete_info()["selected"] != "-1" ? "\" : "\u\" -else - inoremap pumvisible() ? "\" : "\u\" -endif - +inoremap pumvisible() ? "\" : "\" " Use to trigger completion. inoremap coc#refresh() @@ -260,29 +87,13 @@ nnoremap rn (coc-rename) let g:vim_markdown_toc_autofit = 1 let g:markdown_fenced_languages = ['vim', 'help'] let g:javascript_plugin_jsdoc = 1 -let g:vim_jsx_pretty_colorful_config = 1 -let g:jsx_ext_required = 1 -let g:tex_flavor='latex' -let g:tex_conceal='abdmg' -let g:Tex_DefaultTargetFormat ='pdf' -let g:vimtex_compiler_progname = 'nvr' -let g:vimtex_view_method = 'zathura' -let g:vimtex_motion_matchparen = 0 -let g:vimtex_quickfix_mode = 0 -let g:vimtex_complete_enable = 1 -let g:vimtex_view_use_temp_files = 2 "}}} " Plugins {{{ -call plug#begin(stdpath('data') . '/plugged') -Plug 'dense-analysis/ale' -Plug 'lervag/vimtex', {'for': 'latex'} -Plug 'neoclide/coc.nvim', {'branch': 'release'} -Plug 'sheerun/vim-polyglot' -Plug 'tmsvg/pear-tree' -Plug 'tpope/vim-commentary' -Plug 'lambdalisue/gina.vim' -Plug 'srcery-colors/srcery-vim' -call plug#end() +packadd! vim-polyglot +packadd! pear-tree +packadd! loupe +packadd! vim-commentary +packadd! gina.vim " }}} " Colors {{{ set termguicolors @@ -290,324 +101,6 @@ let g:srcery_transparent_background = 1 let g:srcery_italic = 1 let g:srcery_underline = 1 let g:srcery_undercurl = 1 -let g:srcery_inverse_matches = 1 colorscheme srcery - -highlight! VertSplit ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=#080808 gui=NONE -highlight! TabLineFill ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=#ef2f27 gui=NONE -highlight! TablineSel ctermbg=NONE ctermfg=234 guibg=NONE guifg=#008bbd -highlight! CocWarningHighlight ctermfg=4 cterm=undercurl guifg=#c4ab39 gui=undercurl -highlight! CocErrorHighlight ctermfg=red cterm=undercurl guifg=#c4384b gui=undercurl -highlight! CocUnderline cterm=undercurl gui=undercurl -highlight! PmenuSel guibg=#111111 guifg=#6699cc -highlight! Folded ctermbg=NONE guibg=NONE -highlight! RedrawDebugClear guibg=#080808 -highlight! NvimInternalError guifg=#080808 -highlight! DiffAdded guifg=#333333 -highlight! PmenuThumb guifg=#333333 -highlight! link CocErrorSign WarningMsg -highlight! link CocWarningSign Number -highlight! link CocInfoSign Type - -if &diff - highlight! link DiffText MatchParen -endif " }}} -" Statusline {{{ -highlight User1 ctermfg=251 ctermbg=NONE guibg=NONE guifg=#c6c6c6 -highlight User2 ctermfg=234 ctermbg=NONE guibg=NONE guifg=#f74782 -highlight User3 ctermfg=234 ctermbg=4 guibg=NONE guifg=#008bb4 -highlight User4 ctermfg=234 ctermbg=251 guibg=NONE guifg=#c6c6c6 -highlight User5 ctermfg=234 ctermbg=4 guibg=NONE guifg=#e64eff -highlight User6 ctermfg=234 ctermbg=9 guibg=NONE guifg=#fbad34 -highlight User7 ctermfg=234 ctermbg=251 guibg=NONE guifg=#407e4a - -let g:modes={ - \ 'n' : ['%3*', 'NORMAL'], - \ 'no' : ['%3*', 'N·OPERATOR PENDING'], - \ 'v' : ['%5*', 'VISUAL'], - \ 'V' : ['%5*', 'V·LINE'], - \ '' : ['%5*', 'V·BLOCK'], - \ 's' : ['%7*', 'SELECT'], - \ 'S' : ['%7*', 'S·LINE'], - \ '' : ['%7*', 'S·BLOCK'], - \ 'i' : ['%4*', 'INSERT'], - \ 'R' : ['%2*', 'REPLACE'], - \ 'Rv' : ['%2*', 'V·REPLACE'], - \ 'c' : ['%6*', 'COMMAND'], - \ 'cv' : ['%6*', 'VIM EX'], - \ 'ce' : ['%6*', 'EX'], - \ 'r' : ['%1*', 'PROMPT'], - \ 'rm' : ['%1*', 'MORE'], - \ 'r?' : ['%1*', 'CONFIRM'], - \ '!' : ['%*1', 'SHELL'], - \ 't' : ['%*1', 'TERMINAL'] - \} - -function! ModeColor() abort - return get(g:modes, mode(), '%*')[0] -endfunction - -function! CurrentMode() abort - return ' ' . get(g:modes, mode(), '-')[1] . ' ' -endfunction - -function! StatusLine() abort - let l:statusline='' - let l:statusline.=ModeColor() - let l:statusline.=CurrentMode() - let l:statusline.=LinePasteMode() - let l:statusline.='%<' - let l:statusline.='%1* ' - let l:statusline.='%= ' - let l:statusline.=coc#status() - let l:statusline.=LinterStatus() - let l:statusline.='%3* %p%% %c ' - let l:statusline.='' - return l:statusline -endfunction - -function! StatusLineNC() abort - let l:statusline='' - let l:statusline.='%t' - let l:statusline.='%<' - let l:statusline.='%= ' - return l:statusline -endfunction - -function! HelpStatusLine() abort - let l:statusline='' - let l:statusline.= '%#error#[HELP] %t ' - let l:statusline.='%1* ' - let l:statusline.='%<' - let l:statusline.='%= ' - let l:statusline.=' %p%% ' - return l:statusline -endfunction - -function! UpdateInactiveWindows() - for winnum in range(1, winnr('$')) - if winnum != winnr() - call setwinvar(winnum, '&statusline', '%!StatusLineNC()') - endif - endfor -endfunction - -function! RefreshStatusLine(mode) - if (a:mode == "active" && &filetype !=? 'help') - setlocal statusline=%!StatusLine() - else - setlocal statusline=%!StatusLineNC() - endif - if &filetype ==? 'help' - setlocal statusline=%!HelpStatusLine() - endif -endfunction - -function! LinterStatus() abort - let l:counts = ale#statusline#Count(bufnr('')) - let l:all_errors = l:counts.error + l:counts.style_error - let l:all_non_errors = l:counts.total - l:all_errors - return l:counts.total == 0 ? '' : printf( - \ '  :%d  :%d ', - \ l:all_non_errors, - \ l:all_errors - \) -endfunction - -function! LinePasteMode() abort - let paste_status = &paste - if paste_status == 1 - return ' paste ' - else - return '' - endif -endfunction -" }}} -" Tabline {{{ -function! Tabline() - let s = '' - for i in range(tabpagenr('$')) - let tab = i + 1 - let winnr = tabpagewinnr(tab) - let buflist = tabpagebuflist(tab) - let bufnr = buflist[winnr - 1] - let bufname = bufname(bufnr) - let bufmodified = getbufvar(bufnr, '&mod') - - let s .= '%' . tab . 'T' - let s .= (tab == tabpagenr() ? '%#TabLineSel#' : '%#TabLine#') - let s .= ' ' . tab .':' - let s .= (bufname !=? '' ? fnamemodify(bufname, ':t') . ' ' : '[Untitled] ') - - if bufmodified - let s .= ' + ' - endif - endfor - - let s .= '%#TabLineFill#' - if (exists('g:tablineclosebutton')) - let s .= '%=%999XX' - endif - return s -endfunction -set tabline=%!Tabline() -" }}} -"Mappings {{{ -"Normal {{{ -" Ñ master race -nnoremap ñ ; -nnoremap Ñ , - -" Rearrange Splits -nnoremap H -nnoremap L -nnoremap K -nnoremap J - -" Resize splits -nnoremap :vertical resize -2 -nnoremap :vertical resize +2 -nnoremap :resize -1 -nnoremap :resize +1 - -" Alt to switch windows -nnoremap -nnoremap -nnoremap -nnoremap - -" Edit and source config file -nnoremap ev :vsplit $MYVIMRC -nnoremap sv :source $MYVIMRC - -" Gotta Go Fast (save, buffer close, quit, messages, SOF, EOF) -nnoremap g :w! -nnoremap b :bdelete -nnoremap q :q! -nnoremap Q :qa! -nnoremap m :messages -nnoremap gg -nnoremap ¿ G - -" Splits -nnoremap v :vnew -nnoremap h :new - -" Quote words under cursor -nnoremap " viWa"gvoi"gvo3l -nnoremap ' viWa'gvoi'gvo3l - -" Move a line of text using Shift+[jk] -nnoremap J mz:m+`z -nnoremap K mz:m-2`z - -" My vim wants to enter all the time, enter all the time -nnoremap o :call append(line('.'), '') -nnoremap O :call append(line('.')-1, '') - -" Unhighlight search terms -nnoremap :noh=has('diff')?'diffupdate':'' - -" j = gj :: k = gk while preserving numbered jumps ie. 12j or 30k -nnoremap j v:count ? (v:count > 5 ? "m'" . v:count : '') . 'j' : 'gj' -nnoremap k v:count ? (v:count > 5 ? "m'" . v:count : '') . 'k' : 'gk' - -" Line movements -noremap g -noremap g -nnoremap y 0y$ -nnoremap Y y$ - -" Tab movement -nnoremap tn :tabnew -nnoremap th :tabfirst -nnoremap tl :tablast -nnoremap tx :tabclose - -" Center view on search result -nnoremap n nzz -nnoremap N Nzz -nnoremap * *zz -nnoremap # #zz -nnoremap g* g*zz -nnoremap g# g#zz - -" Prevent x from overriding what's in the clipboard. -nnoremap x "_x -nnoremap X "_x - -" Prevent selecting and pasting from overwriting what you originally copied. -xnoremap p pgvy - -" Global replace -nnoremap sw - \ :let b:sub = input('global replacement: ') - \ if b:sub !=? '' - \ execute "%s//".b:sub.'/g' - \ unlet b:sub - \ endif - -" What about the Q -nnoremap Q -map q -"}}} -"Insert {{{ -" Ensure that ctrl+u in insert mode can be reversed -" http://vim.wikia.com/wiki/Recover_from_accidental_Ctrl-U -inoremap u -inoremap u - -" Better nav for omnicomplete -inoremap ("\") -inoremap ("\") - -" Exit insert, dd line, enter insert -inoremap ddi - -" Line movements -inoremap g -inoremap g - -" Alt to switch windows -inoremap h -inoremap j -inoremap k -inoremap l -"}}} -"Visual {{{ -" Fast beginning and end of document -vnoremap ¿ G -vnoremap gg - -" Move a line of text using Shift+[jk] -vnoremap :m'>+`mzgv`yo`z -vnoremap :m'<-2`>my`j v:count ? 'j' : 'gj' -vnoremap k v:count ? 'k' : 'gk' - -" Fix indentation without leaving visual mode -vnoremap > >gv -vnoremap < - -" Delete current visual selection and dump in black hole buffer before pasting -" Used when you want to paste over something without it getting copied to -" Vim's default buffer -vnoremap p "_dP - -" global replace -vnoremap sw "hy - \ :let b:sub = input('global replacement: ') - \ if b:sub !=? '' - \ let b:rep = substitute(getreg('h'), '/', '\\/', 'g') - \ execute '%s/'.b:rep."/".b:sub.'/g' - \ unlet b:sub b:rep - \ endif -"}}} -"}}} " vim:foldmethod=marker:foldlevel=0 diff --git a/.config/nvim/plugin/autocmds.vim b/.config/nvim/plugin/autocmds.vim new file mode 100644 index 0000000..3378c17 --- /dev/null +++ b/.config/nvim/plugin/autocmds.vim @@ -0,0 +1,45 @@ +scriptencoding utf-8 + +if !exists('autocommands_loaded') && has('autocmd') + let autocommands_loaded = 1 + + aug relativize + au BufWinEnter,FocusGained,InsertLeave,WinEnter * call dead#functions#Relativize(1) + au BufWinLeave,FocusLost,InsertEnter,WinLeave * call dead#functions#Relativize(0) + aug END + + aug miscs + au CursorHold * silent call CocActionAsync('highlight') + au User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') + au ColorScheme * call dead#functions#MyHighlights() + aug END + + aug inserts + au InsertEnter * setlocal nocursorline + au InsertLeave * setlocal cursorline nopaste + au InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif + au FocusLost,TabLeave * call dead#functions#PopOutOfInsertMode() + au WinLeave * setlocal nocursorline + aug END + + aug file_types + au BufNewFile ~/doc/blog/*.wiki 0r ~/.config/nvim/templates/wiki.skeleton + au FileType typescript,json setlocal formatexpr=CocAction('formatSelected') + au FileType gitcommit,gitrebase,gitconfig set bufhidden=delete + au BufNewFile,BufRead requirements*.txt set syntax=python + aug END + + aug statusline + au VimEnter * call dead#statusline#UpdateInactiveWindows() + au VimEnter,WinEnter,BufWinEnter * call dead#statusline#RefreshStatusLine('active') + au WinLeave * call dead#statusline#RefreshStatusLine('inactive') + augroup END + + aug on_save + au BufWritePre * :%s/\s\+$//e + au BufWritePost *xresources !xrdb % + au BufWritePost *sxhkdrc !pkill -USR1 sxhkd + au BufWritePost *.tex !pdflatex % + au QuitPre * if empty(&buftype) | lclose | endif + aug END +endif diff --git a/.config/nvim/plugin/mappings/insert.vim b/.config/nvim/plugin/mappings/insert.vim new file mode 100644 index 0000000..feee1ad --- /dev/null +++ b/.config/nvim/plugin/mappings/insert.vim @@ -0,0 +1,23 @@ +"Insert mode + +" Ensure that ctrl+u in insert mode can be reversed +" http://vim.wikia.com/wiki/Recover_from_accidental_Ctrl-U +inoremap u +inoremap u + +" Better nav for omnicomplete +inoremap ("\") +inoremap ("\") + +" Exit insert, dd line, enter insert +inoremap ddi + +" Line movements +inoremap g +inoremap g + +" Alt to switch windows +inoremap h +inoremap j +inoremap k +inoremap l diff --git a/.config/nvim/plugin/mappings/normal.vim b/.config/nvim/plugin/mappings/normal.vim new file mode 100644 index 0000000..b8bc1ae --- /dev/null +++ b/.config/nvim/plugin/mappings/normal.vim @@ -0,0 +1,81 @@ +"Normal mode + +" Ñ master race +nnoremap ñ ; +nnoremap Ñ , + +" Rearrange Splits +nnoremap H +nnoremap L +nnoremap K +nnoremap J + +" Resize splits +nnoremap :vertical resize -2 +nnoremap :vertical resize +2 +nnoremap :resize -1 +nnoremap :resize +1 + +" Alt to switch windows +nnoremap +nnoremap +nnoremap +nnoremap + +" Gotta Go Fast (save, buffer close, quit, messages, newlines, SOF, EOF) +nnoremap g :w! +nnoremap b :bdelete +nnoremap q :q! +nnoremap Q :qa! +nnoremap m :messages +nnoremap o :call append(line('.'), '') +nnoremap O :call append(line('.')-1, '') +nnoremap gg +nnoremap ¿ G + +" Splits +nnoremap v :vnew +nnoremap h :new + +" Quote words under cursor +nnoremap " viWa"gvoi"gvo3l +nnoremap ' viWa'gvoi'gvo3l + +" Move a line of text using Shift+[jk] +nnoremap J mz:m+`z +nnoremap K mz:m-2`z + +" Unhighlight search terms +nnoremap :noh=has('diff')?'diffupdate':'' + +" j = gj :: k = gk while preserving numbered jumps ie. 12j or 30k +nnoremap j v:count ? (v:count > 5 ? "m'" . v:count : '') . 'j' : 'gj' +nnoremap k v:count ? (v:count > 5 ? "m'" . v:count : '') . 'k' : 'gk' + +" Line movements +nnoremap g +nnoremap g +nnoremap y 0y$ +nnoremap Y y$ + +" Tab movement +nnoremap tn :tabnew +nnoremap th :tabfirst +nnoremap tl :tablast +nnoremap tx :tabclose + +" Prevent x from overriding what's in the clipboard. +nnoremap x "_x +nnoremap X "_x + +" Global replace +nnoremap sw + \ :let b:sub = input('global replacement: ') + \ if b:sub !=? '' + \ execute "%s//".b:sub.'/g' + \ unlet b:sub + \ endif + +" What about the Q +nnoremap Q +map q diff --git a/.config/nvim/plugin/mappings/visual.vim b/.config/nvim/plugin/mappings/visual.vim new file mode 100644 index 0000000..dbcc5c8 --- /dev/null +++ b/.config/nvim/plugin/mappings/visual.vim @@ -0,0 +1,33 @@ +"Visual {{{ +" Fast beginning and end of document +vnoremap ¿ G +vnoremap gg + +" Move a line of text using Shift+[jk] +vnoremap :m'>+`mzgv`yo`z +vnoremap :m'<-2`>my`j v:count ? 'j' : 'gj' +vnoremap k v:count ? 'k' : 'gk' + +" Fix indentation without leaving visual mode +vnoremap > >gv +vnoremap < + +" Delete current visual selection and dump in black hole buffer before pasting +" Used when you want to paste over something without it getting copied to +" Vim's default buffer +vnoremap p "_dP + +" global replace +vnoremap sw "hy + \ :let b:sub = input('global replacement: ') + \ if b:sub !=? '' + \ let b:rep = substitute(getreg('h'), '/', '\\/', 'g') + \ execute '%s/'.b:rep."/".b:sub.'/g' + \ unlet b:sub b:rep + \ endif diff --git a/.config/nvim/plugin/settings.vim b/.config/nvim/plugin/settings.vim new file mode 100644 index 0000000..d30395a --- /dev/null +++ b/.config/nvim/plugin/settings.vim @@ -0,0 +1,68 @@ +" Settings +scriptencoding utf-8 + +set inccommand=nosplit +set clipboard^=unnamedplus +set number +set noshowmode +set showtabline=2 +set noswapfile +set hidden +set lazyredraw +set showmatch +set matchpairs+=<:> +set matchtime=1 +set cpoptions-=m +set nojoinspaces +set updatetime=300 +set synmaxcol=200 +set splitbelow +set splitright +set notimeout +set ignorecase +set scrolloff=5 +set sidescroll=5 +set shortmess+=aoOIWcs +set foldnestmax=10 +set foldmethod=marker +set foldclose=all +set foldlevelstart=10 +set selectmode=key +set keymodel=startsel +set signcolumn=yes +set tabstop=2 +set shiftwidth=2 +set softtabstop=2 +set shiftround +set linebreak +set breakindent +set expandtab +set nosmarttab +set title +set redrawtime=500 +set ttimeoutlen=10 +set nowritebackup +set completeopt-=preview +set nostartofline +set undofile +set undolevels=1000 +set undoreload=10000 +set formatoptions+=nl +set formatoptions-=crot +set fillchars+=vert:\ +set listchars+=precedes:<,extends:> +set conceallevel=1 +set diffopt+=algorithm:histogram,indent-heuristic +set diffopt+=foldcolumn:0 +set pastetoggle= +match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$' + +let mapleader="\" +let maplocalleader=',' +let formatlistpat='^\s*\(\d\+[\]:.)}\t ]\|[*-][\t ]\)\s*' +let g:netrw_dirhistmax=0 + +if exists('$SUDO_USER') + set nobackup + set noundofile +endif diff --git a/.config/nvim/plugin/statusline.vim b/.config/nvim/plugin/statusline.vim new file mode 100644 index 0000000..4db5c48 --- /dev/null +++ b/.config/nvim/plugin/statusline.vim @@ -0,0 +1,31 @@ +scriptencoding utf-8 + +highlight User1 ctermfg=251 ctermbg=NONE guibg=NONE guifg=#c6c6c6 +highlight User2 ctermfg=234 ctermbg=NONE guibg=NONE guifg=#f74782 +highlight User3 ctermfg=234 ctermbg=4 guibg=NONE guifg=#008bb4 +highlight User4 ctermfg=234 ctermbg=251 guibg=NONE guifg=#c6c6c6 +highlight User5 ctermfg=234 ctermbg=4 guibg=NONE guifg=#e64eff +highlight User6 ctermfg=234 ctermbg=9 guibg=NONE guifg=#fbad34 +highlight User7 ctermfg=234 ctermbg=251 guibg=NONE guifg=#407e4a + +let g:modes={ + \ 'n' : ['%3*', 'NORMAL'], + \ 'no' : ['%3*', 'N·OPERATOR PENDING'], + \ 'v' : ['%5*', 'VISUAL'], + \ 'V' : ['%5*', 'V·LINE'], + \ '' : ['%5*', 'V·BLOCK'], + \ 's' : ['%7*', 'SELECT'], + \ 'S' : ['%7*', 'S·LINE'], + \ '' : ['%7*', 'S·BLOCK'], + \ 'i' : ['%4*', 'INSERT'], + \ 'R' : ['%2*', 'REPLACE'], + \ 'Rv' : ['%2*', 'V·REPLACE'], + \ 'c' : ['%6*', 'COMMAND'], + \ 'cv' : ['%6*', 'VIM EX'], + \ 'ce' : ['%6*', 'EX'], + \ 'r' : ['%1*', 'PROMPT'], + \ 'rm' : ['%1*', 'MORE'], + \ 'r?' : ['%1*', 'CONFIRM'], + \ '!' : ['%*1', 'SHELL'], + \ 't' : ['%*1', 'TERMINAL'] + \} diff --git a/.config/nvim/plugin/tabline.vim b/.config/nvim/plugin/tabline.vim new file mode 100644 index 0000000..40770d6 --- /dev/null +++ b/.config/nvim/plugin/tabline.vim @@ -0,0 +1 @@ +set tabline=%!dead#tabline#Tabline() diff --git a/.config/nvim/syntax/json.vim b/.config/nvim/syntax/json.vim new file mode 100644 index 0000000..db2f74d --- /dev/null +++ b/.config/nvim/syntax/json.vim @@ -0,0 +1,6 @@ +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syntax match Comment +\/\/.\+$+ diff --git a/.config/nvim/syntax/neomuttlog.vim b/.config/nvim/syntax/neomuttlog.vim deleted file mode 100644 index 85e56f3..0000000 --- a/.config/nvim/syntax/neomuttlog.vim +++ /dev/null @@ -1,65 +0,0 @@ -" Vim syntax file -" Language: NeoMutt log files -" Maintainer: Richard Russon -" Last Change: 2018-02-16 - -" quit when a syntax file was already loaded -if exists("b:current_syntax") - finish -endif - -syntax match neolog_date "\v^\[\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\] *" conceal -syntax match neolog_version "\v" -syntax match neolog_banner "\v^\[\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\] .*" contains=neolog_date,neolog_version -syntax match neolog_function "\v%26v\i+\(\)" - -syntax match neolog_perror_key "\v%22v\ " conceal transparent -syntax match neolog_error_key "\v%22v\ " conceal transparent -syntax match neolog_warning_key "\v%22v\ " conceal transparent -syntax match neolog_message_key "\v%22v\ " conceal transparent -syntax match neolog_debug1_key "\v%22v\<1\> " conceal transparent -syntax match neolog_debug2_key "\v%22v\<2\> " conceal transparent -syntax match neolog_debug3_key "\v%22v\<3\> " conceal transparent -syntax match neolog_debug4_key "\v%22v\<4\> " conceal transparent -syntax match neolog_debug5_key "\v%22v\<5\> " conceal transparent - -syntax match neolog_perror "\v%22v\ .*" contains=neolog_perror_key,neolog_function -syntax match neolog_error "\v%22v\ .*" contains=neolog_error_key,neolog_function -syntax match neolog_warning "\v%22v\ .*" contains=neolog_warning_key,neolog_function -syntax match neolog_message "\v%22v\ .*" contains=neolog_message_key,neolog_function -syntax match neolog_debug1 "\v%22v\<1\> .*" contains=neolog_debug1_key,neolog_function -syntax match neolog_debug2 "\v%22v\<2\> .*" contains=neolog_debug2_key,neolog_function -syntax match neolog_debug3 "\v%22v\<3\> .*" contains=neolog_debug3_key,neolog_function -syntax match neolog_debug4 "\v%22v\<4\> .*" contains=neolog_debug4_key,neolog_function -syntax match neolog_debug5 "\v%22v\<5\> .*" contains=neolog_debug5_key,neolog_function - -if exists('g:neolog_default_colors') - highlight neolog_date ctermfg=cyan guifg=#40ffff - highlight neolog_banner ctermfg=magenta guifg=#ff00ff - highlight neolog_version cterm=reverse - highlight neolog_function guibg=#282828 - - highlight neolog_perror ctermfg=red guifg=#ff8080 - highlight neolog_error ctermfg=red guifg=#ff8080 - highlight neolog_warning ctermfg=yellow guifg=#ffff80 - highlight neolog_message ctermfg=green guifg=#80ff80 - highlight neolog_debug1 ctermfg=white guifg=#ffffff - highlight neolog_debug2 ctermfg=white guifg=#ffffff - highlight neolog_debug3 ctermfg=grey guifg=#c0c0c0 - highlight neolog_debug4 ctermfg=grey guifg=#c0c0c0 - highlight neolog_debug5 ctermfg=grey guifg=#c0c0c0 -endif - -highlight link neolog_perror_key neolog_perror -highlight link neolog_error_key neolog_error -highlight link neolog_warning_key neolog_warning -highlight link neolog_message_key neolog_message -highlight link neolog_debug1_key neolog_debug1 -highlight link neolog_debug2_key neolog_debug2 -highlight link neolog_debug3_key neolog_debug3 -highlight link neolog_debug4_key neolog_debug4 -highlight link neolog_debug5_key neolog_debug5 - -let b:current_syntax = "neomuttlog" - -" vim: ts=2 et tw=100 sw=2 sts=0 ft=vim diff --git a/.config/nvim/syntax/neomuttrc.vim b/.config/nvim/syntax/neomuttrc.vim deleted file mode 100644 index 7ff8987..0000000 --- a/.config/nvim/syntax/neomuttrc.vim +++ /dev/null @@ -1,1049 +0,0 @@ -" Vim syntax file -" Language: NeoMutt setup files -" Maintainer: Guillaume Brogi -" Last Change: 2018-03-25 -" Original version based on syntax/muttrc.vim - -" This file covers NeoMutt 2018-03-23 - -" quit when a syntax file was already loaded -if exists("b:current_syntax") - finish -endif - -let s:cpo_save = &cpo -set cpo&vim - -" Set the keyword characters -setlocal isk=@,48-57,_,- - -" handling optional variables -syntax match muttrcComment "^# .*$" contains=@Spell -syntax match muttrcComment "^#[^ ].*$" -syntax match muttrcComment "^#$" -syntax match muttrcComment "[^\\]#.*$"lc=1 - -" Escape sequences (back-tick and pipe goes here too) -syntax match muttrcEscape +\\[#tnr"'Cc ]+ -syntax match muttrcEscape +[`|]+ -syntax match muttrcEscape +\\$+ - -" The variables takes the following arguments -"syn match muttrcString contained "=\s*[^ #"'`]\+"lc=1 contains=muttrcEscape -syntax region muttrcString contained keepend start=+"+ms=e skip=+\\"+ end=+"+ contains=muttrcEscape,muttrcCommand,muttrcAction,muttrcShellString -syntax region muttrcString contained keepend start=+'+ms=e skip=+\\'+ end=+'+ contains=muttrcEscape,muttrcCommand,muttrcAction -syntax match muttrcStringNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcString,muttrcStringNL - -syntax region muttrcShellString matchgroup=muttrcEscape keepend start=+`+ skip=+\\`+ end=+`+ contains=muttrcVarStr,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcCommand,muttrcVarDeprecatedStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad - -syntax match muttrcRXChars contained /[^\\][][.*?+]\+/hs=s+1 -syntax match muttrcRXChars contained /[][|()][.*?+]*/ -syntax match muttrcRXChars contained /['"]^/ms=s+1 -syntax match muttrcRXChars contained /$['"]/me=e-1 -syntax match muttrcRXChars contained /\\/ -" Why does muttrcRXString2 work with one \ when muttrcRXString requires two? -syntax region muttrcRXString contained skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcRXChars -syntax region muttrcRXString contained skipwhite start=+"+ skip=+\\"+ end=+"+ contains=muttrcRXChars -syntax region muttrcRXString contained skipwhite start=+[^ "'^]+ skip=+\\\s+ end=+\s+re=e-1 contains=muttrcRXChars -" For some reason, skip refuses to match backslashes here... -syntax region muttrcRXString contained matchgroup=muttrcRXChars skipwhite start=+\^+ end=+[^\\]\s+re=e-1 contains=muttrcRXChars -syntax region muttrcRXString contained matchgroup=muttrcRXChars skipwhite start=+\^+ end=+$\s+ contains=muttrcRXChars -syntax region muttrcRXString2 contained skipwhite start=+'+ skip=+\'+ end=+'+ contains=muttrcRXChars -syntax region muttrcRXString2 contained skipwhite start=+"+ skip=+\"+ end=+"+ contains=muttrcRXChars - -" these must be kept synchronized with muttrcRXString, but are intended for -" muttrcRXHooks -syntax region muttrcRXHookString contained keepend skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL -syntax region muttrcRXHookString contained keepend skipwhite start=+"+ skip=+\\"+ end=+"+ contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL -syntax region muttrcRXHookString contained keepend skipwhite start=+[^ "'^]+ skip=+\\\s+ end=+\s+re=e-1 contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL -syntax region muttrcRXHookString contained keepend skipwhite start=+\^+ end=+[^\\]\s+re=e-1 contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL -syntax region muttrcRXHookString contained keepend matchgroup=muttrcRXChars skipwhite start=+\^+ end=+$\s+ contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL -syntax match muttrcRXHookStringNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcRXHookString,muttrcRXHookStringNL - -" these are exclusively for args lists (e.g. -rx pat pat pat ...) -syntax region muttrcRXPat contained keepend skipwhite start=+'+ skip=+\\'+ end=+'\s*+ contains=muttrcRXString nextgroup=muttrcRXPat -syntax region muttrcRXPat contained keepend skipwhite start=+"+ skip=+\\"+ end=+"\s*+ contains=muttrcRXString nextgroup=muttrcRXPat -syntax match muttrcRXPat contained /[^-'"#!]\S\+/ skipwhite contains=muttrcRXChars nextgroup=muttrcRXPat -syntax match muttrcRXDef contained "-rx\s\+" skipwhite nextgroup=muttrcRXPat - -syntax match muttrcSpecial +\(['"]\)!\1+ - -syntax match muttrcSetStrAssignment contained skipwhite /=\s*\%(\\\?\$\)\?[0-9A-Za-z_-]\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr contains=muttrcVariable,muttrcEscapedVariable -syntax region muttrcSetStrAssignment contained skipwhite keepend start=+=\s*"+hs=s+1 end=+"+ skip=+\\"+ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr contains=muttrcString -syntax region muttrcSetStrAssignment contained skipwhite keepend start=+=\s*'+hs=s+1 end=+'+ skip=+\\'+ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr contains=muttrcString -syntax match muttrcSetBoolAssignment contained skipwhite /=\s*\\\?\$\w\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr contains=muttrcVariable,muttrcEscapedVariable -syntax match muttrcSetBoolAssignment contained skipwhite /=\s*\%(yes\|no\)/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax match muttrcSetBoolAssignment contained skipwhite /=\s*"\%(yes\|no\)"/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax match muttrcSetBoolAssignment contained skipwhite /=\s*'\%(yes\|no\)'/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax match muttrcSetQuadAssignment contained skipwhite /=\s*\\\?\$\w\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr contains=muttrcVariable,muttrcEscapedVariable -syntax match muttrcSetQuadAssignment contained skipwhite /=\s*\%(ask-\)\?\%(yes\|no\)/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax match muttrcSetQuadAssignment contained skipwhite /=\s*"\%(ask-\)\?\%(yes\|no\)"/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax match muttrcSetQuadAssignment contained skipwhite /=\s*'\%(ask-\)\?\%(yes\|no\)'/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax match muttrcSetNumAssignment contained skipwhite /=\s*\\\?\$\w\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr contains=muttrcVariable,muttrcEscapedVariable -syntax match muttrcSetNumAssignment contained skipwhite /=\s*\d\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax match muttrcSetNumAssignment contained skipwhite /=\s*"\d\+"/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax match muttrcSetNumAssignment contained skipwhite /=\s*'\d\+'/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr - -" Now catch some email addresses and headers (purified version from mail.vim) -syntax match muttrcEmail "[a-zA-Z0-9._-]\+@[a-zA-Z0-9./-]\+" -syntax match muttrcHeader "\<\c\%(From\|To\|C[Cc]\|B[Cc][Cc]\|Reply-To\|Subject\|Return-Path\|Received\|Date\|Replied\|Attach\)\>:\=" - -syntax match muttrcKeySpecial contained +\%(\\[Cc'"]\|\^\|\\[01]\d\{2}\)+ -syntax match muttrcKey contained "\S\+" contains=muttrcKeySpecial,muttrcKeyName -syntax region muttrcKey contained start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=muttrcKeySpecial,muttrcKeyName -syntax region muttrcKey contained start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=muttrcKeySpecial,muttrcKeyName -syntax match muttrcKeyName contained "\\[trne]" -syntax match muttrcKeyName contained "\c<\%(BackSpace\|BackTab\|Delete\|Down\|End\|Enter\|Esc\|Home\|Insert\|Left\|Next\|PageDown\|PageUp\|Return\|Right\|Space\|Tab\|Up\)>" -syntax match muttrcKeyName contained "\c" - -syntax match muttrcFormatErrors contained /%./ - -syntax match muttrcStrftimeEscapes contained /%[AaBbCcDdeFGgHhIjklMmnpRrSsTtUuVvWwXxYyZz+%]/ -syntax match muttrcStrftimeEscapes contained /%E[cCxXyY]/ -syntax match muttrcStrftimeEscapes contained /%O[BdeHImMSuUVwWy]/ - -syntax region muttrcIndexFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcIndexFormatEscapes,muttrcIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax region muttrcIndexFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcIndexFormatEscapes,muttrcIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax region muttrcGroupIndexFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcGroupIndexFormatEscapes,muttrcGroupIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax region muttrcGroupIndexFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcGroupIndexFormatEscapes,muttrcGroupIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax region muttrcSidebarFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcSidebarFormatEscapes,muttrcSidebarFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax region muttrcSidebarFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcSidebarFormatEscapes,muttrcSidebarFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax region muttrcQueryFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcQueryFormatEscapes,muttrcQueryFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax region muttrcAliasFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcAliasFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax region muttrcAliasFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcAliasFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax region muttrcAttachFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcAttachFormatEscapes,muttrcAttachFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax region muttrcAttachFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcAttachFormatEscapes,muttrcAttachFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax region muttrcComposeFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcComposeFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax region muttrcComposeFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcComposeFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax region muttrcFolderFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcFolderFormatEscapes,muttrcFolderFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax region muttrcFolderFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcFolderFormatEscapes,muttrcFolderFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax region muttrcMixFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcMixFormatEscapes,muttrcMixFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax region muttrcMixFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcMixFormatEscapes,muttrcMixFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax region muttrcPGPFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPFormatEscapes,muttrcPGPFormatConditionals,muttrcFormatErrors,muttrcPGPTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax region muttrcPGPFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPGPFormatEscapes,muttrcPGPFormatConditionals,muttrcFormatErrors,muttrcPGPTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax region muttrcPGPCmdFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPCmdFormatEscapes,muttrcPGPCmdFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax region muttrcPGPCmdFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPGPCmdFormatEscapes,muttrcPGPCmdFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax region muttrcStatusFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcStatusFormatEscapes,muttrcStatusFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax region muttrcStatusFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcStatusFormatEscapes,muttrcStatusFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax region muttrcPGPGetKeysFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPGetKeysFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax region muttrcPGPGetKeysFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPGPGetKeysFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax region muttrcSmimeFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcSmimeFormatEscapes,muttrcSmimeFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax region muttrcSmimeFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcSmimeFormatEscapes,muttrcSmimeFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax region muttrcStrftimeFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcStrftimeEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax region muttrcStrftimeFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcStrftimeEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr - -" Format escapes and conditionals -syntax match muttrcFormatConditionals2 contained /[^?]*?/ -function! s:escapesConditionals(baseName, sequence, alignment, secondary) - exec 'syntax match muttrc' . a:baseName . 'Escapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?\%(' . a:sequence . '\|%\)/' - if a:alignment - exec 'syntax match muttrc' . a:baseName . 'Escapes contained /%[>|*]./' - endif - if a:secondary - exec 'syntax match muttrc' . a:baseName . 'Conditionals contained /%?\%(' . a:sequence . '\)?/ nextgroup=muttrcFormatConditionals2' - else - exec 'syntax match muttrc' . a:baseName . 'Conditionals contained /%?\%(' . a:sequence . '\)?/' - endif -endfunction - -" CHECKED 2018-04-18 -" Ref: index_format_str() in hdrline.c -call s:escapesConditionals('IndexFormat', '[AaBbCcDdEeFfgHIiJKLlMmNnOPqRrSsTtuvWXxYyZz(<[{]\|G[a-zA-Z]\+', 1, 1) -" Ref: alias_format_str() in addrbook.c -syntax match muttrcAliasFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[afnrt%]/ -" Ref: group_index_format_str() in browser.c -call s:escapesConditionals('GroupIndexFormat', '[CdfMNns]', 1, 1) -" Ref: sidebar_format_str() in sidebar.c -call s:escapesConditionals('SidebarFormat', '[BdFLNnSt!]', 1, 1) -" Ref: query_format_str() in query.c -call s:escapesConditionals('QueryFormat', '[acent]', 0, 1) -" Ref: attach_format_str() in recvattach.c -call s:escapesConditionals('AttachFormat', '[CcDdeFfIMmnQsTtuX]', 1, 1) -" Ref: compose_format_str() in compose.c -syntax match muttrcComposeFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[ahlv%]/ -syntax match muttrcComposeFormatEscapes contained /%[>|*]./ -" Ref: folder_format_str() in browser.c -call s:escapesConditionals('FolderFormat', '[CDdFfglmNnstu]', 1, 0) -" Ref: mix_format_str() in remailer.c -call s:escapesConditionals('MixFormat', '[acns]', 0, 0) -" Ref: status_format_str() in status.c -call s:escapesConditionals('StatusFormat', '[bdFfhLlMmnoPpRrSstuVv]', 1, 1) -" Ref: fmt_smime_command() in ncrypt/smime.c -call s:escapesConditionals('SmimeFormat', '[aCcdfiks]', 0, 1) -" Ref: crypt_format_str() in ncrypt/crypt_gpgme.c -" Ref: pgp_entry_fmt() in ncrypt/pgpkey.c -" Note: crypt_format_str() supports 'p', but pgp_entry_fmt() does not -call s:escapesConditionals('PGPFormat', '[acfklnptu[]', 0, 0) -" Ref: fmt_pgp_command() ncrypt/pgpinvoke.c -call s:escapesConditionals('PGPCmdFormat', '[afprs]', 0, 1) - -" This matches the documentation, but directly contradicts the code -" (according to the code, this should be identical to the muttrcPGPCmdFormatEscapes -syntax match muttrcPGPGetKeysFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[acfklntu[%]/ - -syntax region muttrcTimeEscapes contained start=+%{+ end=+}+ contains=muttrcStrftimeEscapes -syntax region muttrcTimeEscapes contained start=+%\[+ end=+\]+ contains=muttrcStrftimeEscapes -syntax region muttrcTimeEscapes contained start=+%(+ end=+)+ contains=muttrcStrftimeEscapes -syntax region muttrcTimeEscapes contained start=+%<+ end=+>+ contains=muttrcStrftimeEscapes -syntax region muttrcPGPTimeEscapes contained start=+%\[+ end=+\]+ contains=muttrcStrftimeEscapes - -syntax match muttrcVarEqualsAliasFmt contained skipwhite "=" nextgroup=muttrcAliasFormatStr -syntax match muttrcVarEqualsAttachFmt contained skipwhite "=" nextgroup=muttrcAttachFormatStr -syntax match muttrcVarEqualsComposeFmt contained skipwhite "=" nextgroup=muttrcComposeFormatStr -syntax match muttrcVarEqualsFolderFmt contained skipwhite "=" nextgroup=muttrcFolderFormatStr -syntax match muttrcVarEqualsGrpIdxFmt contained skipwhite "=" nextgroup=muttrcGroupIndexFormatStr -syntax match muttrcVarEqualsIdxFmt contained skipwhite "=" nextgroup=muttrcIndexFormatStr -syntax match muttrcVarEqualsMixFmt contained skipwhite "=" nextgroup=muttrcMixFormatStr -syntax match muttrcVarEqualsPGPCmdFmt contained skipwhite "=" nextgroup=muttrcPGPCmdFormatStr -syntax match muttrcVarEqualsPGPFmt contained skipwhite "=" nextgroup=muttrcPGPFormatStr -syntax match muttrcVarEqualsPGPGetKeysFmt contained skipwhite "=" nextgroup=muttrcPGPGetKeysFormatStr -syntax match muttrcVarEqualsQueryFmt contained skipwhite "=" nextgroup=muttrcQueryFormatStr -syntax match muttrcVarEqualsSdbFmt contained skipwhite "=" nextgroup=muttrcSidebarFormatStr -syntax match muttrcVarEqualsSmimeFmt contained skipwhite "=" nextgroup=muttrcSmimeFormatStr -syntax match muttrcVarEqualsStatusFmt contained skipwhite "=" nextgroup=muttrcStatusFormatStr -syntax match muttrcVarEqualsStrftimeFmt contained skipwhite "=" nextgroup=muttrcStrftimeFormatStr - -syntax match muttrcVPrefix contained /[?&]/ nextgroup=muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr - -" CHECKED 2018-04-18 -" List of the different screens in mutt -syntax keyword muttrcMenu contained alias attach browser compose editor generic index key_select_pgp key_select_smime mix pager pgp postpone query smime -syntax match muttrcMenuList "\S\+" contained contains=muttrcMenu -syntax match muttrcMenuCommas /,/ contained - -" CHECKED 2018-04-18 -" List of hooks in Commands in init.h -syntax keyword muttrcHooks contained skipwhite - \ account-hook append-hook close-hook crypt-hook fcc-hook fcc-save-hook - \ folder-hook iconv-hook mbox-hook message-hook open-hook pgp-hook - \ reply-hook save-hook send-hook send2-hook -syntax keyword muttrcHooks skipwhite shutdown-hook startup-hook timeout-hook nextgroup=muttrcCommand - -syntax region muttrcSpamPattern contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPattern nextgroup=muttrcString,muttrcStringNL -syntax region muttrcSpamPattern contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPattern nextgroup=muttrcString,muttrcStringNL - -syntax region muttrcNoSpamPattern contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPattern -syntax region muttrcNoSpamPattern contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPattern - -syntax match muttrcAttachmentsMimeType contained "[*a-z0-9_-]\+/[*a-z0-9._-]\+\s*" skipwhite nextgroup=muttrcAttachmentsMimeType -syntax match muttrcAttachmentsFlag contained "[+-]\%([AI]\|inline\|attachment\)\s\+" skipwhite nextgroup=muttrcAttachmentsMimeType -syntax match muttrcAttachmentsLine "^\s*\%(un\)\?attachments\s\+" skipwhite nextgroup=muttrcAttachmentsFlag - -syntax match muttrcUnHighlightSpace contained "\%(\s\+\|\\$\)" - -syntax keyword muttrcAsterisk contained * -syntax keyword muttrcListsKeyword lists skipwhite nextgroup=muttrcGroupDef,muttrcComment -syntax keyword muttrcListsKeyword unlists skipwhite nextgroup=muttrcAsterisk,muttrcComment - -syntax keyword muttrcSubscribeKeyword subscribe nextgroup=muttrcGroupDef,muttrcComment -syntax keyword muttrcSubscribeKeyword unsubscribe nextgroup=muttrcAsterisk,muttrcComment - -syntax keyword muttrcAlternateKeyword contained alternates unalternates -syntax region muttrcAlternatesLine keepend start=+^\s*\%(un\)\?alternates\s+ skip=+\\$+ end=+$+ contains=muttrcAlternateKeyword,muttrcGroupDef,muttrcRXPat,muttrcUnHighlightSpace,muttrcComment - -" muttrcVariable includes a prefix because partial strings are considered -" valid. -syntax match muttrcVariable contained "\\\@]\+" contains=muttrcEmail -syntax match muttrcAction contained "<[^>]\{-}>" contains=muttrcBadAction,muttrcFunction,muttrcKeyName - -" First, functions that take regular expressions: -syntax match muttrcRXHookNot contained /!\s*/ skipwhite nextgroup=muttrcRXHookString,muttrcRXHookStringNL -syntax match muttrcRXHooks /\<\%(account\|append\|close\|crypt\|folder\|mbox\|open\|pgp\)-hook\>/ skipwhite nextgroup=muttrcRXHookNot,muttrcRXHookString,muttrcRXHookStringNL - -" Now, functions that take patterns -syntax match muttrcPatHookNot contained /!\s*/ skipwhite nextgroup=muttrcPattern -syntax match muttrcPatHooks /\<\%(charset\|iconv\)-hook\>/ skipwhite nextgroup=muttrcPatHookNot,muttrcPattern -syntax match muttrcPatHooks /\<\%(message\|reply\|send\|send2\|save\|fcc\|fcc-save\)-hook\>/ skipwhite nextgroup=muttrcPatHookNot,muttrcOptPattern - -syntax match muttrcBindFunction contained /\S\+\>/ skipwhite contains=muttrcFunction -syntax match muttrcBindFunctionNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindFunction,muttrcBindFunctionNL -syntax match muttrcBindKey contained /\S\+/ skipwhite contains=muttrcKey nextgroup=muttrcBindFunction,muttrcBindFunctionNL -syntax match muttrcBindKeyNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindKey,muttrcBindKeyNL -syntax match muttrcBindMenuList contained /\S\+/ skipwhite contains=muttrcMenu,muttrcMenuCommas nextgroup=muttrcBindKey,muttrcBindKeyNL -syntax match muttrcBindMenuListNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindMenuList,muttrcBindMenuListNL - -syntax region muttrcMacroDescr contained keepend skipwhite start=+\s*\S+ms=e skip=+\\ + end=+ \|$+me=s -syntax region muttrcMacroDescr contained keepend skipwhite start=+'+ms=e skip=+\\'+ end=+'+me=s -syntax region muttrcMacroDescr contained keepend skipwhite start=+"+ms=e skip=+\\"+ end=+"+me=s -syntax match muttrcMacroDescrNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroDescr,muttrcMacroDescrNL -syntax region muttrcMacroBody contained skipwhite start="\S" skip='\\ \|\\$' end=' \|$' contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction nextgroup=muttrcMacroDescr,muttrcMacroDescrNL -syntax region muttrcMacroBody matchgroup=Type contained skipwhite start=+'+ms=e skip=+\\'+ end=+'\|\%(\%(\\\\\)\@]\+>/ contains=muttrcEmail nextgroup=muttrcAliasComma -syntax match muttrcAliasEncEmailNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasEncEmail,muttrcAliasEncEmailNL -syntax match muttrcAliasNameNoParens contained /[^<(@]\+\s\+/ nextgroup=muttrcAliasEncEmail,muttrcAliasEncEmailNL -syntax region muttrcAliasName contained matchgroup=Type start=/(/ end=/)/ skipwhite -syntax match muttrcAliasNameNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasName,muttrcAliasNameNL -syntax match muttrcAliasENNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasEmail,muttrcAliasEncEmail,muttrcAliasNameNoParens,muttrcAliasENNL -syntax match muttrcAliasKey contained /\s*[^- \t]\S\+/ skipwhite nextgroup=muttrcAliasEmail,muttrcAliasEncEmail,muttrcAliasNameNoParens,muttrcAliasENNL -syntax match muttrcAliasNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL - -syntax match muttrcUnAliasKey contained "\s*\w\+\s*" skipwhite nextgroup=muttrcUnAliasKey,muttrcUnAliasNL -syntax match muttrcUnAliasNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcUnAliasKey,muttrcUnAliasNL - -syntax match muttrcSimplePat contained "!\?\^\?[~][ADEFgGklNOpPQRSTuUvV=$]" -syntax match muttrcSimplePat contained "!\?\^\?[~][mnXz]\s*\%([<>-][0-9]\+[kM]\?\|[0-9]\+[kM]\?[-]\%([0-9]\+[kM]\?\)\?\)" -syntax match muttrcSimplePat contained "!\?\^\?[~][dr]\s*\%(\%(-\?[0-9]\{1,2}\%(/[0-9]\{1,2}\%(/[0-9]\{2}\%([0-9]\{2}\)\?\)\?\)\?\%([+*-][0-9]\+[ymwd]\)*\)\|\%(\%([0-9]\{1,2}\%(/[0-9]\{1,2}\%(/[0-9]\{2}\%([0-9]\{2}\)\?\)\?\)\?\%([+*-][0-9]\+[ymwd]\)*\)-\%([0-9]\{1,2}\%(/[0-9]\{1,2}\%(/[0-9]\{2}\%([0-9]\{2}\)\?\)\?\)\?\%([+*-][0-9]\+[ymwd]\)\?\)\?\)\|\%([<>=][0-9]\+[ymwd]\)\|\%(`[^`]\+`\)\|\%(\$[a-zA-Z0-9_-]\+\)\)" contains=muttrcShellString,muttrcVariable -syntax match muttrcSimplePat contained "!\?\^\?[~][bBcCefhHiLstxy]\s*" nextgroup=muttrcSimplePatRXContainer -syntax match muttrcSimplePat contained "!\?\^\?[%][bBcCefhHiLstxy]\s*" nextgroup=muttrcSimplePatString -syntax match muttrcSimplePat contained "!\?\^\?[=][bcCefhHiLstxy]\s*" nextgroup=muttrcSimplePatString -syntax region muttrcSimplePat contained keepend start=+!\?\^\?[~](+ end=+)+ contains=muttrcSimplePat -"syn match muttrcSimplePat contained /'[^~=%][^']*/ contains=muttrcRXString -syntax region muttrcSimplePatString contained keepend start=+"+ end=+"+ skip=+\\"+ -syntax region muttrcSimplePatString contained keepend start=+'+ end=+'+ skip=+\\'+ -syntax region muttrcSimplePatString contained keepend start=+[^ "']+ skip=+\\ + end=+\s+re=e-1 -syntax region muttrcSimplePatRXContainer contained keepend start=+"+ end=+"+ skip=+\\"+ contains=muttrcRXString -syntax region muttrcSimplePatRXContainer contained keepend start=+'+ end=+'+ skip=+\\'+ contains=muttrcRXString -syntax region muttrcSimplePatRXContainer contained keepend start=+[^ "']+ skip=+\\ + end=+\s+re=e-1 contains=muttrcRXString -syntax match muttrcSimplePatMetas contained /[(|)]/ - -syntax match muttrcOptSimplePat contained skipwhite /[~=%!(^].*/ contains=muttrcSimplePat,muttrcSimplePatMetas -syntax match muttrcOptSimplePat contained skipwhite /[^~=%!(^].*/ contains=muttrcRXString -syntax region muttrcOptPattern contained matchgroup=Type keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcOptSimplePat,muttrcUnHighlightSpace nextgroup=muttrcString,muttrcStringNL -syntax region muttrcOptPattern contained matchgroup=Type keepend skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcOptSimplePat,muttrcUnHighlightSpace nextgroup=muttrcString,muttrcStringNL -syntax region muttrcOptPattern contained keepend skipwhite start=+[~](+ end=+)+ skip=+\\)+ contains=muttrcSimplePat nextgroup=muttrcString,muttrcStringNL -syntax match muttrcOptPattern contained skipwhite /[~][A-Za-z]/ contains=muttrcSimplePat nextgroup=muttrcString,muttrcStringNL -syntax match muttrcOptPattern contained skipwhite /[.]/ nextgroup=muttrcString,muttrcStringNL -" Keep muttrcPattern and muttrcOptPattern synchronized -syntax region muttrcPattern contained matchgroup=Type keepend skipwhite start=+"+ skip=+\\"+ end=+"+ contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas -syntax region muttrcPattern contained matchgroup=Type keepend skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas -syntax region muttrcPattern contained keepend skipwhite start=+[~](+ end=+)+ skip=+\\)+ contains=muttrcSimplePat -syntax match muttrcPattern contained skipwhite /[~][A-Za-z]/ contains=muttrcSimplePat -syntax match muttrcPattern contained skipwhite /[.]/ -syntax region muttrcPatternInner contained keepend start=+"[~=%!(^]+ms=s+1 skip=+\\"+ end=+"+me=e-1 contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas -syntax region muttrcPatternInner contained keepend start=+'[~=%!(^]+ms=s+1 skip=+\\'+ end=+'+me=e-1 contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas - -" Colour definitions takes object, foreground and background arguments (regexps excluded). -syntax match muttrcColorMatchCount contained "[0-9]\+" -syntax match muttrcColorMatchCountNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL -syntax region muttrcColorRXPat contained start=+\s*'+ skip=+\\'+ end=+'\s*+ keepend skipwhite contains=muttrcRXString2 nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL -syntax region muttrcColorRXPat contained start=+\s*"+ skip=+\\"+ end=+"\s*+ keepend skipwhite contains=muttrcRXString2 nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL -syntax keyword muttrcColor contained black blue cyan default green magenta red white yellow -syntax keyword muttrcColor contained brightblack brightblue brightcyan brightdefault brightgreen brightmagenta brightred brightwhite brightyellow -syntax match muttrcColor contained "\<\%(bright\)\=color\d\{1,3}\>" -" Now for the structure of the color line -syntax match muttrcColorRXNL contained skipnl "\s*\\$" nextgroup=muttrcColorRXPat,muttrcColorRXNL -syntax match muttrcColorBG contained /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorRXPat,muttrcColorRXNL -syntax match muttrcColorBGNL contained skipnl "\s*\\$" nextgroup=muttrcColorBG,muttrcColorBGNL -syntax match muttrcColorFG contained /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorBG,muttrcColorBGNL -syntax match muttrcColorFGNL contained skipnl "\s*\\$" nextgroup=muttrcColorFG,muttrcColorFGNL -syntax match muttrcColorContext contained /\s*[$]\?\w\+/ contains=muttrcColorField,muttrcVariable,muttrcUnHighlightSpace,muttrcColorCompose nextgroup=muttrcColorFG,muttrcColorFGNL -syntax match muttrcColorNL contained skipnl "\s*\\$" nextgroup=muttrcColorContext,muttrcColorNL,muttrcColorCompose -syntax match muttrcColorKeyword contained /^\s*color\s\+/ nextgroup=muttrcColorContext,muttrcColorNL,muttrcColorCompose -" And now color's brother: -syntax region muttrcUnColorPatterns contained skipwhite start=+\s*'+ end=+'+ skip=+\\'+ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL -syntax region muttrcUnColorPatterns contained skipwhite start=+\s*"+ end=+"+ skip=+\\"+ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL -syntax match muttrcUnColorPatterns contained skipwhite /\s*[^'"\s]\S\*/ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL -syntax match muttrcUnColorPatNL contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL -syntax match muttrcUnColorAll contained skipwhite /[*]/ -syntax match muttrcUnColorAPNL contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorPatterns,muttrcUnColorAll,muttrcUnColorAPNL -syntax match muttrcUnColorIndex contained skipwhite /\s*index\s\+/ nextgroup=muttrcUnColorPatterns,muttrcUnColorAll,muttrcUnColorAPNL -syntax match muttrcUnColorIndexNL contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorIndex,muttrcUnColorIndexNL -syntax match muttrcUnColorKeyword contained skipwhite /^\s*uncolor\s\+/ nextgroup=muttrcUnColorIndex,muttrcUnColorIndexNL -syntax region muttrcUnColorLine keepend start=+^\s*uncolor\s+ skip=+\\$+ end=+$+ contains=muttrcUnColorKeyword,muttrcComment,muttrcUnHighlightSpace - -syntax keyword muttrcMonoAttrib contained bold none normal reverse standout underline -syntax keyword muttrcMono contained mono skipwhite nextgroup=muttrcColorField,muttrcColorCompose -syntax match muttrcMonoLine "^\s*mono\s\+\S\+" skipwhite nextgroup=muttrcMonoAttrib contains=muttrcMono - -" CHECKED 2018-04-18 -" List of fields in Fields in color.c -syntax keyword muttrcColorField skipwhite contained - \ attachment attach_headers body bold error hdrdefault header index - \ index_author index_collapsed index_date index_flags index_label - \ index_number index_size index_subject index_tag index_tags indicator - \ markers message normal progress prompt quoted search sidebar_divider - \ sidebar_flagged sidebar_highlight sidebar_indicator sidebar_new - \ sidebar_ordinary sidebar_spoolfile signature status tilde tree underline - \ nextgroup=muttrcColor -syntax match muttrcColorField contained "\" - -syntax match muttrcColorCompose skipwhite contained /\s*compose\s*/ nextgroup=muttrcColorComposeField - -" CHECKED 2018-04-18 -" List of fields in ComposeFields in color.c -syntax keyword muttrcColorComposeField skipwhite contained - \ header security_both security_encrypt security_none security_sign - \ nextgroup=muttrcColorFG,muttrcColorFGNL -syntax region muttrcColorLine keepend start=/^\s*color\s\+/ skip=+\\$+ end=+$+ contains=muttrcColorKeyword,muttrcComment,muttrcUnHighlightSpace - - -function! s:boolQuadGen(type, vars, deprecated) - let l:novars = copy(a:vars) - call map(l:novars, '"no" . v:val') - let l:invvars = copy(a:vars) - call map(l:invvars, '"inv" . v:val') - - let l:orig_type = copy(a:type) - if a:deprecated - let l:type = 'Deprecated' . a:type - else - let l:type = a:type - endif - - exec 'syntax keyword muttrcVar' . l:type . ' skipwhite contained ' . join(a:vars) . ' nextgroup=muttrcSet' . l:orig_type . 'Assignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr' - exec 'syntax keyword muttrcVar' . l:type . ' skipwhite contained ' . join(l:novars) . ' nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr' - exec 'syntax keyword muttrcVar' . l:type . ' skipwhite contained ' . join(l:invvars) . ' nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr' -endfunction - -" CHECKED 2018-04-18 -" List of DT_BOOL in MuttVars in init.h -call s:boolQuadGen('Bool', [ - \ 'allow_8bit', 'allow_ansi', 'arrow_cursor', 'ascii_chars', 'askbcc', - \ 'askcc', 'ask_follow_up', 'ask_x_comment_to', 'attach_split', 'autoedit', - \ 'auto_tag', 'beep', 'beep_new', 'bounce_delivered', 'braille_friendly', - \ 'change_folder_next', 'check_mbox_size', 'check_new', 'collapse_all', - \ 'collapse_flagged', 'collapse_unread', 'confirmappend', 'confirmcreate', - \ 'crypt_autoencrypt', 'crypt_autopgp', 'crypt_autosign', 'crypt_autosmime', - \ 'crypt_confirmhook', 'crypt_opportunistic_encrypt', 'crypt_replyencrypt', - \ 'crypt_replysign', 'crypt_replysignencrypted', 'crypt_timestamp', - \ 'crypt_use_gpgme', 'crypt_use_pka', 'delete_untag', 'digest_collapse', - \ 'duplicate_threads', 'edit_headers', 'encode_from', 'fast_reply', - \ 'fcc_clear', 'flag_safe', 'followup_to', 'force_name', 'forward_decode', - \ 'forward_decrypt', 'forward_quote', 'forward_references', 'hdrs', - \ 'header', 'header_cache_compress', 'header_color_partial', 'help', - \ 'hidden_host', 'hide_limited', 'hide_missing', 'hide_thread_subject', - \ 'hide_top_limited', 'hide_top_missing', 'history_remove_dups', - \ 'honor_disposition', 'idn_decode', 'idn_encode', 'ignore_list_reply_to', - \ 'imap_check_subscribed', 'imap_idle', 'imap_list_subscribed', - \ 'imap_passive', 'imap_peek', 'imap_servernoise', 'implicit_autoview', - \ 'include_onlyfirst', 'keep_flagged', 'mailcap_sanitize', - \ 'maildir_check_cur', 'maildir_header_cache_verify', 'maildir_trash', - \ 'mail_check_recent', 'mail_check_stats', 'markers', 'mark_old', - \ 'menu_move_off', 'menu_scroll', 'message_cache_clean', 'meta_key', - \ 'metoo', 'mh_purge', 'mime_forward_decode', 'mime_subject', - \ 'mime_type_query_first', 'narrow_tree', 'nm_record', 'nntp_listgroup', - \ 'nntp_load_description', 'pager_stop', 'pgp_autoinline', - \ 'pgp_auto_decode', 'pgp_check_exit', 'pgp_ignore_subkeys', 'pgp_long_ids', - \ 'pgp_replyinline', 'pgp_retainable_sigs', 'pgp_self_encrypt', - \ 'pgp_show_unusable', 'pgp_strict_enc', 'pgp_use_gpg_agent', 'pipe_decode', - \ 'pipe_split', 'pop_auth_try_all', 'pop_last', 'postpone_encrypt', - \ 'print_decode', 'print_split', 'prompt_after', 'read_only', - \ 'reflow_space_quotes', 'reflow_text', 'reply_self', 'reply_with_xorig', - \ 'resolve', 'resume_draft_files', 'resume_edited_draft_files', - \ 'reverse_alias', 'reverse_name', 'reverse_realname', 'rfc2047_parameters', - \ 'save_address', 'save_empty', 'save_name', 'save_unsubscribed', 'score', - \ 'show_new_news', 'show_only_unread', 'sidebar_folder_indent', - \ 'sidebar_new_mail_only', 'sidebar_next_new_wrap', 'sidebar_on_right', - \ 'sidebar_short_path', 'sidebar_visible', 'sig_dashes', 'sig_on_top', - \ 'smart_wrap', 'smime_ask_cert_label', 'smime_decrypt_use_default_key', - \ 'smime_is_default', 'smime_self_encrypt', 'sort_re', 'ssl_force_tls', - \ 'ssl_usesystemcerts', 'ssl_use_sslv2', 'ssl_use_sslv3', 'ssl_use_tlsv1', - \ 'ssl_use_tlsv1_1', 'ssl_use_tlsv1_2', 'ssl_verify_dates', - \ 'ssl_verify_host', 'ssl_verify_partial_chains', 'status_on_top', - \ 'strict_threads', 'suspend', 'text_flowed', 'thorough_search', - \ 'thread_received', 'tilde', 'ts_enabled', 'uncollapse_jump', - \ 'uncollapse_new', 'user_agent', 'use_8bitmime', 'use_domain', - \ 'use_envelope_from', 'use_from', 'use_ipv6', 'virtual_spoolfile', - \ 'wait_key', 'weed', 'wrap_search', 'write_bcc', 'x_comment_to' - \ ], 0) - -" CHECKED 2018-04-18 -" Deprecated Bools -" List of DT_SYNONYM synonyms of Bools in MuttVars in init.h -call s:boolQuadGen('Bool', [ - \ 'edit_hdrs', 'envelope_from', 'forw_decode', 'forw_decrypt', - \ 'forw_quote', 'ignore_linear_white_space', 'pgp_autoencrypt', - \ 'pgp_autosign', 'pgp_auto_traditional', 'pgp_create_traditional', - \ 'pgp_replyencrypt', 'pgp_replysign', 'pgp_replysignencrypted', - \ 'xterm_set_titles' - \ ], 1) - -" CHECKED 2018-04-18 -" List of DT_QUAD in MuttVars in init.h -call s:boolQuadGen('Quad', [ - \ 'abort_noattach', 'abort_nosubject', 'abort_unmodified', 'bounce', - \ 'catchup_newsgroup', 'copy', 'crypt_verify_sig', 'delete', 'fcc_attach', - \ 'followup_to_poster', 'forward_edit', 'honor_followup_to', 'include', - \ 'mime_forward', 'mime_forward_rest', 'move', 'pgp_mime_auto', - \ 'pop_delete', 'pop_reconnect', 'postpone', 'post_moderated', 'print', - \ 'quit', 'recall', 'reply_to', 'ssl_starttls' - \ ], 0) - -" CHECKED 2018-04-18 -" Deprecated Quads -" List of DT_SYNONYM synonyms of Quads in MuttVars in init.h -call s:boolQuadGen('Quad', [ - \ 'mime_fwd', 'pgp_encrypt_self', 'pgp_verify_sig', 'smime_encrypt_self' - \ ], 1) - -" CHECKED 2018-04-18 -" List of DT_NUMBER in MuttVars in init.h -syntax keyword muttrcVarNum skipwhite contained - \ connect_timeout debug_level history imap_keepalive imap_pipeline_depth - \ imap_poll_timeout mail_check mail_check_stats_interval menu_context - \ net_inc nm_db_limit nm_open_timeout nm_query_window_current_position - \ nm_query_window_duration nntp_context nntp_poll pager_context - \ pager_index_lines pgp_timeout pop_checkinterval read_inc reflow_wrap - \ save_history score_threshold_delete score_threshold_flag - \ score_threshold_read search_context sendmail_wait sidebar_component_depth - \ sidebar_width skip_quoted_offset sleep_time smime_timeout - \ ssl_min_dh_prime_bits timeout time_inc wrap wrap_headers write_inc - \ nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax keyword muttrcVarDeprecatedNum contained skipwhite - \ wrapmargin - \ nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr - -" CHECKED 2018-04-18 -" List of DT_STRING in MuttVars in init.h -" Special cases first, and all the rest at the end -" Formats themselves must be updated in their respective groups -" See s:escapesConditionals -syntax match muttrcVarStr contained skipwhite 'my_[a-zA-Z0-9_]\+' nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax keyword muttrcVarStr contained skipwhite alias_format nextgroup=muttrcVarEqualsAliasFmt -syntax keyword muttrcVarStr contained skipwhite attach_format nextgroup=muttrcVarEqualsAttachFmt -syntax keyword muttrcVarStr contained skipwhite compose_format nextgroup=muttrcVarEqualsComposeFmt -syntax keyword muttrcVarStr contained skipwhite folder_format vfolder_format nextgroup=muttrcVarEqualsFolderFmt -syntax keyword muttrcVarStr contained skipwhite attribution index_format message_format pager_format nextgroup=muttrcVarEqualsIdxFmt -" Deprecated format -syntax keyword muttrcVarDeprecatedStr contained skipwhite hdr_format msg_format nextgroup=muttrcVarEqualsIdxFmt -syntax keyword muttrcVarStr contained skipwhite mix_entry_format nextgroup=muttrcVarEqualsMixFmt -syntax keyword muttrcVarStr contained skipwhite - \ pgp_clearsign_command pgp_decode_command pgp_decrypt_command - \ pgp_encrypt_only_command pgp_encrypt_sign_command pgp_export_command - \ pgp_import_command pgp_list_pubring_command pgp_list_secring_command - \ pgp_sign_command pgp_verify_command pgp_verify_key_command - \ nextgroup=muttrcVarEqualsPGPCmdFmt -syntax keyword muttrcVarStr contained skipwhite pgp_entry_format nextgroup=muttrcVarEqualsPGPFmt -syntax keyword muttrcVarStr contained skipwhite pgp_getkeys_command nextgroup=muttrcVarEqualsPGPGetKeysFmt -syntax keyword muttrcVarStr contained skipwhite query_format nextgroup=muttrcVarEqualsQueryFmt -syntax keyword muttrcVarStr contained skipwhite - \ smime_decrypt_command smime_encrypt_command smime_get_cert_command - \ smime_get_cert_email_command smime_get_signer_cert_command - \ smime_import_cert_command smime_pk7out_command smime_sign_command - \ smime_verify_command smime_verify_opaque_command - \ nextgroup=muttrcVarEqualsSmimeFmt -syntax keyword muttrcVarStr contained skipwhite ts_icon_format ts_status_format status_format nextgroup=muttrcVarEqualsStatusFmt -" Deprecated format -syntax keyword muttrcVarDeprecatedStr contained skipwhite xterm_icon xterm_title nextgroup=muttrcVarEqualsStatusFmt -syntax keyword muttrcVarStr contained skipwhite date_format nextgroup=muttrcVarEqualsStrftimeFmt -syntax keyword muttrcVarStr contained skipwhite group_index_format nextgroup=muttrcVarEqualsGrpIdxFmt -syntax keyword muttrcVarStr contained skipwhite sidebar_format nextgroup=muttrcVarEqualsSdbFmt -syntax keyword muttrcVarStr contained skipwhite - \ assumed_charset attach_charset attach_sep attribution_locale charset - \ config_charset content_type default_hook dsn_notify dsn_return - \ empty_subject escape forward_attribution_intro forward_attribution_trailer - \ forward_format header_cache_pagesize hidden_tags hostname - \ imap_authenticators imap_delim_chars imap_headers imap_login imap_pass - \ imap_user indent_string mailcap_path mark_macro_prefix mh_seq_flagged - \ mh_seq_replied mh_seq_unseen mime_type_query_command newsgroups_charset - \ news_server nm_default_uri nm_exclude_tags nm_query_type - \ nm_query_window_current_search nm_query_window_timebase nm_record_tags - \ nm_unread_tag nntp_authenticators nntp_pass nntp_user pgp_default_key - \ pgp_sign_as pipe_sep pop_authenticators pop_host pop_pass pop_user - \ postpone_encrypt_as post_indent_string preconnect realname send_charset - \ show_multipart_alternative sidebar_delim_chars sidebar_divider_char - \ sidebar_indent_string simple_search smime_default_key smime_encrypt_with - \ smime_sign_as smime_sign_digest_alg smtp_authenticators smtp_pass smtp_url - \ spam_separator ssl_ciphers tunnel - \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -" Deprecated strings -syntax keyword muttrcVarDeprecatedStr contained skipwhite - \ forw_format indent_str pgp_self_encrypt_as post_indent_str - \ smime_self_encrypt_as - \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr - -" CHECKED 2018-04-18 -" List of DT_ADDRESS -syntax keyword muttrcVarStr contained skipwhite envelope_from_address from nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -" List of DT_HCACHE -syntax keyword muttrcVarStr contained skipwhite header_cache_backend nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -" List of DT_MAGIC -syntax keyword muttrcVarStr contained skipwhite mbox_type nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -" List of DT_MBTABLE -syntax keyword muttrcVarStr contained skipwhite flag_chars from_chars status_chars to_chars nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr - -" CHECKED 2018-04-18 -" List of DT_PATH -syntax keyword muttrcVarStr contained skipwhite - \ alias_file certificate_file debug_file display_filter editor entropy_file - \ folder header_cache history_file inews ispell mbox message_cachedir mixmaster - \ new_mail_command news_cache_dir newsrc pager postponed print_command - \ query_command record sendmail shell signature smime_ca_location - \ smime_certificates smime_keys spoolfile ssl_ca_certificates_file - \ ssl_client_cert tmpdir trash visual - \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr - -" CHECKED 2018-04-18 -" List of DT_REGEX -syntax keyword muttrcVarStr contained skipwhite - \ abort_noattach_regex gecos_mask mask pgp_decryption_okay pgp_good_sign - \ quote_regex reply_regex smileys - \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -" List of deprecated DT_PATH -syntax keyword muttrcVarDeprecatedStr contained skipwhite print_cmd nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -" List of deprecated DT_REGEX -syntax keyword muttrcVarDeprecatedStr contained skipwhite abort_noattach_regexp attach_keyword quote_regexp reply_regexp nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -" List of DT_SORT -syntax keyword muttrcVarStr contained skipwhite - \ pgp_sort_keys sidebar_sort_method sort sort_alias sort_aux sort_browser - \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr - -" CHECKED 2018-04-18 -" List of commands in Commands in init.h -" Remember to remove hooks, they have already been dealt with -syntax keyword muttrcCommand skipwhite charset-hook nextgroup=muttrcRXString -syntax keyword muttrcCommand skipwhite unhook nextgroup=muttrcHooks -syntax keyword muttrcCommand skipwhite spam nextgroup=muttrcSpamPattern -syntax keyword muttrcCommand skipwhite nospam nextgroup=muttrcNoSpamPattern -syntax keyword muttrcCommand skipwhite bind nextgroup=muttrcBindMenuList,muttrcBindMenuListNL -syntax keyword muttrcCommand skipwhite macro nextgroup=muttrcMacroMenuList,muttrcMacroMenuListNL -syntax keyword muttrcCommand skipwhite alias nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL -syntax keyword muttrcCommand skipwhite unalias nextgroup=muttrcUnAliasKey,muttrcUnAliasNL -syntax keyword muttrcCommand skipwhite set unset reset toggle nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -syntax keyword muttrcCommand skipwhite exec nextgroup=muttrcFunction -syntax keyword muttrcCommand skipwhite - \ alternative_order attachments auto_view finish hdr_order ifdef ifndef - \ ignore lua lua-source mailboxes mailto_allow mime_lookup my_hdr push score - \ setenv sidebar_whitelist source subjectrx subscribe-to tag-formats - \ tag-transforms unalternative_order unattachments unauto_view uncolor - \ unhdr_order unignore unmailboxes unmailto_allow unmime_lookup unmono - \ unmy_hdr unscore unsetenv unsidebar_whitelist unsubjectrx unsubscribe-from - \ unvirtual-mailboxes virtual-mailboxes - -" CHECKED 2018-04-18 -" List of functions in functions.h -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" -syntax match muttrcFunction contained "\" - - - -" Define the default highlighting. -" Only when an item doesn't have highlighting yet - -highlight def link muttrcComment Comment -highlight def link muttrcEscape SpecialChar -highlight def link muttrcRXChars SpecialChar -highlight def link muttrcString String -highlight def link muttrcRXString String -highlight def link muttrcRXString2 String -highlight def link muttrcSpecial Special -highlight def link muttrcHooks Type -highlight def link muttrcGroupFlag Type -highlight def link muttrcGroupDef Macro -highlight def link muttrcAddrDef muttrcGroupFlag -highlight def link muttrcRXDef muttrcGroupFlag -highlight def link muttrcRXPat String -highlight def link muttrcAliasGroupName Macro -highlight def link muttrcAliasKey Identifier -highlight def link muttrcUnAliasKey Identifier -highlight def link muttrcAliasEncEmail Identifier -highlight def link muttrcAliasParens Type -highlight def link muttrcSetNumAssignment Number -highlight def link muttrcSetBoolAssignment Boolean -highlight def link muttrcSetQuadAssignment Boolean -highlight def link muttrcSetStrAssignment String -highlight def link muttrcEmail Special -highlight def link muttrcVariableInner Special -highlight def link muttrcEscapedVariable String -highlight def link muttrcHeader Type -highlight def link muttrcKeySpecial SpecialChar -highlight def link muttrcKey Type -highlight def link muttrcKeyName SpecialChar -highlight def link muttrcVarBool Identifier -highlight def link muttrcVarQuad Identifier -highlight def link muttrcVarNum Identifier -highlight def link muttrcVarStr Identifier -highlight def link muttrcMenu Identifier -highlight def link muttrcCommand Keyword -highlight def link muttrcMacroDescr String -highlight def link muttrcAction Macro -highlight def link muttrcBadAction Error -highlight def link muttrcBindFunction Error -highlight def link muttrcBindMenuList Error -highlight def link muttrcFunction Macro -highlight def link muttrcGroupKeyword muttrcCommand -highlight def link muttrcGroupLine Error -highlight def link muttrcSubscribeKeyword muttrcCommand -highlight def link muttrcSubscribeLine Error -highlight def link muttrcListsKeyword muttrcCommand -highlight def link muttrcListsLine Error -highlight def link muttrcAlternateKeyword muttrcCommand -highlight def link muttrcAlternatesLine Error -highlight def link muttrcAttachmentsLine muttrcCommand -highlight def link muttrcAttachmentsFlag Type -highlight def link muttrcAttachmentsMimeType String -highlight def link muttrcColorLine Error -highlight def link muttrcColorContext Error -highlight def link muttrcColorContextI Identifier -highlight def link muttrcColorContextH Identifier -highlight def link muttrcColorKeyword muttrcCommand -highlight def link muttrcColorField Identifier -highlight def link muttrcColorCompose Identifier -highlight def link muttrcColorComposeField Identifier -highlight def link muttrcColor Type -highlight def link muttrcColorFG Error -highlight def link muttrcColorFGI Error -highlight def link muttrcColorFGH Error -highlight def link muttrcColorBG Error -highlight def link muttrcColorBGI Error -highlight def link muttrcColorBGH Error -highlight def link muttrcMonoAttrib muttrcColor -highlight def link muttrcMono muttrcCommand -highlight def link muttrcSimplePat Identifier -highlight def link muttrcSimplePatString Macro -highlight def link muttrcSimplePatMetas Special -highlight def link muttrcPattern Error -highlight def link muttrcUnColorLine Error -highlight def link muttrcUnColorKeyword muttrcCommand -highlight def link muttrcUnColorIndex Identifier -highlight def link muttrcShellString muttrcEscape -highlight def link muttrcRXHooks muttrcCommand -highlight def link muttrcRXHookNot Type -highlight def link muttrcPatHooks muttrcCommand -highlight def link muttrcPatHookNot Type -highlight def link muttrcFormatConditionals2 Type -highlight def link muttrcIndexFormatStr muttrcString -highlight def link muttrcIndexFormatEscapes muttrcEscape -highlight def link muttrcIndexFormatConditionals muttrcFormatConditionals2 -highlight def link muttrcAliasFormatStr muttrcString -highlight def link muttrcAliasFormatEscapes muttrcEscape -highlight def link muttrcAttachFormatStr muttrcString -highlight def link muttrcAttachFormatEscapes muttrcEscape -highlight def link muttrcAttachFormatConditionals muttrcFormatConditionals2 -highlight def link muttrcComposeFormatStr muttrcString -highlight def link muttrcComposeFormatEscapes muttrcEscape -highlight def link muttrcFolderFormatStr muttrcString -highlight def link muttrcFolderFormatEscapes muttrcEscape -highlight def link muttrcFolderFormatConditionals muttrcFormatConditionals2 -highlight def link muttrcMixFormatStr muttrcString -highlight def link muttrcMixFormatEscapes muttrcEscape -highlight def link muttrcMixFormatConditionals muttrcFormatConditionals2 -highlight def link muttrcPGPFormatStr muttrcString -highlight def link muttrcPGPFormatEscapes muttrcEscape -highlight def link muttrcPGPFormatConditionals muttrcFormatConditionals2 -highlight def link muttrcPGPCmdFormatStr muttrcString -highlight def link muttrcPGPCmdFormatEscapes muttrcEscape -highlight def link muttrcPGPCmdFormatConditionals muttrcFormatConditionals2 -highlight def link muttrcStatusFormatStr muttrcString -highlight def link muttrcStatusFormatEscapes muttrcEscape -highlight def link muttrcStatusFormatConditionals muttrcFormatConditionals2 -highlight def link muttrcPGPGetKeysFormatStr muttrcString -highlight def link muttrcPGPGetKeysFormatEscapes muttrcEscape -highlight def link muttrcSmimeFormatStr muttrcString -highlight def link muttrcSmimeFormatEscapes muttrcEscape -highlight def link muttrcSmimeFormatConditionals muttrcFormatConditionals2 -highlight def link muttrcTimeEscapes muttrcEscape -highlight def link muttrcPGPTimeEscapes muttrcEscape -highlight def link muttrcStrftimeEscapes Type -highlight def link muttrcStrftimeFormatStr muttrcString -highlight def link muttrcFormatErrors Error - -highlight def link muttrcBindFunctionNL SpecialChar -highlight def link muttrcBindKeyNL SpecialChar -highlight def link muttrcBindMenuListNL SpecialChar -highlight def link muttrcMacroDescrNL SpecialChar -highlight def link muttrcMacroBodyNL SpecialChar -highlight def link muttrcMacroKeyNL SpecialChar -highlight def link muttrcMacroMenuListNL SpecialChar -highlight def link muttrcColorMatchCountNL SpecialChar -highlight def link muttrcColorNL SpecialChar -highlight def link muttrcColorRXNL SpecialChar -highlight def link muttrcColorBGNL SpecialChar -highlight def link muttrcColorFGNL SpecialChar -highlight def link muttrcAliasNameNL SpecialChar -highlight def link muttrcAliasENNL SpecialChar -highlight def link muttrcAliasNL SpecialChar -highlight def link muttrcUnAliasNL SpecialChar -highlight def link muttrcAliasGroupDefNL SpecialChar -highlight def link muttrcAliasEncEmailNL SpecialChar -highlight def link muttrcPatternNL SpecialChar -highlight def link muttrcUnColorPatNL SpecialChar -highlight def link muttrcUnColorAPNL SpecialChar -highlight def link muttrcUnColorIndexNL SpecialChar -highlight def link muttrcStringNL SpecialChar - -highlight def link muttrcVarDeprecatedBool Error -highlight def link muttrcVarDeprecatedQuad Error -highlight def link muttrcVarDeprecatedStr Error - - -let b:current_syntax = "neomuttrc" - -let &cpo = s:cpo_save -unlet s:cpo_save - -" vim: ts=8 noet tw=100 sw=8 sts=0 ft=vim isk+=- diff --git a/.config/nvim/syntax/supercollider.vim b/.config/nvim/syntax/supercollider.vim deleted file mode 100644 index 87c5e4d..0000000 --- a/.config/nvim/syntax/supercollider.vim +++ /dev/null @@ -1,130 +0,0 @@ -" Copyright 2007 Alex Norman -" This file is part of SCVIM. -" -" SCVIM is free software: you can redistribute it and/or modify -" it under the terms of the GNU General Public License as published by -" the Free Software Foundation, either version 3 of the License, or -" (at your option) any later version. -" -" SCVIM is distributed in the hope that it will be useful, -" but WITHOUT ANY WARRANTY; without even the implied warranty of -" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -" GNU General Public License for more details. -" -" You should have received a copy of the GNU General Public License -" along with SCVIM. If not, see . -" -" Vim syntax file -" Language: supercollider -" Maintainer: Stephen Lumenta -" Version: 0.2 -" Last change: 2012-03-31 - -syn clear - -syn match scAoperator "{" -syn match scAoperator "}" - -"syn match scVariable "\%(var.*\)\@<=\(\l\w*\)" "lowercase followed by wordchar -syn match scGlobvariable "\~\l\w*" "~ followed by lowercase followed by wordchar -syn match scVar "\s*var\s" -syn match scVar "\s*classvar\s" -syn match scArg "\s*arg\s" - -" symbols, strings, numbers -syn match scSymbol "\v(\w|\\)@" display -syn match scInteger "\%(\%(\w\|[]})\"']\s*\)\@" display -syn match scInteger "\%(\%(\w\|[]})\"']\s*\)\@" display -syn match scInteger "\%(\%(\w\|[]})\"']\s*\)\@" display -syn match scFloat "\%(\%(\w\|[]})\"']\s*\)\@" display -syn match scFloat "\%(\%(\w\|[]})\"']\s*\)\@" display -syn match scInfinity "inf" - -" keywords -syn match scControl "\<\%(break\|rescue\|return\)\>[?!]\@!" -syn match scKeyword "\<\%(super\|this\|new\|yield\)\>[?!]\@!" -syn match scBoolean "\<\%(true\|false\)\>[?!]\@!" -syn match scControl "\<\%(case\|begin\|do\|forBy\|loop\|if\|while\|else\)\>[?!]\@!" - -" scsynth -syn match scArate "\v\.@<=ar(\w)@!" -syn match scKrate "\v\.@<=kr(\w)@!" - -" operators -syn keyword scUnaryoperator neg reciprocal abs floor ceil frac sign squared cubed sqrt exp midicps cpsmidi midiratio ratiomidi dbamp ampdb octcps cpsoct log log2 log10 sin cos tan asin acos atan sinh cosh tanh distort softclip isPositive isNegative isStrictlyPositive -syn keyword scBinaryoperator min max round trunc atan2 hypot hypotApx ring1 ring2 ring3 ring4 sumsqr difsqr sqrsum sqrdif absdif thresh amclip scaleneg clip2 wrap2 fold2 excess + - * - -syn match scBinaryoperator "+" -syn match scBinaryoperator "-" -syn match scBinaryoperator "*" -syn match scBinaryoperator "/" -syn match scBinaryoperator "%" -syn match scBinaryoperator "\*\*" -syn match scBinaryoperator "<" -syn match scBinaryoperator "<=" -syn match scBinaryoperator ">" -syn match scBinaryoperator "<>" -syn match scBinaryoperator ">=" -syn match scBinaryoperator "=" -syn match scBinaryoperator "==" -syn match scBinaryoperator "===" -syn match scBinaryoperator "!=" -syn match scBinaryoperator "!==" -syn match scBinaryoperator "&" -syn match scBinaryoperator "|" -syn match scBinaryoperator "%artist% - %title%" +form="%artist% - %album%" # END CONFIG ------------------------------------------------ # These are some variables we need for things to work song="$(mpc --format %file% current)" songdir="$music_dir/$(dirname "${song}")/" raw_cover="/tmp/current_cover.png" -heading="$(mpc current -f "%album%" | sed "s:&:&:g")" -message="$(mpc current -f "$form" | sed "s:&:&:g" )" +heading="$(mpc current -f "%title%" | sed "s:&:&:g")" +message="$(mpc current -f "$form" | sed "s:&:&:g")" # Is there music on? [ -z "$song" ] && exit 1 diff --git a/.mozilla/firefox/thsxpwyd.testing-1586723279098/startpage/index.html b/.mozilla/firefox/thsxpwyd.testing-1586723279098/startpage/index.html index ad9ad36..38fff1d 100644 --- a/.mozilla/firefox/thsxpwyd.testing-1586723279098/startpage/index.html +++ b/.mozilla/firefox/thsxpwyd.testing-1586723279098/startpage/index.html @@ -87,7 +87,7 @@
  • Void Packages
  • -
  • Void Wiki
  • +
  • Void Handbook
  • diff --git a/.zshenv b/.zshenv index 1e12b44..db31511 100644 --- a/.zshenv +++ b/.zshenv @@ -9,13 +9,9 @@ export VISUAL="$EDITOR" export GIT_EDITOR="$EDITOR" export TERMINAL="alacritty" export BROWSER="firefox" -export READER="zathura" -export VIDEO="mpv" -export IMAGE="sxiv" export COLORTERM="truecolor" export OPENER="xdg-open" export PAGER="less" -export WM="bspwm" export FILE="lf" export GREP_COLOR="0;32" @@ -31,6 +27,7 @@ export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" export XDG_DATA_HOME="$HOME/.local/share" export XDG_CONFIG_HOME="$HOME/.config" export XDG_CACHE_HOME="$HOME/.cache" +export XINITRC="$XDG_CONFIG_HOME/X11/xinitrc" export ZDOTDIR="$XDG_CONFIG_HOME/zsh" export GPG_TTY=$(tty) diff --git a/doc/xbpaketes b/doc/xbpaketes index 1917322..a55445e 100644 --- a/doc/xbpaketes +++ b/doc/xbpaketes @@ -1,4 +1,5 @@ ImageMagick +SDL-32bit alacritty alsa-firmware alsa-lib-devel @@ -19,11 +20,13 @@ bspwm cadence catgirl chrony +cpupower crispy-doom cryptsetup ctags delta dfc +dracut dunst elogind fd @@ -38,10 +41,12 @@ gcc git git-extras git-libsecret +glibc-32bit gnome-ssh-askpass gnupg2 grub-i386-efi grub-x86_64-efi +gzdoom haveged highlight hsetroot @@ -61,10 +66,14 @@ lf libXft-devel libXinerama-devel libfluidsynth +libjack-32bit +libopenal libressl-devel librsvg librsvg-utils libsndfile-devel +libstdc++-32bit +libva-intel-driver lm_sensors lynx maim @@ -113,6 +122,7 @@ socklog-void sxhkd sxiv texlive-bin +thermald timidity tmux toilet @@ -122,6 +132,7 @@ unclutter-xfixes unrar unzip vice +void-repo-multilib void-repo-nonfree vsv xbacklight @@ -150,5 +161,4 @@ zathura-pdf-mupdf zip zita-ajbridge zsh -zsh-completions zsh-syntax-highlighting