diff --git a/vim/en.utf-8.add b/vim/en.utf-8.add index e1ad53f..feb64ef 100644 --- a/vim/en.utf-8.add +++ b/vim/en.utf-8.add @@ -116,3 +116,4 @@ Cloudflare test When exit +use diff --git a/vim/en.utf-8.add.spl b/vim/en.utf-8.add.spl index c052d9f..3e36b37 100644 Binary files a/vim/en.utf-8.add.spl and b/vim/en.utf-8.add.spl differ diff --git a/vim/rc.d/31.utility-execute.vim b/vim/rc.d/31.utility-execute.vim index 12cd9a3..1b27fed 100644 --- a/vim/rc.d/31.utility-execute.vim +++ b/vim/rc.d/31.utility-execute.vim @@ -26,6 +26,8 @@ function ExecuteCommand(args = '', output = '', flavor = 'shell', syntax = 'bash elseif output == 'split-pane-vertical' execute "botright vertical terminal " . command let &l:syntax=a:syntax + elseif output == 'insert' + execute "read! " . command else execute "!" . command endif @@ -60,7 +62,7 @@ function GetCommandString(args, flavor, output) echom command endif - if stridx(a:output, 'split-pane') == -1 + if a:output == '' let command = "clear; ".command endif diff --git a/vim/rc.d/32.utility-scwrypts.vim b/vim/rc.d/32.utility-scwrypts.vim index d3dd314..0886a0e 100644 --- a/vim/rc.d/32.utility-scwrypts.vim +++ b/vim/rc.d/32.utility-scwrypts.vim @@ -5,7 +5,6 @@ function ExecuteScwrypt(scwrypt = '', args = '', output = '', syntax = 'bash', loglevel = '0') let b:scwryptsPrevArgs = a:args call ExecuteCommand('scwrypts --log-level ' . a:loglevel . ' ' . a:scwrypt . ' -- ' . a:args, a:output, 'shell', a:syntax) - echom 'scwrypts -n ' . a:scwrypt . '--' . a:args endfunction function ExecuteScwryptInteractive(scwrypt = '', args = '', output = '', syntax = 'bash', loglevel = '4') diff --git a/vim/rc.d/41.file-formatting.vim b/vim/rc.d/41.file-formatting.vim index dc5a436..100398c 100644 --- a/vim/rc.d/41.file-formatting.vim +++ b/vim/rc.d/41.file-formatting.vim @@ -24,6 +24,7 @@ augroup forced_filetype_recognition autocmd BufRead,BufNewFile git.conf setfiletype gitconfig autocmd BufRead,BufNewFile */scwrypts/* execute "set filetype=".&filetype.".scwrypts" + autocmd BufRead,BufNewFile *.rs execute "set filetype=rust" let g:tex_flavor = "latex" augroup end diff --git a/vim/rc.d/42.file-execute.vim b/vim/rc.d/42.file-execute.vim index 2a3d866..dc3ccca 100644 --- a/vim/rc.d/42.file-execute.vim +++ b/vim/rc.d/42.file-execute.vim @@ -4,6 +4,9 @@ nnoremap eb :execute b:executeBuild nnoremap ef :execute b:executeFormat nnoremap et :execute b:executeTest +nnoremap i :execute b:executeImport +nnoremap n :execute b:executeNew + " --- (e)xe(c)ute ----------------------------------------------------- " (i)nteractive " (b)uild @@ -18,6 +21,8 @@ augroup file_specific_commands autocmd FileType * let b:executeBuild = "echohl ErrorMsg | echom 'ERROR: no build steps defined' | echohl None" autocmd FileType * let b:executeFormat = "%s/\\s\\+$//" autocmd FileType * let b:executeTest = "echohl ErrorMsg | echom 'ERROR: no test steps defined' | echohl None" + autocmd FileType * let b:executeImport = "echohl ErrorMsg | echom 'ERROR: no import steps defined' | echohl None" + autocmd FileType * let b:executeNew = "echohl ErrorMsg | echom 'ERROR: no new steps defined' | echohl None" autocmd FileType go let b:executeDefault = "!clearq:?GoRun" autocmd FileType go let b:executeFormat = "(go-imports)" @@ -38,14 +43,17 @@ augroup file_specific_commands autocmd FileType yaml let b:executeDefault = 'call ExecuteScwrypt(b:scwryptDefault, b:scwryptArgs . "--raw ", "split-pane-vertical", "yaml")' autocmd FileType yaml let b:executeInteractive = 'call ExecuteScwryptInteractive(b:scwryptDefault, b:scwryptArgs, "split-pane-vertical", "yaml")' autocmd FileType yaml let b:executeBuild = 'call ExecuteScwrypt(b:scwryptBuild, b:scwryptArgs, "split-pane-vertical", "yaml")' - autocmd FileType yaml let b:executeTest = 'call ExecuteScwrypt(b:scwryptDefault, b:scwryptArgs, "split-pane-vertical", "yaml")' + autocmd FileType yaml let b:executeTest = 'call ExecuteScwrypt(b:scwryptDefault, b:scwryptArgs . "--debug --update ", "split-pane-vertical", "yaml")' autocmd FileType rust let b:executeDefault = "call ExecuteCommand('zsh -c \"cd %:p:h; cargo run --quiet\"', 'split-pane-horizontal')" autocmd BufRead,BufNewFile */Cargo.toml let b:executeDefault = "call ExecuteCommand('zsh -c \"cd %:p:h; cargo run --quiet\"', 'split-pane-horizontal')" + autocmd FileType rust let b:executeInteractive = "call ExecuteCommand('zsh -c \"cd %:p:h; cargo run --quiet -- ' . input('cargo run -- ') . '\"', 'split-pane-horizontal')" autocmd BufRead,BufNewFile */Cargo.toml let b:executeInteractive = "call ExecuteCommand('zsh -c \"cd %:p:h; cargo run --quiet -- ' . input('cargo run -- ') . '\"', 'split-pane-horizontal')" + autocmd FileType rust let b:executeBuild = "call ExecuteCommand('zsh -c \"cd %:p:h; cargo build\"', 'split-pane-horizontal')" autocmd BufRead,BufNewFile */Cargo.toml let b:executeBuild = "call ExecuteCommand('zsh -c \"cd %:p:h; cargo build\"', 'split-pane-horizontal')" + autocmd FileType rust let b:executeTest = "call ExecuteCommand('zsh -c \"cd %:p:h; cargo test\"', 'split-pane-horizontal')" autocmd BufRead,BufNewFile */Cargo.toml let b:executeTest = "call ExecuteCommand('zsh -c \"cd %:p:h; cargo test\"', 'split-pane-horizontal')" @@ -60,12 +68,15 @@ augroup file_specific_commands autocmd FileType *.scwrypts let b:scwryptsSubPath = substitute(substitute(expand("%:p"), ".*\.scwrypts/", "", ""), "^".b:scwryptsType."/", "", "") autocmd FileType *.scwrypts let b:scwryptsAutoName = b:scwryptsType . " " . substitute(substitute(b:scwryptsSubPath, ".[a-z]\\+$", "", ""), "/", " ", "g") . " " autocmd FileType *.scwrypts let b:scwryptsPrevArgs = ' ' - autocmd FileType *.scwrypts let b:scwryptsEnvs = split(system('scwrypts --list-envs'), '\n') - autocmd FileType *.scwrypts let b:scwryptsEnvChoices = split(system('echo SCWRYPTS_ENV=; scwrypts --list-envs | awk "{print \"\"NR\". \"\$0}"'), '\n') + + let g:scwryptsEnvs = split(system('scwrypts --list-envs'), '\n') + let g:scwryptsEnvChoices = split(system('echo SCWRYPTS_ENV=; scwrypts --list-envs | awk "{print \"\"NR\". \"\$0}"'), '\n') autocmd FileType *.scwrypts let b:executeDefault = "call ExecuteScwrypt(b:scwryptsAutoName, ' ', 'split-pane-horizontal', 'bash', '4')" autocmd FileType *.scwrypts let b:executeInteractive = "call ExecuteScwryptInteractive(b:scwryptsAutoName, ' ', 'split-pane-horizontal')" - autocmd FileType *.scwrypts let b:executeBuild = "let $SCWRYPTS_ENV=b:scwryptsEnvs[inputlist(b:scwryptsEnvChoices) - 1]" + autocmd FileType *.scwrypts let b:executeBuild = "let $SCWRYPTS_ENV=g:scwryptsEnvs[inputlist(g:scwryptsEnvChoices) - 1]" autocmd FileType *.scwrypts let b:executeTest = "call ExecuteScwrypt(b:scwryptsAutoName, b:scwryptsPrevArgs, 'split-pane-horizontal', 'bash', '4')" + + autocmd BufRead,BufNewFile */*.module.zsh let b:executeNew = "call ExecuteScwrypt('create module template', '--mode stdout', 'insert', '0')" augroup end " }}} diff --git a/vim/rc.d/80.color.vim b/vim/rc.d/80.color.vim index 9caf133..9bb9b84 100644 --- a/vim/rc.d/80.color.vim +++ b/vim/rc.d/80.color.vim @@ -8,13 +8,14 @@ highlight SignColumn ctermbg=NONE guibg=NO highlight LineNr ctermbg=NONE guibg=NONE ctermfg=darkmagenta guifg=darkmagenta highlight SpellBad cterm=bold gui=bold ctermbg=NONE guibg=NONE ctermfg=red guifg=red +highlight SpellCap cterm=undercurl gui=undercurl ctermbg=NONE guibg=NONE ctermfg=darkred guifg=darkred highlight TabLineFill cterm=bold gui=bold ctermbg=NONE guibg=NONE highlight TabLine cterm=NONE gui=NONE ctermbg=NONE guibg=NONE ctermfg=darkgray guifg=darkgray highlight TabLineSel cterm=bold gui=bold ctermbg=NONE guibg=NONE ctermfg=white guifg=white -highlight ALEVirtualTextError cterm=nocombine,italic,undercurl gui=nocombine,italic ctermbg=NONE ctermfg=yellow guibg=NONE guifg=yellow -highlight ALEVirtualTextWarning cterm=nocombine,italic,undercurl gui=nocombine,italic ctermbg=NONE ctermfg=yellow guibg=NONE guifg=yellow -highlight ALEVirtualTextInfo cterm=nocombine,italic,undercurl gui=nocombine,italic ctermbg=NONE ctermfg=yellow guibg=NONE guifg=yellow -highlight ALEVirtualTextStyleError cterm=nocombine,italic,undercurl gui=nocombine,italic ctermbg=NONE ctermfg=yellow guibg=NONE guifg=yellow -highlight ALEVirtualTextStyleWarning cterm=nocombine,italic,undercurl gui=nocombine,italic ctermbg=NONE ctermfg=yellow guibg=NONE guifg=yellow +highlight ALEVirtualTextError cterm=nocombine,italic gui=nocombine,italic ctermbg=NONE ctermfg=yellow guibg=NONE guifg=yellow +highlight ALEVirtualTextWarning cterm=nocombine,italic gui=nocombine,italic ctermbg=NONE ctermfg=yellow guibg=NONE guifg=yellow +highlight ALEVirtualTextInfo cterm=nocombine,italic gui=nocombine,italic ctermbg=NONE ctermfg=yellow guibg=NONE guifg=yellow +highlight ALEVirtualTextStyleError cterm=nocombine,italic gui=nocombine,italic ctermbg=NONE ctermfg=yellow guibg=NONE guifg=yellow +highlight ALEVirtualTextStyleWarning cterm=nocombine,italic gui=nocombine,italic ctermbg=NONE ctermfg=yellow guibg=NONE guifg=yellow