[vim] solarized.vim menu updates

This commit is contained in:
Ethan Schoonover 2011-05-09 14:35:32 -07:00
parent 7a7e5c8818
commit 528a59f26d

View file

@ -1027,64 +1027,64 @@ if !exists(":SolarizedOptions")
endif endif
function! SolarizedMenu() function! SolarizedMenu()
if exists("g:loaded_solarized_menu") if exists("g:loaded_solarized_menu")
try try
silent! aunmenu Solarized silent! aunmenu Solarized
endtry endtry
endif endif
let g:loaded_solarized_menu = 1 let g:loaded_solarized_menu = 1
if g:colors_name == "solarized" && g:solarized_menu != 0 if g:colors_name == "solarized" && g:solarized_menu != 0
amenu &Solarized.&Contrast.&Low\ Contrast :let g:solarized_contrast="low" \| colorscheme solarized<CR> amenu &Solarized.&Contrast.&Low\ Contrast :let g:solarized_contrast="low" \| colorscheme solarized<CR>
amenu &Solarized.&Contrast.&Normal\ Contrast :let g:solarized_contrast="normal" \| colorscheme solarized<CR> amenu &Solarized.&Contrast.&Normal\ Contrast :let g:solarized_contrast="normal" \| colorscheme solarized<CR>
amenu &Solarized.&Contrast.&High\ Contrast :let g:solarized_contrast="high" \| colorscheme solarized<CR> amenu &Solarized.&Contrast.&High\ Contrast :let g:solarized_contrast="high" \| colorscheme solarized<CR>
an &Solarized.&Contrast.-sep- <Nop> an &Solarized.&Contrast.-sep- <Nop>
amenu &Solarized.&Contrast.&Help:\ Contrast :help 'solarized_contrast'<CR> amenu &Solarized.&Contrast.&Help:\ Contrast :help 'solarized_contrast'<CR>
amenu &Solarized.&Visibility.&Low\ Visibility :let g:solarized_visibility="low" \| colorscheme solarized<CR> amenu &Solarized.&Visibility.&Low\ Visibility :let g:solarized_visibility="low" \| colorscheme solarized<CR>
amenu &Solarized.&Visibility.&Normal\ Visibility :let g:solarized_visibility="normal" \| colorscheme solarized<CR> amenu &Solarized.&Visibility.&Normal\ Visibility :let g:solarized_visibility="normal" \| colorscheme solarized<CR>
amenu &Solarized.&Visibility.&High\ Visibility :let g:solarized_visibility="high" \| colorscheme solarized<CR> amenu &Solarized.&Visibility.&High\ Visibility :let g:solarized_visibility="high" \| colorscheme solarized<CR>
an &Solarized.&Visibility.-sep- <Nop> an &Solarized.&Visibility.-sep- <Nop>
amenu &Solarized.&Visibility.&Help:\ Visibility :help 'solarized_visibility'<CR> amenu &Solarized.&Visibility.&Help:\ Visibility :help 'solarized_visibility'<CR>
amenu &Solarized.&Background.&Toggle\ Background :ToggleBG<CR> amenu &Solarized.&Background.&Toggle\ Background :ToggleBG<CR>
amenu &Solarized.&Background.&Dark\ Background :set background=dark \| colorscheme solarized<CR> amenu &Solarized.&Background.&Dark\ Background :set background=dark \| colorscheme solarized<CR>
amenu &Solarized.&Background.&Light\ Background :set background=light \| colorscheme solarized<CR> amenu &Solarized.&Background.&Light\ Background :set background=light \| colorscheme solarized<CR>
an &Solarized.&Background.-sep- <Nop> an &Solarized.&Background.-sep- <Nop>
amenu &Solarized.&Background.&Help:\ ToggleBG :help togglebg<CR> amenu &Solarized.&Background.&Help:\ ToggleBG :help togglebg<CR>
if g:solarized_bold==0 | let l:boldswitch="On" | else | let l:boldswitch="Off" | endif if g:solarized_bold==0 | let l:boldswitch="On" | else | let l:boldswitch="Off" | endif
exe "amenu &Solarized.&Styling.&Turn\\ Bold\\ ".l:boldswitch." :let g:solarized_bold=(abs(g:solarized_bold-1)) \\| colorscheme solarized<CR>" exe "amenu &Solarized.&Styling.&Turn\\ Bold\\ ".l:boldswitch." :let g:solarized_bold=(abs(g:solarized_bold-1)) \\| colorscheme solarized<CR>"
if g:solarized_italic==0 | let l:italicswitch="On" | else | let l:italicswitch="Off" | endif if g:solarized_italic==0 | let l:italicswitch="On" | else | let l:italicswitch="Off" | endif
exe "amenu &Solarized.&Styling.&Turn\\ Italic\\ ".l:italicswitch." :let g:solarized_italic=(abs(g:solarized_italic-1)) \\| colorscheme solarized<CR>" exe "amenu &Solarized.&Styling.&Turn\\ Italic\\ ".l:italicswitch." :let g:solarized_italic=(abs(g:solarized_italic-1)) \\| colorscheme solarized<CR>"
if g:solarized_underline==0 | let l:underlineswitch="On" | else | let l:underlineswitch="Off" | endif if g:solarized_underline==0 | let l:underlineswitch="On" | else | let l:underlineswitch="Off" | endif
exe "amenu &Solarized.&Styling.&Turn\\ Underline\\ ".l:underlineswitch." :let g:solarized_underline=(abs(g:solarized_underline-1)) \\| colorscheme solarized<CR>" exe "amenu &Solarized.&Styling.&Turn\\ Underline\\ ".l:underlineswitch." :let g:solarized_underline=(abs(g:solarized_underline-1)) \\| colorscheme solarized<CR>"
amenu &Solarized.&Diff\ Mode.&Low\ Diff\ Mode :let g:solarized_diffmode="low" \| colorscheme solarized<CR> amenu &Solarized.&Diff\ Mode.&Low\ Diff\ Mode :let g:solarized_diffmode="low" \| colorscheme solarized<CR>
amenu &Solarized.&Diff\ Mode.&Normal\ Diff\ Mode :let g:solarized_diffmode="normal" \| colorscheme solarized<CR> amenu &Solarized.&Diff\ Mode.&Normal\ Diff\ Mode :let g:solarized_diffmode="normal" \| colorscheme solarized<CR>
amenu &Solarized.&Diff\ Mode.&High\ Diff\ Mode :let g:solarized_diffmode="high" \| colorscheme solarized<CR> amenu &Solarized.&Diff\ Mode.&High\ Diff\ Mode :let g:solarized_diffmode="high" \| colorscheme solarized<CR>
if g:solarized_hitrail==0 | let l:hitrailswitch="On" | else | let l:hitrailswitch="Off" | endif if g:solarized_hitrail==0 | let l:hitrailswitch="On" | else | let l:hitrailswitch="Off" | endif
exe "amenu &Solarized.&Experimental.&Turn\\ Highlight\\ Trailing\\ Spaces\\ ".l:hitrailswitch." :let g:solarized_hitrail=(abs(g:solarized_hitrail-1)) \\| colorscheme solarized<CR>" exe "amenu &Solarized.&Experimental.&Turn\\ Highlight\\ Trailing\\ Spaces\\ ".l:hitrailswitch." :let g:solarized_hitrail=(abs(g:solarized_hitrail-1)) \\| colorscheme solarized<CR>"
an &Solarized.&Experimental.-sep- <Nop> an &Solarized.&Experimental.-sep- <Nop>
amenu &Solarized.&Experimental.&Help:\ HiTrail :help 'solarized_hitrail'<CR> amenu &Solarized.&Experimental.&Help:\ HiTrail :help 'solarized_hitrail'<CR>
an &Solarized.-sep1- <Nop> an &Solarized.-sep1- <Nop>
amenu &Solarized.&Autogenerate\ options :SolarizedOptions<CR> amenu &Solarized.&Autogenerate\ options :SolarizedOptions<CR>
an &Solarized.-sep2- <Nop> an &Solarized.-sep2- <Nop>
amenu &Solarized.&Help.&Solarized\ Help :help solarized<CR> amenu &Solarized.&Help.&Solarized\ Help :help solarized<CR>
amenu &Solarized.&Help.&Toggle\ Background\ Help :help togglebg<CR> amenu &Solarized.&Help.&Toggle\ Background\ Help :help togglebg<CR>
amenu &Solarized.&Help.&Removing\ This\ Menu :help solarized-menu<CR> amenu &Solarized.&Help.&Removing\ This\ Menu :help solarized-menu<CR>
an 9999.77 &Help.&Solarized\ Colorscheme :help solarized<CR> an 9999.77 &Help.&Solarized\ Colorscheme :help solarized<CR>
an 9999.78 &Help.&Toggle\ Background :help togglebg<CR> an 9999.78 &Help.&Toggle\ Background :help togglebg<CR>
an 9999.79 &Help.-sep3- <Nop> an 9999.79 &Help.-sep3- <Nop>
endif endif
endfunction endfunction
autocmd ColorScheme * if g:colors_name != "solarized" | silent! aunmenu Solarized | else | call SolarizedMenu() | endif autocmd ColorScheme * if g:colors_name != "solarized" | silent! aunmenu Solarized | else | call SolarizedMenu() | endif