V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
wuwukai007
V2EX  ›  Python

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

  •  
  •   wuwukai007 · 2023-02-07 16:20:22 +08:00 · 3636 次点击
    这是一个创建于 437 天前的主题,其中的信息可能已经有所发展或是发生改变。
    第 1 条附言  ·  2023-02-07 17:09:49 +08:00
    上当了,假答案
    16 条回复    2023-02-08 15:41:12 +08:00
    ixx
        1
    ixx  
       2023-02-07 16:52:04 +08:00
    呃。。。直接插入一个空行 然后 esc
    yy 复制空行
    100p

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

    插入 30 行就
    30<leader>o
    xgfan
        7
    xgfan  
       2023-02-07 17:42:37 +08:00
    哈哈哈,今天也在 coolshell 看到类似的情况了。
    chatgpt 会“伪造”一些名词和参考文献。
    JackCh3ng
        8
    JackCh3ng  
       2023-02-07 18:17:57 +08:00
    命令模式输入:<number>i<text><Esc>
    比如插入一百行:100i<Enter><Esc>
    插入一百行 hello:100ihello<Enter><Esc>
    yuancoder
        9
    yuancoder  
       2023-02-07 20:24:55 +08:00
    @visper 这个可以
    yianing
        10
    yianing  
       2023-02-07 20:29:46 +08:00   ❤️ 2
    normal 模式下
    20o
    插入 20 个空白行
    ck65
        11
    ck65  
       2023-02-07 20:41:18 +08:00
    最近我也在用 ChatGPT 指导写 C++。问题在于,你试一下它的答案不是立即就知道对不对了吗
    ❌ 试一下答案对不对先
    ✅ 先截图,传到一个 VPS 上,虽然没有配置好 SSL 但不要紧,然后发一个帖子分享一下这个发现,最后再来试一下答案对不对
    jmc891205
        12
    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
        13
    andyJado  
       2023-02-08 09:42:31 +08:00
    @jmc891205

    [0] BS: boolsheet?
    jmc891205
        14
    jmc891205  
       2023-02-08 09:59:51 +08:00
    @andyJado
    嘿嘿,懂得都懂
    obulks
        15
    obulks  
       2023-02-08 10:01:29 +08:00
    esc esc esc o esc yy 100p
    zlowly
        16
    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 给了最麻烦的方法
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2836 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 78ms · UTC 14:22 · PVG 22:22 · LAX 07:22 · JFK 10:22
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.