From 58fbcea3c415e27aee7f2645b8f7b69fe7ae8fab Mon Sep 17 00:00:00 2001 From: Jorden Kreps Date: Thu, 21 Jul 2022 12:02:28 -0700 Subject: [PATCH 1/2] fix: add new g:gotests_template to plugin definition Relates to https://github.com/buoto/gotests-vim/issues/9 --- plugin/vim-gotests.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugin/vim-gotests.vim b/plugin/vim-gotests.vim index c2d3045..a626366 100644 --- a/plugin/vim-gotests.vim +++ b/plugin/vim-gotests.vim @@ -14,5 +14,9 @@ if !exists('g:gotests_template_dir') let g:gotests_template_dir = '' endif +if !exists('g:gotests_template') + let g:gotests_template = '' +endif + command! -range GoTests ,call gotests#tests() command! GoTestsAll call gotests#alltests() From 55f56f6e80fa429d820b34042620bd9715d1ce27 Mon Sep 17 00:00:00 2001 From: Jorden Kreps Date: Thu, 21 Jul 2022 12:06:45 -0700 Subject: [PATCH 2/2] chore: change newly added tabs to spaces --- autoload/gotests.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/autoload/gotests.vim b/autoload/gotests.vim index 84983c3..0a27d6e 100644 --- a/autoload/gotests.vim +++ b/autoload/gotests.vim @@ -24,8 +24,8 @@ function! gotests#tests() range let tmplDir = '' if (!empty(g:gotests_template_dir)) let tmplDir = '-template_dir ' . shellescape(g:gotests_template_dir) - elseif (!empty(g:gotests_template)) - let tmplDir = '-template ' . shellescape(g:gotests_template) + elseif (!empty(g:gotests_template)) + let tmplDir = '-template ' . shellescape(g:gotests_template) endif let file = expand('%') @@ -44,8 +44,8 @@ function! gotests#alltests() abort let tmplDir = '' if (!empty(g:gotests_template_dir)) let tmplDir = '-template_dir ' . shellescape(g:gotests_template_dir) - elseif (!empty(g:gotests_template)) - let tmplDir = '-template ' . shellescape(g:gotests_template) + elseif (!empty(g:gotests_template)) + let tmplDir = '-template ' . shellescape(g:gotests_template) endif let file = expand('%')