Add keymap extension which shows keymap setting.

This commit is contained in:
Doron Behar 2017-08-25 14:10:58 +03:00 committed by Christian Brabandt
parent 20de588fd1
commit 89e484ac59
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,20 @@
" MIT License. Copyright (c) 2017 Doron Behar.
scriptencoding utf-8
if !has('keymap')
finish
endif
function! airline#extensions#keymap#status()
if &keymap != ''
let s:keymap2print = g:airline_symbols.keymap . ' ' . &keymap
else
let s:keymap2print = ''
endif
return printf('%s', s:keymap2print)
endfunction
function! airline#extensions#keymap#init(ext)
call airline#parts#define_function('keymap', 'airline#extensions#keymap#status')
endfunction

View File

@ -866,6 +866,12 @@ vim-xkblayout
macOS (Install https://github.com/vovkasm/input-source-switcher):
let g:XkbSwitchLib = '/usr/local/lib/libInputSourceSwitcher.dylib'
------------------------------------- *airline-keymap*
vim-keymap
* enable/disable vim-keymap extension >
let g:airline#extensions#keymap#enabled = 1
------------------------------------- *airline-windowswap*
vim-windowswap <https://github.com/wesQ3/vim-windowswap>