Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
fix(colortheme): add option for setting color theme and airline theme
Browse files Browse the repository at this point in the history
  • Loading branch information
LER0ever committed Jun 6, 2017
1 parent 833dfa3 commit e3940fd
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 12 deletions.
4 changes: 4 additions & 0 deletions .EverVim.vimrc.sample
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
" Below is the default config, uncomment and make your own
" let g:evervim_bundle_groups=['general', 'appearance', 'writing', 'youcompleteme', 'programming', 'python', 'javascript', 'html', 'misc', 'go', 'rust', 'cpp', 'lua']

" Color Theme
" let g:evervim_color_theme="dracula"
" let g:evervim_airline_theme="dracula"

" Automatically changing to open file directory
" May cause airline to misbehave
" let g:evervim_autochdir = 1
Expand Down
12 changes: 7 additions & 5 deletions core/vimui.vim
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
" Vim UI
if !exists('g:override_evervim_bundles') && filereadable(expand("~/.vim/bundle/vim-colors-solarized/colors/solarized.vim"))
let g:solarized_termcolors=256
let g:solarized_termtrans=1
let g:solarized_contrast="normal"
let g:solarized_visibility="normal"
if !exists('g:evervim_color_theme') && filereadable(expand("~/.vim/bundle/vim/colors/dracula.vim"))
"let g:solarized_termcolors=256
"let g:solarized_termtrans=1
"let g:solarized_contrast="normal"
"let g:solarized_visibility="normal"
color dracula " Load a colorscheme
else
execute 'color ' . g:evervim_color_theme
endif

set tabpagemax=15 " Only show 15 tabs
Expand Down
11 changes: 5 additions & 6 deletions plugins/general/airline.vim
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
" Set configuration options for the statusline plugin vim-airline.
" Use the powerline theme and optionally enable powerline symbols.
" To use the symbols , , , , , , and .in the statusline
" segments add the following to your .vimrc.before.local file:
let g:airline_powerline_fonts=1
" If the previous symbols do not render for you then install a
" If the symbols do not render for you then install a
" powerline enabled font.

" See `:echo g:airline_theme_map` for some more choices
" Default in terminal vim is 'dark'
if isdirectory(expand("~/.vim/bundle/vim-airline-themes/"))
set laststatus=2
if !exists('g:airline_theme')
if !exists('g:evervim_airline_theme')
let g:airline_theme = 'dracula' " 'molokai' 'solarized'
else
let g:airline_theme = g:evervim_airline_theme
endif
let g:airline#extensions#tabline#enabled = 1
"let g:airline#extensions#bufferline#enabled = 1
if !exists('g:airline_powerline_fonts')
if !exists('g:airline_no_powerline')
" Use the default set of separators with a few customizations
let g:airline_left_sep='' " Slightly fancier than '>'
let g:airline_right_sep='' " Slightly fancier than '<'
Expand Down
7 changes: 6 additions & 1 deletion plugins/general/lightline.vim
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
if isdirectory(expand("~/.vim/bundle/lightline.vim/"))
if !exists('g:evervim_airline_theme')
let g:lightline_theme = 'Dracula'
else
let g:lightline_theme = g:evervim_airline_theme
endif
let g:lightline = {
\ 'colorscheme': 'Dracula',
\ 'colorscheme': g:lightline_theme,
\ 'enable': {
\ 'statusline': 1,
\ 'tabline': 1,
Expand Down

1 comment on commit e3940fd

@wjh756381193
Copy link

@wjh756381193 wjh756381193 commented on e3940fd Jun 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我通过你的上一个提交解决了主题不能加载的问题,现在出现了一个新的问题:
我在.EverVim.vimrc中修改了主题为我要的主题(mint)当每次使用vim打开文件的时候,提示:
lightline.vim: Could not load colorscheme mint.
但是我直接Enter进入文件,主题实际已经加载成功,如图
qq20170607-102010
qq20170607-102030

我的配置如下:

let g:evervim_color_theme="mint"
let g:evervim_airline_theme="mint"

Please sign in to comment.