vim 插入多行空白行的问题 chatgpt 解决了

2023-02-07 16:20:22 +08:00
 wuwukai007

http://124.223.51.73/media/20230207161105.jpg

3946 次点击
所在节点    Python
16 条回复
ixx
2023-02-07 16:52:04 +08:00
呃。。。直接插入一个空行 然后 esc
yy 复制空行
100p

就插入了 100 行了 这样是不是更快?
churchill
2023-02-07 16:54:13 +08:00
o enter enter enter
yuancoder
2023-02-07 17:02:37 +08:00
试了一下,不行啊
SimonOne
2023-02-07 17:08:38 +08:00
显示 Invalid range
visper
2023-02-07 17:24:55 +08:00
o<esc>100.
o 是在后面插入一行,esc 回到 normal 模式, 100.是重复.命令 100 次, 而.是指重复之类的 o 命令
monkeykk
2023-02-07 17:25:24 +08:00
我的笨方法
noremap <leader>o o<Esc>
noremap <leader>O O<Esc>

插入 30 行就
30<leader>o
6IbA2bj5ip3tK49j
2023-02-07 17:42:37 +08:00
哈哈哈,今天也在 coolshell 看到类似的情况了。
chatgpt 会“伪造”一些名词和参考文献。
JackCh3ng
2023-02-07 18:17:57 +08:00
命令模式输入:<number>i<text><Esc>
比如插入一百行:100i<Enter><Esc>
插入一百行 hello:100ihello<Enter><Esc>
yuancoder
2023-02-07 20:24:55 +08:00
@visper 这个可以
yianing
2023-02-07 20:29:46 +08:00
normal 模式下
20o
插入 20 个空白行
ck65
2023-02-07 20:41:18 +08:00
最近我也在用 ChatGPT 指导写 C++。问题在于,你试一下它的答案不是立即就知道对不对了吗
❌ 试一下答案对不对先
✅ 先截图,传到一个 VPS 上,虽然没有配置好 SSL 但不要紧,然后发一个帖子分享一下这个发现,最后再来试一下答案对不对
jmc891205
2023-02-07 20:44:04 +08:00
copy 一个今天在 HN 上看到的评论:
> The BS that ChatGPT generates is especially odious because it requires so much effort to
> detect if you're not a SME[1] in whatever output it's giving.

> Plus, the output, when wrong, is subtly wrong- it's usually not obvious BS, it's credible BS.
> If you are not competent in the particular area you're asking about, you likely don't have
> the skills to recognize BS.

[1]: SME: subject-matter expert
andyJado
2023-02-08 09:42:31 +08:00
@jmc891205

[0] BS: boolsheet?
jmc891205
2023-02-08 09:59:51 +08:00
@andyJado
嘿嘿,懂得都懂
obulks
2023-02-08 10:01:29 +08:00
esc esc esc o esc yy 100p
zlowly
2023-02-08 15:41:12 +08:00
如果你用英文 google: how to insert multiple empty line in vim ,你会得到更简洁的答案
10o<Esc>会在当前行前加入 10 个空行
10O<Esc>会在当前行后加入 10 个空行
chatgpt 给了最麻烦的方法

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://tanronggui.xyz/t/913964

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX