aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-22 22:08:34 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-22 22:08:34 +1200
commitb0d745efdd39ea1e08461b99c9128af5ea22c364 (patch)
treea66e866d503c764f3c13167aa567af5083f74970
parentFix up some pattern qualifiers (diff)
downloaddotfiles-b0d745efdd39ea1e08461b99c9128af5ea22c364.tar.gz
dotfiles-b0d745efdd39ea1e08461b99c9128af5ea22c364.zip
Use tr() over substitute() for character swap
I didn't know this function existed, but I should perhaps have guessed.
-rw-r--r--vim/autoload/spellfile_local.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/vim/autoload/spellfile_local.vim b/vim/autoload/spellfile_local.vim
index f3d9b987..e119b718 100644
--- a/vim/autoload/spellfile_local.vim
+++ b/vim/autoload/spellfile_local.vim
@@ -42,7 +42,7 @@ function! spellfile_local#() abort
endif
try
- let path = substitute(expand('%:p'), '/', '%', 'g')
+ let path = tr(expand('%:p'), '/', '%')
if path ==# ''
echoerr 'Blank path'
endif