aboutsummaryrefslogtreecommitdiff
path: root/vim
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 /vim
parent2cbdbf0baf4212e48fefb168cc7914f1dabdb80c (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.
Diffstat (limited to 'vim')
-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