From 9dc546c6991ddfe88c0eacd56b8ee209904698c4 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Tue, 13 Nov 2018 22:29:32 +0100 Subject: [PATCH] use tr() instead of substitute should be a bit faster --- autoload/airline.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/airline.vim b/autoload/airline.vim index 70700c0e..bc67f20d 100644 --- a/autoload/airline.vim +++ b/autoload/airline.vim @@ -98,7 +98,7 @@ endfunction function! airline#switch_matching_theme() if exists('g:colors_name') let existing = g:airline_theme - let theme = substitute(tolower(g:colors_name), '-', '_', 'g') + let theme = tr(tolower(g:colors_name), '-', '_') try call airline#switch_theme(theme) return 1