gpt4 book ai didi

vim - VIM 可以做这个 Sublime 的把戏吗?

转载 作者:行者123 更新时间:2023-12-04 14:08:20 26 4
gpt4 key购买 nike

我想编辑这段文字:

Aenean vel sem bibendum, eleifend odio a, dictum nibh.
The third word in the above line is
Morbi eget est vitae quam ultricies porta vitae quis nunc.
The third word in the above line is
Praesent accumsan ex a laoreet cursus.
The third word in the above line is
Quisque efficitur lectus at dolor mollis, sit amet tristique libero lobortis.
The third word in the above line is

这段文字:
Aenean vel sem bibendum, eleifend odio a, dictum nibh.
The third word in the above line is sem
Morbi eget est vitae quam ultricies porta vitae quis nunc.
The third word in the above line is est
Praesent accumsan ex a laoreet cursus.
The third word in the above line is ex
Quisque efficitur lectus at dolor mollis, sit amet tristique libero lobortis.
The third word in the above line is lectus

用 Sublime 做到这一点
Select repeated part
ALT+F3
UpArrow
HOME
3 x CTRL+RightArrow
CTRL+Shift+LeftArrow
CTRL+C
DownArrow
END
CTRL+V

这个技巧在很多情况下非常有用。
VIM 可以吗?

最佳答案

它应该很容易与宏一起工作。如果您将光标放在第一行的第一个字符上,则:
qq : 开始录制名为 q 的宏
2w : 提前两个字
yw : yank (复制) 字
j$ : 跳到下一行并转到行尾
p : 粘贴你拉过的东西
+ : 转到下一行的开头
q : 停止录制宏。
3@q : 执行名为 q 的宏3次

关于vim - VIM 可以做这个 Sublime 的把戏吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49032531/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com