Source

vimfiles / plugin / demonstration.vim

The default branch has multiple heads

Full commit
function! s:demonstration_switch()
    if !exists("g:Demonstration_Mode")
        let g:Demonstration_Mode = 0
    endif

    if !exists("g:Demonstration_FontSize")
        let g:Demonstration_FontSize = "h24"
    endif

    if !exists("g:Demonstration_DefaultFont")
        let g:Demonstration_DefaultFont = &guifont
    endif

    if !exists("g:Demonstration_DefaultTransparency")
        let g:Demonstration_DefaultTransparency = &transparency
    endif 

    if g:Demonstration_Mode == 0
        let l:font_name = substitute(&guifont,'\([^:]*\).*','\1','')
        let l:font_name = l:font_name . ":" . g:Demonstration_FontSize
        let &guifont = l:font_name
        let g:Demonstration_Mode = 1
        set transparency=0
    else
        let &guifont = g:Demonstration_DefaultFont
        let g:Demonstration_Mode = 0
        let &transparency = g:Demonstration_DefaultTransparency
    endif
endfunction
command! -nargs=0 Demonstration call s:demonstration_switch()