use tr() instead of substitute

should be a bit faster
This commit is contained in:
Christian Brabandt 2018-11-13 22:29:32 +01:00
parent b3a574b4a3
commit b2e1dbad6f
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ endfunction
function! airline#switch_matching_theme() function! airline#switch_matching_theme()
if exists('g:colors_name') if exists('g:colors_name')
let existing = g:airline_theme let existing = g:airline_theme
let theme = substitute(tolower(g:colors_name), '-', '_', 'g') let theme = tr(tolower(g:colors_name), '-', '_')
try try
call airline#switch_theme(theme) call airline#switch_theme(theme)
return 1 return 1