说我有以下代码:
<p>
Hello
</p>
Run Code Online (Sandbox Code Playgroud)
我想成功
<p>Hello</p>
Run Code Online (Sandbox Code Playgroud)
我想将光标置于第1行末尾的正常模式,所以在'>'上有一个命令删除所有空格直到下一个字符.我能想到的最接近的是动作
d/Hello
Run Code Online (Sandbox Code Playgroud)
删除所有内容直到Hello,但问题是它还删除了光标下的字符('>')所以我最终得到
<pHello
</p>
Run Code Online (Sandbox Code Playgroud)
你会怎么做?
Bir*_*rei 18
一种方法,您不需要多次重复此操作.
JxJx
Run Code Online (Sandbox Code Playgroud)
说明:
J # Join current line with next one but substitute end of line with a space.
x # Remove the space.
Jx # Repeat same process for last line.
Run Code Online (Sandbox Code Playgroud)
tagvim中有一个文本对象:
:'<,'>:'<,'>j:help v_at
at "a tag block", select [count] tag blocks, from the
[count]'th unmatched "<aaa>" backwards to the matching
"</aaa>", including the "<aaa>" and "</aaa>".
See |tag-blocks| about the details.
When used in Visual mode it is made characterwise.
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7449 次 |
| 最近记录: |