Explorar o código

Add vim colorscheme toggles, Merge with statusline.vim

Weiyi Lou %!s(int64=10) %!d(string=hai) anos
pai
achega
126ebb5ba5

+ 52 - 0
vim/settings/colorscheme-statusline.vim

@@ -0,0 +1,52 @@
+""""""""
+"" Colour Scheme
+""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+" Fix wrong background colour in tmux.
+" http://sunaku.github.io/vim-256color-bce.html
+set t_ut=
+
+" Available colour schemes:
+"colorscheme flattened_dark  " Like solarized but easier.
+"colorscheme neonwave
+
+autocmd VimEnter * call NormalPower()
+
+function! NormalPower()
+  set background=dark
+  colorscheme flattened_dark
+  AirlineTheme powerlineish
+  " Fix sign column colour (for vim-signature, syntastic).
+  highlight SignColumn ctermbg=235
+  echo "System at normal power..."
+endfunction
+
+function! UltraPower()
+  set background=light
+  colorscheme neonwave
+  AirlineTheme surarken
+  echo "Ultra Power Level Activated!"
+endfunction
+
+function! MuteSpellCheckHighlights()
+  hi clear SpellBad
+  hi SpellBad cterm=underline
+  " Highlights must be cleared first, or linking will fail.
+  hi clear SpellCap
+  hi link SpellCap SpellBad
+  hi clear SpellLocal
+  hi link SpellLocal SpellBad
+  hi clear SpellRare
+  hi link SpellRare SpellBad
+endfunction
+
+""""""""
+"" Status Line
+""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+set laststatus=2
+set noshowmode " don't show e.g. --INSERT-- with themed status lines.
+
+let g:airline_powerline_fonts = 1
+let g:airline_left_sep=''
+let g:airline_right_sep=''

+ 0 - 27
vim/settings/colorscheme.vim

@@ -1,27 +0,0 @@
-set background=dark
-"let g:solarized_termcolors=256
-"colorscheme solarized
-"colorscheme neonwave
-colorscheme flattened_dark
-
-" Fix wrong background colour in tmux.
-" http://sunaku.github.io/vim-256color-bce.html
-set t_ut=
-
-" Fix sign column colour (e.g. for vim-signature, syntastic).
-highlight SignColumn ctermbg=235
-
-" Mute coloured spell check errors.
-" Note: Highlights must be cleared first, or linking will fail.
-function! MuteSpellCheckHighlights()
-  hi clear SpellBad
-  hi SpellBad cterm=underline
-  hi clear SpellCap
-  hi link SpellCap SpellBad
-  hi clear SpellLocal
-  hi link SpellLocal SpellBad
-  hi clear SpellRare
-  hi link SpellRare SpellBad
-endfunction
-
-"nmap <silent> <F5> :call MuteSpellCheckHighlights()<CR>

+ 0 - 14
vim/settings/statusline.vim

@@ -1,14 +0,0 @@
-set laststatus=2
-set noshowmode " don't show e.g. --INSERT-- with fancy status lines.
-
-" Powerline
-"set rtp+=~/dotfiles/powerline/powerline/powerline/bindings/vim
-
-let g:airline_powerline_fonts = 1
-let g:airline_left_sep=''
-let g:airline_right_sep=''
-
-let g:airline_theme = 'powerlineish'
-if g:colors_name == 'neonwave'
-  let g:airline_theme = 'surarken'
-endif