From c7fb175d3565159699885653767214a6aa583ea4 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Thu, 26 Jul 2018 10:20:29 +0200 Subject: [PATCH] Add a specific color for commandline mode closes #1768 Colors for the other themes need to be defined however --- autoload/airline.vim | 2 ++ autoload/airline/themes/dark.vim | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/autoload/airline.vim b/autoload/airline.vim index cafedbc..b9181ff 100644 --- a/autoload/airline.vim +++ b/autoload/airline.vim @@ -156,6 +156,8 @@ function! airline#check_mode(winnr) let l:mode = ['visual'] elseif l:m ==# "t" let l:mode = ['terminal'] + elseif l:m ==# "c" + let l:mode = ['commandline'] else let l:mode = ['normal'] endif diff --git a/autoload/airline/themes/dark.vim b/autoload/airline/themes/dark.vim index 5a0ac75..6e63a34 100644 --- a/autoload/airline/themes/dark.vim +++ b/autoload/airline/themes/dark.vim @@ -130,6 +130,12 @@ let g:airline#themes#dark#palette.inactive_modified = { \ 'airline_c': [ '#875faf' , '' , 97 , '' , '' ] , \ } +" For commandline mode, we use the colors from normal mode, except the mode +" indicator should be colored differently, e.g. blue on light green +let s:airline_a_commandline = [ '#0000ff' , '#0cff00' , 63 , 40 ] +let s:airline_b_commandline = [ '#ffffff' , '#444444' , 255 , 238 ] +let s:airline_c_commandline = [ '#9cffd3' , '#202020' , 85 , 234 ] +let g:airline#themes#dark#palette.commandline = airline#themes#generate_color_map(s:airline_a_commandline, s:airline_b_commandline, s:airline_c_commandline) " Accents are used to give parts within a section a slightly different look or " color. Here we are defining a "red" accent, which is used by the 'readonly'