How to remove tab indent from several lines in IDLE?

前端 未结 8 1436
长发绾君心
长发绾君心 2021-01-30 13:04

If you want to indent several lines in Python IDLE you just mark the lines and hit Tab. But what if you want to remove the indent from several lines? Shift+Tab does not work for

相关标签:
8条回答
  • 2021-01-30 13:34
    Shift-Tab
    Ctrl-Tab
    < key
    

    depends on your editor.

    0 讨论(0)
  • 2021-01-30 13:36

    in pythonwin,

    SHIFT + TAB works

    0 讨论(0)
  • 2021-01-30 13:41

    By default, IDLE has it on Shift-Left Bracket. However, if you want, you can customise it to be Shift-Tab by clicking Options --> Configure IDLE --> Keys --> Use a Custom Key Set --> dedent-region --> Get New Keys for Selection

    Then you can choose whatever combination you want. (Don't forget to click apply otherwise all the settings would not get affected.)

    0 讨论(0)
  • 2021-01-30 13:47

    If you're using IDLE, you can use Ctrl+] to indent and Ctrl+[ to unindent.

    0 讨论(0)
  • 2021-01-30 13:49

    Depends on your editor.

    Have you tried Shift+Tab?

    0 讨论(0)
  • 2021-01-30 13:51

    For IDLE, select the lines, then open the "Format" menu. (Between "Edit" and "Run" if you're having trouble finding it.) This will also give you the keyboard shortcut, for me it turned out that dedent shortcut was "Ctrl+["

    0 讨论(0)
提交回复
热议问题