diff options
Diffstat (limited to 'vim/autoload/argument.vim')
-rw-r--r-- | vim/autoload/argument.vim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vim/autoload/argument.vim b/vim/autoload/argument.vim new file mode 100644 index 00000000..85d75eb1 --- /dev/null +++ b/vim/autoload/argument.vim @@ -0,0 +1,8 @@ +" Escape a single argument for use on an Ex command line; essentially +" a backport of fnameescape() for versions before v7.1.299 +" +function! argument#Escape(argument) abort + return exists('*fnameescape') + \ ? fnameescape(a:argument) + \ : escape(a:argument, "\n\r\t".' *?[{`$\%#''"|!<') +endfunction |