diff options
Diffstat (limited to 'vim/autoload/option.vim')
-rw-r--r-- | vim/autoload/option.vim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vim/autoload/option.vim b/vim/autoload/option.vim index 5ff44ced..c44cf94b 100644 --- a/vim/autoload/option.vim +++ b/vim/autoload/option.vim @@ -9,3 +9,9 @@ function! option#Split(expr, ...) abort let parts = split(a:expr, '\\\@<!,[, ]*', keepempty) return map(parts, 'substitute(v:val, ''\\,'', '','', ''g'')') endfunction + +" Escape the right-hand side of a :set option value +" +function! option#Escape(expr) abort + return escape(a:expr, ' |"\') +endfunction |