【发布时间】:2011-01-17 00:27:17
【问题描述】:
我正在使用 vim,并且有一个包含 一些 html 的大文本文件被扔进了 throoghout。我正在尝试为网络做准备,需要在尚未格式化的行中添加<p></p> 标签。这是我所拥有的示例:
Paragraph text one one line [... more ... ]
Other paragraph text on the next line [... more ... ]
<h1>html element thrown in on its own line</h1>
More paragraph text [... more ... ]
<!-- some other element (always own line) -->
There is still more text!
我正在寻找一种方法来搜索 不 以 < 字符开头的行,并为这些行添加开始和结束 <p></p> 标记...所以之后,我的文件类似于:
<p>Paragraph text one one line [... more ... ] </p>
<p>Other paragraph text on the next line [... more ... ] </p>
<h1>html element thrown in on its own line</h1>
<p>More paragraph text [... more ... ] </p>
<!-- some other element (always own line ) -->
<p>There is still more text! </p>
如何找到不与<开头字符匹配的行?
【问题讨论】: