diff --git a/autoload/airline.vim b/autoload/airline.vim index b9181ffd..d9d47f69 100644 --- a/autoload/airline.vim +++ b/autoload/airline.vim @@ -147,16 +147,18 @@ function! airline#check_mode(winnr) let context = s:contexts[a:winnr] if get(w:, 'airline_active', 1) - let l:m = mode() - if l:m ==# "i" + let l:m = mode(1) + if l:m[0] ==# "i" let l:mode = ['insert'] - elseif l:m ==# "R" + elseif l:m ==# "Rv" + let l:mode =['virtual replace'] + elseif l:m[0] ==# "R" let l:mode = ['replace'] - elseif l:m =~# '\v(v|V||s|S|)' + elseif l:m[0] =~# '\v(v|V||s|S|)' let l:mode = ['visual'] elseif l:m ==# "t" let l:mode = ['terminal'] - elseif l:m ==# "c" + elseif l:m[0] ==# "c" let l:mode = ['commandline'] else let l:mode = ['normal'] diff --git a/autoload/airline/init.vim b/autoload/airline/init.vim index 278d3aec..e860258b 100644 --- a/autoload/airline/init.vim +++ b/autoload/airline/init.vim @@ -47,6 +47,7 @@ function! airline#init#bootstrap() \ 'S' : 'S-LINE', \ '' : 'S-BLOCK', \ 't' : 'TERMINAL', + \ 'Rv' : 'V REPLACE', \ }, 'keep') call s:check_defined('g:airline_theme_map', {})