确认行删除 [英] Confirm line delete
本文介绍了确认行删除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了一个搜索文件中所有双行的函数.
I have created a function to search all double lines in a file.
我使用行号" g/.*/d删除行.
I use the "line-number"g/.*/d to delete the line.
但是我想确认是否必须删除一行, 就像s/..//gc命令
However I would like to confirm if a line has to be deleted or not, like the s/..//gc command
是否可以删除带有全局或替换的特定行
命令并确认每个动作?
Is it possible to delete a certain line with the global or substitute
command and confirm every action?
推荐答案
为什么不尝试使用替代命令而不是delete命令?
Why not try a substitute command instead of the delete command?
"line-number"s/^.*$\n//c
这篇关于确认行删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文