From f8b2b7be23cc6feeff9a310d1c7b657b58496bbd Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Fri, 9 Aug 2013 08:05:00 -0400 Subject: [PATCH] add support for select mode. resolves #123. --- autoload/airline.vim | 4 +++- plugin/airline.vim | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/autoload/airline.vim b/autoload/airline.vim index 23997af..45d6688 100644 --- a/autoload/airline.vim +++ b/autoload/airline.vim @@ -157,7 +157,9 @@ function! airline#update_highlight() let l:mode = ['insert'] elseif l:m ==# "R" let l:mode = ['replace'] - elseif l:m ==? "v" || l:m ==# "" + elseif l:m =~# '\v(v|V|)' + let l:mode = ['visual'] + elseif l:m =~# '\v(s|S|)' let l:mode = ['visual'] else let l:mode = ['normal'] diff --git a/plugin/airline.vim b/plugin/airline.vim index 83f7bac..d001057 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -48,6 +48,9 @@ call s:check_defined('g:airline_mode_map', { \ 'V' : 'V-LINE', \ 'c' : 'CMD ', \ '' : 'V-BLOCK', + \ 's' : 'SELECT', + \ 'S' : 'S-LINE', + \ '' : 'S-BLOCK', \ }) call s:check_defined('g:airline_section_a', '%{get(g:, "airline_current_mode_text", "")}')