mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-22 13:26:46 +08:00
Add keymap extension which shows keymap setting.
This commit is contained in:
parent
20de588fd1
commit
89e484ac59
20
autoload/airline/extensions/keymap.vim
Normal file
20
autoload/airline/extensions/keymap.vim
Normal 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
|
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user