From ac22aabed269649d5f34c876ba1e96f47082bb16 Mon Sep 17 00:00:00 2001 From: Edith Boles Date: Sat, 28 Nov 2026 20:27:58 -0800 Subject: [PATCH] Improve colorscheme support in smaller installations --- .vimrc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.vimrc b/.vimrc index 51ea807..bd998f4 100644 --- a/.vimrc +++ b/.vimrc @@ -8,7 +8,7 @@ let required_exes = ["git", "curl", "wget"] for required_exe in required_exes if executable(required_exe) == 0 - echow("Failed to find " + required_exe) + echom("Failed to find " . required_exe) let libs_avail = 0 endif endfor @@ -71,6 +71,7 @@ set bg=dark colorscheme slate function SetHighlights() + hi StatusLine term=bold,reverse cterm=bold,reverse ctermfg=237 ctermbg=243 hi CursorLineNr term=bold cterm=bold ctermfg=012 gui=bold hi EndOfBuffer ctermfg=bg guifg=#404950 hi ALEError ctermbg=DarkRed @@ -88,7 +89,7 @@ function SetHighlights() hi! def link ALEWarning SpellCap endfunction -call SetHighlights() +autocmd ColorScheme * call SetHighlights() inoremap pumvisible() ? "\" : "\" inoremap pumvisible() ? "\" : "\" @@ -237,16 +238,19 @@ endfor " ================================== " PLUGIN SUPPORT REQUIRED AFTER THIS " ================================== + +if empty(glob("~/.vim/autoload")) + silent execute '!mkdir -p ~/.vim/autoload' + silent execute '!mkdir -p ~/.vim/undodir' + silent execute '!mkdir -p ~/.vim/swapdir' +endif if libs_avail == 0 - echow("Install the above dependencies to access the rest of this .vimrc's features") + echom("Install the above dependencies to access the rest of this .vimrc's features") finish endif if empty(glob("~/.vim/autoload/plug.vim")) - silent execute '!mkdir -p ~/.vim/autoload' - silent execute '!mkdir -p ~/.vim/undodir' - silent execute '!mkdir -p ~/.vim/swapdir' silent execute '!curl -fLo ~/.vim/autoload/plug.vim https://raw.github.com/junegunn/vim-plug/master/plug.vim' let install = 1 endif @@ -311,5 +315,3 @@ autocmd BufEnter *.log setlocal autoread autocmd User LspSetup call LspAddServer(lsp_list) autocmd User LspSetup call LspOptionsSet(lspOpts) autocmd User LspAttached let b:ale_disable_lsp = 1 - -call SetHighlights()