首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >vim使用vim-surround更改多行html标记

vim使用vim-surround更改多行html标记
EN

Stack Overflow用户
提问于 2021-01-27 04:32:03
回答 3查看 37关注 0票数 1

我想,使用vim-surround来转换这个

代码语言:javascript
复制
            <p>
            ^currsor
              Issues reported by users from the
              <a href="https://re.fr"> https://re.fr</a>
              they will create an issue.
            </p>

到那里面

代码语言:javascript
复制
            <h1 class="important">
              Issues reported by users from the
              <a href="https://re.fr"> https://re.fr</a>
              they will create an issue.
            </h1>

我一直在命令模式中使用:cs<<h1 class="important">和我得到

代码语言:javascript
复制
            <h1 class="important">p</h1>
            ^currsor
              Issues reported by users from the
              <a href="https://re.fr"> https://re.fr</a>
              they will create an issue.
            </p>
EN

回答 3

Stack Overflow用户

发布于 2021-01-27 04:44:59

你可以只做..。

cst<h1 class="important">

“更改周围的标签”

票数 2
EN

Stack Overflow用户

发布于 2021-01-27 04:56:32

现在我要去工作了:

3VS<h1>

将会为你做这件事

票数 1
EN

Stack Overflow用户

发布于 2021-01-27 04:39:47

在不使用环绕插件的情况下,我会这样做:

代码语言:javascript
复制
:%s/p>/h1>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65908860

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档