Просмотр исходного кода

Fix tmux-vim bg colour erasing, Add flattened

Solarized and Neonwave have an issue: `background` gets set to `'light'`
after colour scheme is applied. This is okay for normal usage, but
returning from `:Goyo` throws everything off. Flattened (simpler
solarized clone) does not have this issue, so it is added anyway.

TODO find a good colour scheme switcher.
Weiyi Lou 10 лет назад
Родитель
Сommit
184d99390d
2 измененных файлов с 25 добавлено и 4 удалено
  1. 1 0
      vim/plugins.vim
  2. 24 4
      vim/settings/colorscheme.vim

+ 1 - 0
vim/plugins.vim

@@ -30,6 +30,7 @@ Plug 'altercation/vim-colors-solarized'
 Plug 'itchyny/lightline.vim'
 Plug 'kshenoy/vim-signature'
 Plug 'nathanaelkane/vim-indent-guides'
+Plug 'romainl/flattened'
 Plug 'Sclarki/neonwave.vim'
 Plug 'junegunn/goyo.vim'
 Plug 'junegunn/limelight.vim'

+ 24 - 4
vim/settings/colorscheme.vim

@@ -1,7 +1,27 @@
-set background=dark         " Assume a dark background
-let g:solarized_termcolors=256
-colorscheme solarized
+set background=dark
+"let g:solarized_termcolors=256
+"colorscheme solarized
 "colorscheme neonwave
+colorscheme flattened_dark
 
-" Remove strange grey highlight in solarized terminal.
+" 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>