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

求助大家,vim中怎么shift-tab不起作用啊

  •  
  •   tonghuashuai ·
    tonghs · Oct 13, 2012 · 5207 views
    This topic created in 5048 days ago, the information mentioned may be changed or developed.
    新手用vim,一般来说,tab是缩进,shift-tab是取消缩进,但是我在vim中shift-tab跟tab效果是一样的,怎么弄啊,小弟先谢过了
    7 replies    1970-01-01 08:00:00 +08:00
    ratazzi
        1
    ratazzi  
    PRO
       Oct 13, 2012
    ctrl + d
    yinsigan
        2
    yinsigan  
       Oct 13, 2012
    何必用tab来缩进呢
    可以用> 或<
    tonghuashuai
        3
    tonghuashuai  
    OP
       Oct 13, 2012
    @ratazzi 不是切换标签,是tab制表符
    ratazzi
        4
    ratazzi  
    PRO
       Oct 13, 2012
    @tonghuashuai 插入模式啊,没错啊。
    tonghuashuai
        5
    tonghuashuai  
    OP
       Oct 13, 2012
    @ratazzi 哦,对了,我按错键了,command当ctrl了,谢谢谢谢
    NemoAlex
        6
    NemoAlex  
       Oct 13, 2012
    插入模式为什么需要这个键呢?直接退格删除不就好了...
    如果是调整整行缩进,就不要在插入模式来操作
    dingstyle
        7
    dingstyle  
       Oct 13, 2012
    其实在在normal模式下使用<<和>>来控制缩进更方便。
    楼主要求的映射可以这样实现(放入~./vimrc中):
    imap <S-Tab> <Esc><<i
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5288 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 08:19 · PVG 16:19 · LAX 01:19 · JFK 04:19
    ♥ Do have faith in what you're doing.