VIM对替换的数字进行计算

VIM对替换的数字进行计算

 

运行下面的命令

%s/sub(\([0-9]*\))/\=submatch(1)+8/g 

函数式 :s/替换字符串/\=函数式

posted @ 2019-03-21 11:26  extrablue  阅读(1175)  评论(0编辑  收藏  举报