vim9script # termguicolors support if !has('win32') && !has('gui_running') && $TERM !~ 'xterm' && has('termguicolors') &t_8f = "\[38;2;%lu;%lu;%lum" &t_8b = "\[48;2;%lu;%lu;%lum" endif set termguicolors if !has("gui_running") augroup group_name | au! au Colorscheme nod hi Normal ctermbg=NONE guibg=NONE augroup END endif if has("win32") && has("gui_running") silent! colorscheme nope else silent! colorscheme nod endif # helper commands and mappings to work with vim/colorschemes command! ColoCheck ru colors/tools/check_colors.vim command! ColoMisc tabnew | ru colors/tools/sample_misc.vim command! ColoMess ru colors/tools/sample_messages.vim command! -nargs=1 -complete=color Colo exe "ru legacy_colors/" .. .. ".vim" command! ColoDiff tabnew | ru colors/tools/sample_diff.vim command! ColoQF tabnew | ru colors/tools/sample_quickfix.vim command! ColoTerm tabnew | ru colors/tools/sample_terminal.vim command! ColoWin tabnew | ru colors/tools/sample_windows.vim command! ColoPopu tabnew | \ exe "lcd " .. fnamemodify($MYVIMRC, ":p:h") .. "/pack/ext/start/colorschemes" | \ ru colors/tools/sample_popupmenu.vim command! ColoPopuKind tabnew | \ exe "lcd " .. fnamemodify($MYVIMRC, ":p:h") .. "/pack/ext/start/colorschemes" | \ ru colors/tools/sample_popupmenu_kind.vim command! ColoSpell tabnew | \ exe "lcd " .. fnamemodify($MYVIMRC, ":p:h") .. "/pack/ext/start/colorschemes" | \ ru colors/tools/sample_spell.vim if !has("gui_running") command! Tco leg if &t_Co == 16 | set t_Co=256 | else | set t_Co=16 | endif nnoremap :set notgc:Tco:echo "t_Co =" &t_Co endif