IDLE question

R

rocco.rossi

I'm using IDLE for my Python programming. I can't seem to solve one
issue though. Whenever I try to indent a region of code, I simply
select it and hit the tab key, as I usually do in most editors, like
GEdit or Geany on Linux, for instance, and it works fine. But, if I
try to unindent a region of code, which i would do by pressing Shift-
Tab in other editors, it just won't work, and I can't find any
combination that will.

Anybody know if this operation is possible at all with IDLE, and if it
is, what's the combination of keys?

Thanx.

Rock
 
B

bizcomputing

I'm using IDLE for my Python programming. I can't seem to solve one
issue though. Whenever I try to indent a region of code, I simply
select it and hit the tab key, as I usually do in most editors, like
GEdit or Geany on Linux, for instance, and it works fine. But, if I
try to unindent a region of code, which i would do by pressing Shift-
Tab in other editors, it just won't work, and I can't find any
combination that will.

Anybody know if this operation is possible at all with IDLE, and if it
is, what's the combination of keys?

Thanx.

Rock
Dealt just recently myself with this issue. You don't say which
platform, and honestly I've not been doing Python long enough to know
what diffs may be in IDLE between platforms. I'm running on XP. In
the IDLE shell, I chose Options/Configure IDLE. This brings up the
configure dialog. Choose the Keys tab. Scroll the Action - Key(s)
list until you find dedent-region. I'm not sure what the default
keystroke is, seem to recall something like CTRL-6 but I could be
totally wrong with that. Anyhow, when you find that entry, you can
see what keystroke is currently assigned to that function. You can
also Use the "Get New Keys for Selection" button to change the key
sequence. I successfully changed it to shift tab. When you make the
change, it will require that you name your new custom key set. Don't
remember the whole process, but hopefully this is enough to get you
the functionality you want under the familure key sequence.

Jim
 
D

Duncan Booth

I'm using IDLE for my Python programming. I can't seem to solve one
issue though. Whenever I try to indent a region of code, I simply
select it and hit the tab key, as I usually do in most editors, like
GEdit or Geany on Linux, for instance, and it works fine. But, if I
try to unindent a region of code, which i would do by pressing Shift-
Tab in other editors, it just won't work, and I can't find any
combination that will.

Anybody know if this operation is possible at all with IDLE, and if it
is, what's the combination of keys?

On my copy of idle the 'format' menu lists indent region, dedent region and
a bunch of similar commands along with their accelerators.
 
M

MRAB

I'm using IDLE for my Python programming. I can't seem to solve one
issue though. Whenever I try to indent a region of code, I simply
select it and hit the tab key, as I usually do in most editors, like
GEdit or Geany on Linux, for instance, and it works fine. But, if I
try to unindent a region of code, which i would do by pressing Shift-
Tab in other editors, it just won't work, and I can't find any
combination that will.

Anybody know if this operation is possible at all with IDLE, and if it
is, what's the combination of keys?
In IDLE 1.2.1 (Windows) the keys are ctrl-] or tab for indent and ctrl-
[ for dedent. You can change them in Options->Configure IDLE...->Keys.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top