From c00362b2b0f031f5e8ccda4ef73b43db0b173134 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Tue, 5 Jun 2018 21:06:23 -0600 Subject: [PATCH] Add normal_modified highlighting to minimalist theme --- autoload/airline/themes/minimalist.vim | 8 ++++++++ doc/airline-themes.txt | 9 ++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/autoload/airline/themes/minimalist.vim b/autoload/airline/themes/minimalist.vim index 6eeb276..61bad1e 100644 --- a/autoload/airline/themes/minimalist.vim +++ b/autoload/airline/themes/minimalist.vim @@ -7,6 +7,10 @@ let s:theme = 'minimalist' +" To highlight when the buffer is modified: +" let g:airline_minimalist_showmod = 1 +let s:want_showmod = get(g:, 'airline_minimalist_showmod', 0) + function! airline#themes#{s:theme}#refresh() if &background == "dark" " Normal @@ -54,6 +58,10 @@ function! airline#themes#{s:theme}#refresh() let palette.inactive = airline#themes#generate_color_map(IA, IA, IA) + if s:want_showmod + let palette.normal_modified = { 'airline_a': NR, 'airline_z': NR } + endif + " Accents let palette.accents = { \ 'red': [ ER[1], '', ER[3], '' ] diff --git a/doc/airline-themes.txt b/doc/airline-themes.txt index 7dac95f..6aba1e7 100644 --- a/doc/airline-themes.txt +++ b/doc/airline-themes.txt @@ -99,7 +99,7 @@ Currently this repository contains the following themes: * light * lucius * luna - * minimalist + * minimalist (|airline-theme-minimalist|) * molokai * monochrome * murmur @@ -196,6 +196,13 @@ setup once. However, it won't change colors if e.g. the mode changes. Set to 256 for 256-color mode (the default), or 16 for 16-color mode. Has no effect if using true/24-bit color. To enable 16-color mode: > let g:deus_termcolors = 16 + +*airline-theme-minimalist* +------------------------------------------------------------------------------ + *g:airline_minimalist_showmod* + +Highlight when the buffer is modified. + let g:airline_minimalist_showmod = 1 < *airline-theme-onedark* ------------------------------------------------------------------------------