V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
sdjl
V2EX  ›  程序员

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

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

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