Skip to content

Instantly share code, notes, and snippets.

@zanshin
Last active March 29, 2018 02:39
Show Gist options
  • Save zanshin/3dbf56b0ac58bdb3380b66ccc4b86656 to your computer and use it in GitHub Desktop.
Save zanshin/3dbf56b0ac58bdb3380b66ccc4b86656 to your computer and use it in GitHub Desktop.
Base16 color switcher for Neovim
if !exists('g:colors_name') || g:colors_name != 'base16-chalk'
colorscheme base16-chalk
endif
" Base16 setup
function s:CheckColorScheme()
colorscheme base16-default-dark
if filereadable("~/.config/nvim/.nvim_background")
let base16colorspace=256
source ~/.config/nvim/.nvim_background
endif
endfunction
" if v:progname !=# 'vi'
if has('autocmd')
augroup MyAutocolor
autocmd!
autocmd FocusGained * call s:CheckColorScheme()
augroup END
endif
" call s:CheckColorScheme()
" endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment