change theme
This commit is contained in:
+3
-8
@@ -10,23 +10,18 @@ set nobackup
|
|||||||
set nowritebackup
|
set nowritebackup
|
||||||
|
|
||||||
" Give more space for displaying messages.
|
" Give more space for displaying messages.
|
||||||
set cmdheight=2
|
"set cmdheight=2
|
||||||
|
|
||||||
" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable
|
" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable
|
||||||
" delays and poor user experience.
|
" delays and poor user experience.
|
||||||
set updatetime=4000
|
set updatetime=2000
|
||||||
|
|
||||||
" Don't pass messages to |ins-completion-menu|.
|
" Don't pass messages to |ins-completion-menu|.
|
||||||
set shortmess+=c
|
set shortmess+=c
|
||||||
|
|
||||||
" Always show the signcolumn, otherwise it would shift the text each time
|
" Always show the signcolumn, otherwise it would shift the text each time
|
||||||
" diagnostics appear/become resolved.
|
" diagnostics appear/become resolved.
|
||||||
if has("nvim-0.5.0") || has("patch-8.1.1564")
|
set signcolumn=yes
|
||||||
" Recently vim can merge signcolumn and number column into one
|
|
||||||
set signcolumn=number
|
|
||||||
else
|
|
||||||
set signcolumn=yes
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Use tab for trigger completion with characters ahead and navigate.
|
" Use tab for trigger completion with characters ahead and navigate.
|
||||||
" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
|
" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
|
||||||
|
|||||||
+20
-11
@@ -77,7 +77,7 @@
|
|||||||
|
|
||||||
" nvim support only theme
|
" nvim support only theme
|
||||||
" {
|
" {
|
||||||
Plug 'projekt0n/github-nvim-theme'
|
"Plug 'projekt0n/github-nvim-theme'
|
||||||
" }
|
" }
|
||||||
|
|
||||||
" vim theme
|
" vim theme
|
||||||
@@ -89,6 +89,8 @@
|
|||||||
if g:vim_type == 'nvim' && g:vim_version > 0.5
|
if g:vim_type == 'nvim' && g:vim_version > 0.5
|
||||||
Plug 'xiyaowong/nvim-transparent'
|
Plug 'xiyaowong/nvim-transparent'
|
||||||
endif
|
endif
|
||||||
|
Plug 'EdenEast/nightfox.nvim'
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
" Helper functions
|
" Helper functions
|
||||||
@@ -185,9 +187,11 @@
|
|||||||
|
|
||||||
" what to use for dark theme
|
" what to use for dark theme
|
||||||
let g:dark_theme = ''
|
let g:dark_theme = ''
|
||||||
|
let g:airline_dark_theme = "deus"
|
||||||
|
|
||||||
" what to use for light theme
|
" what to use for light theme
|
||||||
let g:light_theme = ''
|
let g:light_theme = ''
|
||||||
|
let g:airline_light_theme = "silver"
|
||||||
|
|
||||||
" transparent backgroud for supported terminal emulator
|
" transparent backgroud for supported terminal emulator
|
||||||
if filereadable(expand(g:vim_dir . '.transparent_theme.signal'))
|
if filereadable(expand(g:vim_dir . '.transparent_theme.signal'))
|
||||||
@@ -265,12 +269,16 @@
|
|||||||
|
|
||||||
" has('nvim') check if it's running on nvim rather than
|
" has('nvim') check if it's running on nvim rather than
|
||||||
" having neovim on your machine
|
" having neovim on your machine
|
||||||
if isdirectory(expand(plugin_dir . "/github-nvim-theme")) && has('nvim') && g:vim_version >= 0.5
|
"if isdirectory(expand(plugin_dir . "/github-nvim-theme")) && has('nvim') && g:vim_version >= 0.5
|
||||||
let g:github_function_style = "italic"
|
" let g:github_function_style = "italic"
|
||||||
"let g:github_sidebars = ["qf", "vista_kind", "terminal", "packer"]
|
" "let g:github_sidebars = ["qf", "vista_kind", "terminal", "packer"]
|
||||||
|
"
|
||||||
let g:dark_theme = 'github_dark'
|
" let g:dark_theme = 'github_dark'
|
||||||
let g:light_theme = 'github_light'
|
" let g:light_theme = 'github_light'
|
||||||
|
if isdirectory(expand(plugin_dir . "/nightfox.nvim")) && has('nvim') && g:vim_version >= 0.5
|
||||||
|
"let g:dark_theme = 'Nightfox'
|
||||||
|
let g:dark_theme = 'Nordfox'
|
||||||
|
let g:light_theme = 'Dayfox'
|
||||||
|
|
||||||
" }
|
" }
|
||||||
|
|
||||||
@@ -289,11 +297,11 @@
|
|||||||
if g:theme_color == 'dark'
|
if g:theme_color == 'dark'
|
||||||
set background=dark
|
set background=dark
|
||||||
execute("colorscheme " . g:dark_theme)
|
execute("colorscheme " . g:dark_theme)
|
||||||
let g:airline_theme='afterglow'
|
let g:airline_theme=g:airline_dark_theme
|
||||||
else
|
else
|
||||||
set background=light
|
set background=light
|
||||||
execute("colorscheme " . g:light_theme)
|
execute("colorscheme " . g:light_theme)
|
||||||
let g:airline_theme='silver'
|
let g:airline_theme=g:airline_light_theme
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" since in .vimrc we cannot call plugin function as they
|
" since in .vimrc we cannot call plugin function as they
|
||||||
@@ -318,14 +326,15 @@
|
|||||||
if g:theme_color == "dark"
|
if g:theme_color == "dark"
|
||||||
set background=light
|
set background=light
|
||||||
execute("colorscheme " . g:light_theme)
|
execute("colorscheme " . g:light_theme)
|
||||||
call SetAirlineTheme("silver")
|
call SetAirlineTheme(g:airline_light_theme)
|
||||||
let g:theme_color = 'light'
|
let g:theme_color = 'light'
|
||||||
call system("touch " . g:vim_dir . ".light_theme.signal")
|
call system("touch " . g:vim_dir . ".light_theme.signal")
|
||||||
else
|
else
|
||||||
set background=dark
|
set background=dark
|
||||||
execute("colorscheme " . g:dark_theme)
|
execute("colorscheme " . g:dark_theme)
|
||||||
call SetAirlineTheme("afterglow")
|
call SetAirlineTheme(g:airline_dark_theme)
|
||||||
let g:theme_color = 'dark'
|
let g:theme_color = 'dark'
|
||||||
|
" for saving theme state
|
||||||
if filereadable(expand(g:vim_dir . '.light_theme.signal'))
|
if filereadable(expand(g:vim_dir . '.light_theme.signal'))
|
||||||
call delete(expand(g:vim_dir . ".light_theme.signal"))
|
call delete(expand(g:vim_dir . ".light_theme.signal"))
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user