Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. "install the colorschemes you want
  2. call plug#begin('~/.vim/plugged')
  3. Plug 'ErichDonGubler/vim-sublime-monokai' "colorscheme
  4. Plug 'NLKNguyen/papercolor-theme'
  5. call plug#end()
  6.  
  7. " set all the colorscheme options
  8. let g:sublimemonokai_term_italic = 1
  9.  
  10. " set the default colorscheme
  11. colorscheme sublimemonokai
  12.  
  13. " set the colorscheme you want - this can be moved to the function below - but for me this way is more flexible,
  14. " I can change the colorscheme by calling :Dark/:light
  15. " You may want to set the background variable - sublimemonokai sets it programmatically to dark
  16. command DarkTheme colorscheme sublimemonokai
  17. command LightTheme set background=light | colorscheme PaperColor
  18.  
  19. function ToggleColorTheme()
  20. if &background == "dark"
  21. LightTheme
  22. else
  23. DarkTheme
  24. endif
  25. endfunction
  26.  
  27. " call the function on button press
  28. nnoremap <leader>c :call ToggleColorTheme()<CR>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement