From 6c676da884de7491412ea5a577cdce115c470140 Mon Sep 17 00:00:00 2001 From: Frank Plowman Date: Mon, 24 Jan 2022 18:08:11 +0000 Subject: [PATCH] initial implementation --- plugin/surround.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugin/surround.vim b/plugin/surround.vim index 527dc3c..7786b18 100644 --- a/plugin/surround.vim +++ b/plugin/surround.vim @@ -35,7 +35,7 @@ endfunction function! s:inputreplacement() let c = s:getchar() - if c == " " + if c =~ "[ 0-9]" let c .= s:getchar() endif if c =~ "\" || c =~ "\" @@ -164,6 +164,11 @@ function! s:wrap(string,char,type,removed,special) elseif newchar ==# ':' let before = ':' let after = '' + elseif newchar =~ '^[0-9].' + let scount = strpart(newchar,0,1) + let newchar = strpart(newchar,1) + let before = repeat(newchar, scount) + let after = repeat(newchar, scount) elseif newchar =~# "[tT\<]" let dounmapp = 0 let dounmapb = 0