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 that in IDLE.
相关问题
- Code completion drop down suggestions not working
- How to tidy up HTML code based on JavaScript
- How to make Emacs use tabs instead of spaces?
- Why does Python see a tab as 8 spaces?
- Understanding IndentationErrors in Python 2.7
相关文章
- Why does IDLE 3.4 take so long on this program?
- php: auto indent the whole code?
- PHP correct indentation?
- Is it safe to indent with 2 spaces?
- Eclipse Plugin Development: How to access code wri
- How does Python IDE IDLE shows autocompletion list
- How to run a Python script from IDLE command line?
- PHP - indent block of html
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+["
Depends on your editor.
Have you tried Shift+Tab?
in pythonwin,
SHIFT + TAB works
depends on your editor.
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.)
If you're using IDLE, and the Norwegian keyboard makes Ctrl-[ a problem, you can change the key.
I tried putting in shift-Tab and that worked nicely.