Add vim function to edit current color scheme

This commit is contained in:
Michael Campagnaro 2022-11-29 22:33:10 -05:00
parent 7f121ab292
commit 4238273951

14
vimrc
View File

@ -25,7 +25,7 @@ filetype off
" Store the current system name so that we can conditionally set configs for " Store the current system name so that we can conditionally set configs for
" different platforms " different platforms
let s:uname = system("echo -n \"$(uname)\"") let s:uname = system("echo -n \"$(uname)\"")
let s:vim_dir = $HOME . "/.vim" let g:vim_dir = $HOME . "/.vim"
let mapleader="," let mapleader=","
function! IsWindows() function! IsWindows()
@ -1041,6 +1041,18 @@ else
endif endif
" Open the current color scheme for editing.
function! EditColorScheme()
let l:path = g:vim_dir . '/colors/' . s:theme . '.vim'
if filereadable(l:path)
execute 'vsplit ' . l:path
else
call PrintError("Failed to open " . l:path . " for editing.")
endif
endfunction
command -nargs=0 EditColorScheme call EditColorScheme()
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" HIGHLIGHTS - TODO, NOTE, FIXME, etc " HIGHLIGHTS - TODO, NOTE, FIXME, etc
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""