【发布时间】:2013-03-27 15:44:17
【问题描述】:
我有一个 CSS 选择器,例如:
#page-site-index .toolbar .items {
如何捕获“.toolbar .items”部分并将其用于 Vim S&R 的 Replace 部分,所以这个选择器可以变成:
#page-site-index .toolbar .items, #page-site-login .toolbar .items {
类似:
%s:/#page-site-index \(.toolbar .items\)/#page-site-index (the captured string), #page-site-login (the captured string)/g
顺便说一句,我使用的是终端版本的 Vim。
【问题讨论】: