From b052f7fa32709c3076212cb168a01c177b480cbc Mon Sep 17 00:00:00 2001 From: "chawley (overlook)" Date: Wed, 23 Apr 2025 11:26:36 -0400 Subject: [PATCH] Added line number toggle and colorscheme customization - n to toggle line numbers - source ~/.vimcustom (if exists) for custom colorscheme - disable airline theme (let it inherit from colorscheme - --- .vimrc | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/.vimrc b/.vimrc index 76f4cfb..6a62e86 100644 --- a/.vimrc +++ b/.vimrc @@ -129,6 +129,7 @@ Plug 'bullets-vim/bullets.vim' Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' + call plug#end() " --------------------------------------------------------------------------------------------------------------------- @@ -163,7 +164,8 @@ let g:bullets_outline_levels = ['num', 'abc', 'std*', 'std+', 'std-'] "vim-airline let g:airline#extensions#tabline#enabled = 1 -let g:airline_theme = 'angr' +let g:airline_detect_theme_from_guicolors = 1 +"let g:airline_theme = 'angr' " FZF Actions " to open FZF result in a split @@ -177,17 +179,9 @@ let g:fzf_action = { " --------------------------------------------------------------------------------------------------------------------- " ==> Colors " Term GUI Colors -" Testing different colorschemes -" Only the last uncommented colorscheme will be used -" This is typically a history of the schemes I've used -"colorscheme slate -"colorscheme marklar -"colorscheme automation -"colorscheme advantage -"colorscheme industry -"colorscheme industrial -"colorscheme jelleybeans -colorscheme darkburn +" colorscheme replaced by ~/.vimcustom +" If there is a file at ~/.vimcustom, the colorscheme defined in that file +" will be applied. If not, colorscheme defaults to 'darkburn' " cursorcolumn hi cursorcolumn cterm=NONE ctermbg=black ctermfg=white @@ -261,6 +255,9 @@ nnoremap f :call fzf#run(fzf#vim#with_preview(fzf#wrap({'source': 'find " Toggles line wrapping with linebreak enabled when wrapping is turned on with w nnoremap w :execute "if &wrap\n set nowrap\nelse\n set wrap linebreak\nendif" +" Toggle line numbers +nnoremap n :set number! relativenumber! + " --------------------------------------------------------------------------------------------------------------------- " ==> Keymaps: Text bubbling (http://vimcasts.org/episodes/bubbling-text/) @@ -390,3 +387,14 @@ autocmd FileType netrw setl bufhidden=delete " autocmd BufNewFile,BufReadPost *.{yaml,yml} set filetype=yaml foldmethod=indent autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab + +" --------------------------------------------------------------------------------------------------------------------- +" ==> Source Local Customizations and Set Colorscheme + +let s:custom_config_path = expand('$HOME/.vimcustom') + +if filereadable(s:custom_config_path) + execute 'source' fnameescape(s:custom_config_path) +else + colorscheme darkburn +endif