Added line number toggle and colorscheme customization

- <leader>n to toggle line numbers
- source ~/.vimcustom (if exists) for custom colorscheme
- disable airline theme (let it inherit from colorscheme
-
This commit is contained in:
2025-04-23 11:26:36 -04:00
parent fe39e86bb5
commit b052f7fa32

32
.vimrc
View File

@@ -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
" <c-x> 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 <leader>f :call fzf#run(fzf#vim#with_preview(fzf#wrap({'source': 'find
" Toggles line wrapping with linebreak enabled when wrapping is turned on with <leader>w
nnoremap <leader>w :execute "if &wrap\n set nowrap\nelse\n set wrap linebreak\nendif"<CR>
" Toggle line numbers
nnoremap <leader>n :set number! relativenumber!<CR>
" ---------------------------------------------------------------------------------------------------------------------
" ==> 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