From 8e6d5f7afd7e86abb1424912eaba51dbf66bbae9 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Tue, 21 Feb 2023 16:11:54 +0300 Subject: [PATCH] refactor: Prefer single quoted strings --- autoload/indent_guides.vim | 6 +++--- plugin/indent_guides.vim | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/autoload/indent_guides.vim b/autoload/indent_guides.vim index 29c2f29..54c4f8f 100644 --- a/autoload/indent_guides.vim +++ b/autoload/indent_guides.vim @@ -191,7 +191,7 @@ function! indent_guides#init_script_vars() abort let s:hi_normal = indent_guides#capture_highlight('Normal') " remove 'font=' from the s:hi_normal string (only seems to happen on Vim startup in Windows) - let s:hi_normal = substitute(s:hi_normal, ' font=[A-Za-z0-9:]\+', "", "") + let s:hi_normal = substitute(s:hi_normal, ' font=[A-Za-z0-9:]\+', '', '') " shortcuts to the global variables - this makes the code easier to read let s:debug = g:indent_guides_debug @@ -247,10 +247,10 @@ endfunction " function! indent_guides#capture_highlight(group_name) abort redir => l:output - exe "silent hi " . a:group_name + exe 'silent hi ' . a:group_name redir END - let l:output = substitute(l:output, "\n", "", "") + let l:output = substitute(l:output, '\n', '', '') return l:output endfunction diff --git a/plugin/indent_guides.vim b/plugin/indent_guides.vim index f4b2bdb..6dd734a 100644 --- a/plugin/indent_guides.vim +++ b/plugin/indent_guides.vim @@ -35,7 +35,7 @@ command! -bar IndentGuidesDisable call s:IndentGuidesDisable() " function s:InitVariable(var, value) if !exists(a:var) - if type(a:value) == type("") + if type(a:value) == type('') exec 'let ' . a:var . ' = ' . "'" . a:value . "'" else exec 'let ' . a:var . ' = ' . a:value