Is there a keyboard shortcut to "untab" (move a block of code to the left) in Eclipse or Aptana Studio?
Asked Answered
F

11

272

It's so easy to select a block of code and tab out, but how about the reverse?

Currently, I just search and replace for white space at the beginning of the line. Is there anything faster?

Fonzie answered 27/6, 2009 at 12:48 Comment(0)
S
576

In Visual Studio and most other half decent IDEs you can simply do SHIFT+TAB. It does the opposite of just TAB.

I would think and hope that the IDEs you mention support this as well.

Substantiate answered 27/6, 2009 at 12:51 Comment(13)
Xcode is slightly different, uses COMMAND-[ and COMMAND-]Calchas
For any future folks who end up here via a Google search, this also works in Github's Atom IDE.Earthshine
Fine also in IntelliJMurr
SHIFT+TAB works for Android Studio as well. Thanks !Parol
Works in VSCodeArrhythmia
Works fine in Sublime as well.Quiles
android studio tooShadshadberry
Works in Notepad++Interleaf
Likewise in PyCharmAccede
" Ctrl+[ " will work for VScode not "shift+tab". at least in my caseCerell
Works in Anypoint StudioCertificate
Works in RStudio as well, many thanks!Crowl
Also works with Mui Components :)Dentilabial
S
23

Shift-tab outdents again :)

The standard shortcut keys are covered in Standard Accelerators.

You'll find many of the more esoteric ones on FAQ What editor keyboard shortcuts are available?.

Sherrie answered 27/6, 2009 at 12:51 Comment(0)
A
13

Here is a general answer for untab:

In Python IDLE: Ctrl + [

In Eclipse: Shift + Tab

In Visual Studio: Shift + Tab

Antiquary answered 30/5, 2016 at 15:43 Comment(1)
The IDLE one is an example of one that is only suited for an American keyboard layout. E.g., Shift + AltGr + 8 is just not practical.Ret
M
8

In general, Shift + Tab works for any environment.

Mindymine answered 29/12, 2014 at 21:46 Comment(0)
L
6

This workaround works most of the time. It uses Eclipse's 'smart insert' features instead:

  1. Control + X to erase the selected block of text, and keep it for pasting.
  2. Control + Shift + Enter, to open a new line for editing above the one you are at.
  3. You might want to adjust the tabbing position at this point. This is where tabbing will start, unless you are at the beginning of the line.
  4. Control + V to paste back the buffer.

I hope this helps until Shift + TAB is implemented in Eclipse.

Larrisa answered 20/5, 2011 at 15:36 Comment(0)
S
5

Shift + Tab does that in Flex Builder (based on Eclipse), so it hopefully should work in regular Eclipse :)

Symphonic answered 27/6, 2009 at 12:51 Comment(0)
B
5

In PyCharm, just use Shift + Tab to move a block of code left.

Blindage answered 11/9, 2014 at 7:3 Comment(0)
E
4

Yes, in PyCharm: Shift + Tab works fine.

Echevarria answered 28/10, 2022 at 16:23 Comment(1)
Works in Vscode too!Bribe
S
3

Yes, You can do this in VS Code & Same works in most of IDE with the help of Shift + Tab.

Process :

a) Select the code you want to take one tab back. b) Press SHIFT + TAB

Storax answered 29/5, 2023 at 4:22 Comment(0)
C
2

You can do this by going to the Window menu → Preferences, and then open the General list. Choose Keys.

Scroll down the list of keys until you see "Shift Left". Click that. Below that, you'll see some boxes, one of which lets you bind a key. It won't accept Shift + Tab, so I bound it to Shift + `. Apply Apply and Close, and you're all set.

Cipher answered 29/8, 2018 at 13:36 Comment(0)
B
0

You can also change the shortcut. Use the Command + K, Command + S shortcuts to open the Keyboard Shortcut menu. Search for the "tab" and find the "outdent" in the list.

Blackdamp answered 6/4, 2022 at 18:31 Comment(1)
On a crapple device?Ret

© 2022 - 2024 — McMap. All rights reserved.