【发布时间】:2015-06-04 09:28:23
【问题描述】:
在 vi 编辑器中,如果特定字符串匹配,则删除那些字符串直到行尾。 表示如果行是
"I found a good solution for my bill printing task and it is working properly for me."
要签入文件的字符串是
"working properly"
输出将是
"I found a good solution for my bill printing task and it is "
我知道如何删除文件中每一行的最后一个字符,然后命令:-- esc:%s/.$//g 但我必须一次又一次地发出这个命令。
【问题讨论】: