From b0d745efdd39ea1e08461b99c9128af5ea22c364 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 22 Jun 2019 22:08:34 +1200 Subject: Use tr() over substitute() for character swap I didn't know this function existed, but I should perhaps have guessed. --- vim/autoload/spellfile_local.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vim') 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 -- cgit v1.2.3