mirror of
https://github.com/vim-airline/vim-airline.git
synced 2026-08-12 19:06:56 +08:00
Support Multiple Cursor mode
Detect the use of plugin https://github.com/mg979/vim-visual-multi and show mode "MULTI" when it is active. closes #1933
This commit is contained in:
@@ -226,7 +226,11 @@ function! airline#check_mode(winnr)
|
||||
else
|
||||
let l:mode = ['normal']
|
||||
endif
|
||||
if index(['Rv', 'no', 'ni', 'ix', 'ic'], l:m) == -1
|
||||
if exists("*VMInfos") && !empty(VMInfos())
|
||||
" Vim plugin Multiple Cursors https://github.com/mg979/vim-visual-multi
|
||||
let l:m = 'multi'
|
||||
endif
|
||||
if index(['Rv', 'no', 'ni', 'ix', 'ic', 'multi'], l:m) == -1
|
||||
let l:m = l:m[0]
|
||||
endif
|
||||
let w:airline_current_mode = get(g:airline_mode_map, l:m, l:m)
|
||||
|
||||
@@ -40,6 +40,7 @@ function! airline#init#bootstrap()
|
||||
\ 'i' : 'INSERT',
|
||||
\ 'ic' : 'INSERT COMPL',
|
||||
\ 'ix' : 'INSERT COMPL',
|
||||
\ 'multi' : 'MULTI',
|
||||
\ 'n' : 'NORMAL',
|
||||
\ 'ni' : '(INSERT)',
|
||||
\ 'no' : 'OP PENDING',
|
||||
|
||||
Reference in New Issue
Block a user