From a07a50970728e37c0b5843c429cd3f51c5ccd328 Mon Sep 17 00:00:00 2001 From: Daniel Schauenberg Date: Tue, 28 Feb 2023 13:50:55 +0100 Subject: [PATCH] use substitute() instead of trim() this should work on older vim as well --- plugin/snipple.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/snipple.vim b/plugin/snipple.vim index abe0940..422b27a 100644 --- a/plugin/snipple.vim +++ b/plugin/snipple.vim @@ -1,6 +1,6 @@ " get basedir and strip trailing slashes to not clash with completion " and path construction -let g:SnippleBaseDir = get(g:, 'SnippleBaseDir', $HOME . '/.snippets/')->trim("/", 2) +let g:SnippleBaseDir = substitute(get(g:, 'SnippleBaseDir', $HOME . '/.snippets/'), "/$", "", "") " command definitions command! -nargs=1 -complete=customlist,snipple#AvailableSnippets SnippleLoad :call snipple#LoadSnippet()