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 14691bb00e
commit 9dc546c699
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

@ -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