V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
sudo987
V2EX  ›  Vim

在 insert 模式下, ctrl+h 回删不好用

  •  
  •   sudo987 · Jun 9, 2016 · 3124 views
    This topic created in 3621 days ago, the information mentioned may be changed or developed.

    今天折腾了一下.vimrc,最后不知道怎么了在 insert mode 下, ctrl h 不好用了,有知道什么原因的么?

    7 replies    2016-07-06 14:37:24 +08:00
    7jmS8834H50s975y
        1
    7jmS8834H50s975y  
       Jun 9, 2016
    `set backspace=indent,eol,start`
    xucuncicero
        2
    xucuncicero  
       Jun 9, 2016
    看看是不是绑定到其他功能了?
    `verbose imap <C-h>`
    sudo987
        3
    sudo987  
    OP
       Jun 9, 2016
    找到了, set backspace=2
    sudo987
        4
    sudo987  
    OP
       Jun 9, 2016
    编辑 python 文件时 normal 模式下按 o 换行,总是直接换到和上一行一样的位置,我想要的是换到上一个 def 的位置,不知道怎么设置?谢谢。
    xell
        5
    xell  
       Jun 9, 2016
    你最后的问题涉及到 vim 如何确认新一行的缩进,这其实还挺复杂的,可能涉及到如下选项及其相互作用(或更多):

    cindent smartindent indentkeys indentexpr (可能还包括 formatoptions 等)

    另外,还要考虑你可能使用了针对 python 的第三方 ftplugin 所带来的影响。
    sudo987
        6
    sudo987  
    OP
       Jun 9, 2016 via iPhone
    @xell 太麻烦…还是手动吧
    ashfinal
        7
    ashfinal  
       Jul 6, 2016
    ctrl+h 默认是回删么?!
    我觉着 backsapce 够用了,于是配成了跳到前一个单词, ctrl+l 后一个单词; ctrl+j 下一行; ctrl+k 上一行。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2489 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 00:55 · PVG 08:55 · LAX 17:55 · JFK 20:55
    ♥ Do have faith in what you're doing.