【问题标题】:Unindent lines in Sublime TextSublime Text 中的取消缩进行
【发布时间】:2013-11-24 11:54:14
【问题描述】:

您知道,当您标记了一堆文本并 predd TAB 时,文本会向右移动(我不记得这叫什么...)。我怎样才能让文本反其道而行之?

【问题讨论】:

    标签: sublimetext2 text-editor sublimetext


    【解决方案1】:

    这和其他编辑器一样。只需尝试 Shift+TAB。 ;)

    【讨论】:

    • 您实际上需要将shift_tab_unindent 设置设置为true 才能正常工作。我认为默认情况下它是错误的。
    • @tombruijn 默认关闭,但这仅意味着它仅部分工作:By default, shift+tab will only unindent if the selection spans multiple lines. When pressing shift+tab at other times, it'll insert a tab character - this allows tabs to be inserted when tab_completion is enabled. Set this to true to make shift+tab always unindent, instead of inserting tabs.
    • 你也可以这样做
    【解决方案2】:

    您所说的命令称为“缩进”和“未缩进”。

    Mac

    缩进:cmd + ]

    取消缩进:cmd + [

    其他

    缩进:ctrl + ]

    取消缩进:ctrl + [

    【讨论】:

      【解决方案3】:

      您可以尝试 Shift+TAB 取消缩进多个选定的行。如果要取消缩进光标所在的单行,则需要设置

       "shift_tab_unindent": true,
      

      在您的用户设置中。

      【讨论】:

        【解决方案4】:

        Shift+tab 对我来说不适用于 Sublime Text 3 中的 Makefile。所以我添加了这个键绑定:

        [
        { "keys": ["shift+tab"], "command": "unindent", "args": {"single_line":true} }
        ]
        

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2013-03-23
          • 1970-01-01
          • 2016-02-20
          • 2012-03-18
          • 2017-12-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多