【发布时间】:2016-02-11 10:29:07
【问题描述】:
例子:
"create list of only certain linenumbers
....
"take action on these linenumbers
for i in range(0,len(mylist)-1)
exe mylist[i].'s/(mysearch)/\=substitute(submatch(0), ".", "", "ge")/gc'
endfor
如果我使用y 或n,确认标志可以正常工作,但当我使用a 或q 时它不起作用,因为它在for 循环中。
如何在确认对话框中捕获 a 和 q 标志并在整个 for 循环中执行它:a --> do a substitute for all other lines in for loopq --> end for loop
(我曾经问过类似的问题,但没有找到解决方案)
【问题讨论】:
标签: for-loop vim substitution flags confirmation