classification
Title: IDLE: Dedenting with Shift+Tab
Type: enhancement Stage: patch review
Components: IDLE Versions: Python 3.2
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: kbk Nosy List: gpolo, kamek, kbk, rhettinger, serwy
Priority: low Keywords: patch

Created on 2003-02-27 13:08 by kamek, last changed 2011-12-22 00:54 by serwy.

Files
File name Uploaded Description Edit
common_dedent.diff gpolo, 2009-03-29 13:15 review
Messages (7)
msg53784 - (view) Author: Daniel (kamek) Date: 2003-02-27 13:08
IDLE already provides quick block indenting, by 
selecting one or more lines and pressing Tab. So, it 
would make sense to have Shift+Tab to do the opposite 
work. While there's already Alt+[ (and Alt+] to indent), 
Shift+Tab is more intuitive, especially to those who are 
used to other Windows developer tools, like Visual 
Studio or TextPad.
msg53785 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2003-07-20 01:20
Logged In: YES 
user_id=80475

While you get used to it quickly, I've bumped in to this also.  
It is nice to have the control keys work the same across 
applications.
msg53786 - (view) Author: Daniel (kamek) Date: 2004-01-01 19:16
Logged In: YES 
user_id=539453

This can be considered solved in the newest IDLE versions,
as you can set custom shortcuts.
msg53787 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2004-01-01 20:47
Logged In: YES 
user_id=80475

Evenso, it may be better to have it work right out of the box.
msg53788 - (view) Author: Kurt B. Kaiser (kbk) * (Python committer) Date: 2004-01-02 00:41
Logged In: YES 
user_id=149084

What I'd really like is smart tabs like python-mode, where a tab
(re)indents the line to the correct point based on the syntax,
and a backspace backs up to the previous level.  

Since IDLE already knows how to indent I'm hoping that that 
won't be to difficult to implement.
msg84392 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2009-03-29 13:15
Patch added for allowing, and defining, Shift-Tab as the default binding
for dedenting.

The problem is that dedent-region may do more than one would expect.
msg150059 - (view) Author: Roger Serwy (serwy) * Date: 2011-12-22 00:54
I applied the patch and encountered a problem. MultiCall.py is replacing "<Shift-Key-Tab>" with "<Shift-KeyPress-Tab>". When this happens, the logic for rebinding "<<PrevWindow>>" fails.

event_info('<<PrevWindow>>') returns ('<Key-ISO_Left_Tab>', '<Key-hpBackTab>', '<Shift-Key-Tab>') 

event_info('<<dedent-region>>') returns ('<Control-KeyPress-bracketleft>', '<Shift-KeyPress-Tab>')

This is with 3.3a0 on Ubuntu 11.04.
History
Date User Action Args
2011-12-22 00:54:14serwysetnosy: + serwy
messages: + msg150059
2010-08-09 04:37:58terry.reedysettitle: Dedenting with Shift+Tab -> IDLE: Dedenting with Shift+Tab
stage: patch review
versions: + Python 3.2, - Python 3.1, Python 2.7
2009-03-29 13:16:10gpololinkissue1562092 superseder
2009-03-29 13:15:03gpolosetfiles: + common_dedent.diff
versions: + Python 3.1, Python 2.7, - Python 2.6
nosy: + gpolo

messages: + msg84392

keywords: + patch
2008-01-05 18:09:32christian.heimessetpriority: normal -> low
versions: + Python 2.6
2003-02-27 13:08:54kamekcreate