mirror of
https://github.com/preservim/vim-indent-guides.git
synced 2025-11-10 02:43:46 -05:00
refactor: Prefer single quoted strings
This commit is contained in:
@@ -191,7 +191,7 @@ function! indent_guides#init_script_vars() abort
|
||||
let s:hi_normal = indent_guides#capture_highlight('Normal')
|
||||
|
||||
" remove 'font=<value>' 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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user