Vim Tips Wiki

Easily switch between two styles of color scheme

Redirected from VimTip955

1,624pages on
this wiki
Add New Page
Talk0 Share
Tip 955 Printable Monobook Previous Next

created 2005 · complexity basic · author Georg Dahn · version 6.0

Pan Shizhu's color scheme ps_color script#760 supports two styles, a cool (dark) and a warm (light) style. If you want to switch between these styles by just a single key stroke, you may define the following function in your vimrc:

function! s:SwitchPSCStyle()
  if exists('g:psc_style')
    if g:psc_style == 'cool'
      let g:psc_style = 'warm'
    elseif g:psc_style == 'warm'
      let g:psc_style = 'cool'
    let g:psc_style = 'warm'
  colorscheme ps_color
map <silent> <F6> :call <SID>SwitchPSCStyle()<CR>



  • Decide what to do with above SwitchPSCStyle function (is it worth keeping?).
  • Other content that was in this tip has been merged to Switch color schemes. If remove tip 955, replace it with a redirect to 341.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.