Vim Mode Colorized
- Switches statusbar colors depending on the current vim mode
In settings.json:
You can change the colors to match the theme you use:
"workbench.nvimColorNormal": "#ffc600",
"workbench.nvimColorInsert": "#D32F2F",
"workbench.nvimColorVisual": "#673AB7",
In your vimrc
" THEME CHANGER
function! SetCursorLineNrColorInsert(mode)
" Insert mode: blue
if a:mode == "i"
call VSCodeNotify('nvim-theme.insert')
" Replace mode: red
elseif a:mode == "r"
call VSCodeNotify("nvim-theme.replace")
endif
endfunction
function! SetCursorLineNrColorVisual()
set updatetime=0
call VSCodeNotify('nvim-theme.visual')
endfunction
vnoremap <silent> <expr> <SID>SetCursorLineNrColorVisual SetCursorLineNrColorVisual()
nnoremap <silent> <script> v v<SID>SetCursorLineNrColorVisual
nnoremap <silent> <script> V V<SID>SetCursorLineNrColorVisual
nnoremap <silent> <script> <C-v> <C-v><SID>SetCursorLineNrColorVisual
function! SetCursorLineNrColorVisual()
set updatetime=0
call VSCodeNotify('nvim-theme.visual')
endfunction
vnoremap <silent> <expr> <SID>SetCursorLineNrColorVisual SetCursorLineNrColorVisual()
nnoremap <silent> <script> v v<SID>SetCursorLineNrColorVisual
nnoremap <silent> <script> V V<SID>SetCursorLineNrColorVisual
nnoremap <silent> <script> <C-v> <C-v><SID>SetCursorLineNrColorVisual
augroup CursorLineNrColorSwap
autocmd!
autocmd InsertEnter * call SetCursorLineNrColorInsert(v:insertmode)
autocmd InsertLeave * call VSCodeNotify('nvim-theme.normal')
autocmd CursorHold * call VSCodeNotify('nvim-theme.normal')
augroup END
| |