From a2b24befe0a7c1e5f9d397a0469faf7876db5356 Mon Sep 17 00:00:00 2001 From: Sebastian Burschel Date: Tue, 24 Dec 2019 06:52:41 +0100 Subject: [PATCH] Toggle colorscheme light/dark with "F4". --- dotfiles/.vimrc | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/dotfiles/.vimrc b/dotfiles/.vimrc index df4836f..b98e218 100644 --- a/dotfiles/.vimrc +++ b/dotfiles/.vimrc @@ -40,11 +40,12 @@ call vundle#begin() "Plugin 'vim-syntastic/syntastic' Plugin 'airblade/vim-gitgutter' Plugin 'artur-shaik/vim-javacomplete2' +Plugin 'ctrlpvim/ctrlp.vim' Plugin 'davidhalter/jedi-vim' +Plugin 'dense-analysis/ale' Plugin 'ervandew/supertab' Plugin 'junegunn/vim-peekaboo' Plugin 'keith/swift.vim' -Plugin 'ctrlpvim/ctrlp.vim' Plugin 'LaTeX-Box-Team/LaTeX-Box' Plugin 'mattn/emmet-vim' Plugin 'mattn/webapi-vim' @@ -57,7 +58,6 @@ Plugin 'vim-airline/vim-airline' Plugin 'vim-scripts/TaskList.vim' Plugin 'Vimjas/vim-python-pep8-indent' Plugin 'VundleVim/Vundle.vim' -Plugin 'dense-analysis/ale' " The following are examples of different formats supported. @@ -312,4 +312,19 @@ let g:ale_fixers = {'python': ['isort', 'black'], \'json': ['fixjson'], \'java': ['uncrustify']} + +" colorscheme toggle: + +function! s:SwitchColorscheme() + if g:colors_name == 'darcula' + colorscheme default + else + colorscheme darcula + endif +endfunction +map :call SwitchColorscheme() + + + + colorscheme darcula