Merge pull request #90 from klen/master

Support &iminsert
This commit is contained in:
Bailey Ling 2013-07-24 06:14:39 -07:00
commit 443cd8d9c8
3 changed files with 11 additions and 0 deletions

View File

@ -163,6 +163,13 @@ function! airline#update_highlight()
let l:mode = ['normal'] let l:mode = ['normal']
endif endif
let g:airline_current_mode_text = get(g:airline_mode_map, l:m, l:m) let g:airline_current_mode_text = get(g:airline_mode_map, l:m, l:m)
if g:airline_detect_iminsert && &iminsert
if exists('b:keymap_name')
let g:airline_current_mode_text .= ' ' . toupper(b:keymap_name)
else
let g:airline_current_mode_text .= ' LANG'
endif
endif
else else
let l:mode = ['inactive'] let l:mode = ['inactive']
endif endif

View File

@ -68,6 +68,9 @@ values):
> >
let g:airline_detect_paste=1 let g:airline_detect_paste=1
< <
* enable iminsert detection
>
let g:airline_detect_iminsert=1
* change the default theme * change the default theme
> >

View File

@ -15,6 +15,7 @@ call s:check_defined('g:airline_right_alt_sep', exists('g:airline_powerline_font
call s:check_defined('g:airline_enable_bufferline', 1) call s:check_defined('g:airline_enable_bufferline', 1)
call s:check_defined('g:airline_enable_fugitive', 1) call s:check_defined('g:airline_enable_fugitive', 1)
call s:check_defined('g:airline_enable_syntastic', 1) call s:check_defined('g:airline_enable_syntastic', 1)
call s:check_defined('g:airline_detect_iminsert', 1)
call s:check_defined('g:airline_detect_modified', 1) call s:check_defined('g:airline_detect_modified', 1)
call s:check_defined('g:airline_detect_paste', 1) call s:check_defined('g:airline_detect_paste', 1)
call s:check_defined('g:airline_fugitive_prefix', exists('g:airline_powerline_fonts')?' ':'') call s:check_defined('g:airline_fugitive_prefix', exists('g:airline_powerline_fonts')?' ':'')