技巧95-在替换过程中执行算术运算
文档:
<h2>Heading number 1</h2>
<h3>number 2 heading</h3>
<h4>Another heading</h4>
修改:
/\v\</?h\zs\d
:%s//\=submatch(0)-1/g
文档:
<h2>Heading number 1</h2>
<h3>number 2 heading</h3>
<h4>Another heading</h4>
修改:
/\v\</?h\zs\d
:%s//\=submatch(0)-1/g