From 81f089322a670376be1daf7817f110812f785387 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Sun, 3 Sep 2017 21:18:01 +0200 Subject: [PATCH] keymap: allow to disable extension by checking config var closes #1556 --- autoload/airline/extensions/keymap.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/autoload/airline/extensions/keymap.vim b/autoload/airline/extensions/keymap.vim index 4f54937..2ecbd45 100644 --- a/autoload/airline/extensions/keymap.vim +++ b/autoload/airline/extensions/keymap.vim @@ -8,7 +8,11 @@ if !has('keymap') endif function! airline#extensions#keymap#status() - return printf('%s', (!empty(&keymap) ? (g:airline_symbols.keymap . ' '. &keymap) : '')) + if (get(g:, 'airline#extensions#keymap#enabled', 1) && has('keymap')) + return printf('%s', (!empty(&keymap) ? (g:airline_symbols.keymap . ' '. &keymap) : '')) + else + return '' + endif endfunction function! airline#extensions#keymap#init(ext)