Add vim function to edit current color scheme
This commit is contained in:
parent
7f121ab292
commit
4238273951
14
vimrc
14
vimrc
|
@ -25,7 +25,7 @@ filetype off
|
|||
" Store the current system name so that we can conditionally set configs for
|
||||
" different platforms
|
||||
let s:uname = system("echo -n \"$(uname)\"")
|
||||
let s:vim_dir = $HOME . "/.vim"
|
||||
let g:vim_dir = $HOME . "/.vim"
|
||||
let mapleader=","
|
||||
|
||||
function! IsWindows()
|
||||
|
@ -1041,6 +1041,18 @@ else
|
|||
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
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
|
Loading…
Reference in New Issue
Block a user