add support for select mode. resolves #123.

This commit is contained in:
Bailey Ling 2013-08-09 08:05:00 -04:00
parent 4485b03e51
commit f8b2b7be23
2 changed files with 6 additions and 1 deletions

View File

@ -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']

View File

@ -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", "")}')