Skip to content

Commit

Permalink
use substitute() instead of trim()
Browse files Browse the repository at this point in the history
this should work on older vim as well
  • Loading branch information
mrtazz committed Feb 28, 2023
1 parent fc0add8 commit a07a509
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/snipple.vim
Original file line number Diff line number Diff line change
@@ -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(<q-args>)

0 comments on commit a07a509

Please sign in to comment.