The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 38: | Line 38: | ||
<pre> |
<pre> |
||
" RS: repeat substitution command |
" RS: repeat substitution command |
||
β | com! -range -nargs=* RS call RepeatSubst(<q-args |
+ | com! -range -nargs=* RS call RepeatSubst(<q-args>) |
" RepatSubst: |
" RepatSubst: |
||
fun! RepeatSubst(subexpr) |
fun! RepeatSubst(subexpr) |
||
Line 47: | Line 47: | ||
let sep = strpart(g:repeatsubst,0,1) |
let sep = strpart(g:repeatsubst,0,1) |
||
let pat = substitute(g:repeatsubst,'^.\(.\{-}\)'.sep.'.*$','\1','') |
let pat = substitute(g:repeatsubst,'^.\(.\{-}\)'.sep.'.*$','\1','') |
||
β | s/\%#./\r&/ |
+ | s/\%#./\r&/ |
let curcol= curcol + matchend(getline("."),pat) |
let curcol= curcol + matchend(getline("."),pat) |
||
exe "s".g:repeatsubst |
exe "s".g:repeatsubst |
||
Line 57: | Line 57: | ||
==Comments== |
==Comments== |
||
+ | |||
+ | ---- |