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

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

  •  
  •   tonghuashuai ·
    tonghs · Oct 13, 2012 · 5401 views
    This topic created in 5165 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
    ratazzi
    PRO
    Oct 13, 2012
    1
    ctrl + d
    yinsigan
    yinsigan
    Oct 13, 2012
    2
    何必用tab来缩进呢
    可以用> 或<
    tonghuashuai
    tonghuashuai
    OP
    Oct 13, 2012
    3
    @ratazzi 不是切换标签,是tab制表符
    ratazzi
    ratazzi
    PRO
    Oct 13, 2012
    4
    @tonghuashuai 插入模式啊,没错啊。
    tonghuashuai
    tonghuashuai
    OP
    Oct 13, 2012
    5
    @ratazzi 哦,对了,我按错键了,command当ctrl了,谢谢谢谢
    NemoAlex
    NemoAlex
    Oct 13, 2012
    6
    插入模式为什么需要这个键呢?直接退格删除不就好了...
    如果是调整整行缩进,就不要在插入模式来操作
    dingstyle
    dingstyle
    Oct 13, 2012
    7
    其实在在normal模式下使用<<和>>来控制缩进更方便。
    楼主要求的映射可以这样实现(放入~./vimrc中):
    imap <S-Tab> <Esc><<i
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2066 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 06:43 · PVG 14:43 · LAX 22:43 · JFK 01:43
    ♥ Do have faith in what you're doing.