Commits

Takahiro MINAMI committed 234ecf1

Add Demonstration.vim

  • Participants
  • Parent commits e1b9d17

Comments (0)

Files changed (6)

 elseif has('mac')
     source $HOME/.vimrc
     set guifont=Ricty_for_Powerline:h16
-    set linespace=2
+    set linespace=3
     set columns=180
     set lines=35
     set cmdheight=2
     set transparency=10
-    " ShowMode定義
-    let g:showmode="coding"
-    let g:thumbsmode="coding"
-    function! ShowMode()
-        if(g:showmode == "coding")
-            set guifont=Ricty_for_Powerline:h26
-                set transparency=0
-                set linespace=-1
-                set fuoptions=maxvert,maxhorz
-                au GUIEnter * set fullscreen
-                let g:showmode="show"
-            else
-                set guifont=Ricty_for_Powerline:h16
-                set linespace=3
-                set transparency=10
-                set fuoptions=maxvert,maxhorz
-                au GUIEnter * set fullscreen
-                let g:showmode="coding"
-        endif
-    endfunction
-
-    nmap <F12> :call ShowMode()<CR>
-
-
-
+    nmap <F12> :Demonstration<CR>
     set fuoptions=maxvert,maxhorz
     au GUIEnter * set fullscreen
+    let g:Demonstration_FontSize = "h30"
+    :ShowMarksToggle
 
 endif
 
 set formatoptions+=mM
 set shellslash " Windowsでもパスを/で扱えるように
 set laststatus=2
-set showtabline=0 " タブバーを常に非表示
+set showtabline=1 " タブバーを必要なときだけ表示
 
 let g:Powerline_symbols = 'fancy'
 

File icons/error.png

Old
Old image
New
New image

File icons/star.png

Removed
Old image

File icons/warning.png

Old
Old image
New
New image

File plugin/demonstration.vim

+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()