BIG REFACTOR; PLEASE BE ADVISED

finally going to commit that zshrc refactor

- smolvsdefault on altaria
- i3-utils refactor
- no need for custom scwrypt executable anymore
- time to say goodbye to the old dotwryn.env in favor of the new and improved rc.ds
- vim/rc.d refactor + QuickREPL and QuickCommand replacements for \r and \t
- going to stop tracking Archives explicitly until new hard drive
- tty-colorscheme is now referenced directly
- colorscheme/spring-sunset needed to swap primary/secondary colors for focus in i3 since it was confusing
- setup config no longer needs to create ~/.config/wryn/env.vim; added some dependencies to arch-linux
- switch from dmenu to rofi by default; allow .i3 overrides in colorschemes; tty-colorscheme is now referenced directly
This commit is contained in:
2024-05-07 16:38:40 -06:00
parent 466d4ec77d
commit ad66d50b11
64 changed files with 727 additions and 437 deletions

View File

@ -0,0 +1,59 @@
"
" quickly open a REPL with <Leader>r
"
" tries to guess based on configuration + filetype what repl to use,
" otherwise asks the user to provide the required REPL command
" for the current buffer
"
" always uses the last used REPL type unless specified otherwise
" in the :call arguments
"
let g:quickrepl_commands_by_filetype = {
\ 'python': 'bpython',
\ 'zsh': 'zsh',
\ 'bash': 'bash',
\ 'typescript': 'node',
\ 'javascript': 'node',
\}
let g:quickrepl_output_format_default = 'split-pane-horizontal'
let g:quickrepl_output_format_overrides_by_repl_command = {
\ 'bpython': 'split-pane-vertical',
\ 'node': 'split-pane-vertical',
\ 'zsh': 'split-pane-vertical',
\}
let g:quickrepl_repl_command_args_by_repl_command= {
\ 'zsh': '-l',
\}
function QuickREPL(repl = '')
let l:repl = a:repl
if ( l:repl == '' )
let l:repl = get(b:, 'quick_repl', '')
endif
if ( l:repl == '' )
let l:repl = get(g:quickrepl_commands_by_filetype, &filetype, '')
endif
if ( l:repl == '' )
let l:repl = input('input a repl command : ') | redraw
endif
if ( l:repl == '' )
echohl DiffDelete | echo "no command supplied; canceled REPL execution" | echohl None
return
endif
let b:quick_repl = l:repl
let l:output = get(g:quickrepl_output_format_overrides_by_repl_command, l:repl, g:quickrepl_output_format_default)
let l:repl_args = get(g:quickrepl_repl_command_args, l:repl, '')
call ExecuteCommand(l:repl . ' ' . l:repl_args, l:output)
endfunction
nnoremap <Leader>r :call QuickREPL()<CR>