diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-22 22:08:34 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-22 22:08:34 +1200 |
commit | b0d745efdd39ea1e08461b99c9128af5ea22c364 (patch) | |
tree | a66e866d503c764f3c13167aa567af5083f74970 /vim | |
parent | Fix up some pattern qualifiers (diff) | |
download | dotfiles-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.vim | 2 |
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 |