• 请不要在回答技术问题时复制粘贴 AI 生成的内容
sdjl
V2EX  ›  程序员

vim中如何取消输入#字符时自动跳到行首?

  •  
  •   sdjl · Feb 9, 2013 · 4314 views
    This topic created in 5019 days ago, the information mentioned may be changed or developed.
    写python经常用#注释, 每次都会自动跳到行首去, 很不方便, 怎么去掉?
    3 replies  •  1970-01-01 08:00:00 +08:00
    reorx
    reorx
    Feb 9, 2013❤️1
    1
    Use `set cindent` instead of `set smartindent`

    ref: http://vim.wikia.com/wiki/Restoring_indent_after_typing_hash
    Sherlockhlt
    Sherlockhlt
    Feb 9, 2013
    2
    我是跳到上一个当前字符串呀
    sdjl
    sdjl
    OP
    Feb 10, 2013
    3
    :inoremap # X<BS>#
    @reorx 搞定 3q
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   745 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 22:58 · PVG 06:58 · LAX 14:58 · JFK 17:58
    ♥ Do have faith in what you're doing.