PyCharm hotkey to indent/un-indent a line at caret?
12,891
As @cdbajorin answered, it's just one more step - selecting a character to indent whole line i.e. no-selection will indent text on the right only.
If you select a single character on the line, tab/shift tab will do the
Author by
Nam G VU
I love to learn and try new stuff; dreaming to create ones someday!
Updated on June 09, 2022Comments
-
Nam G VU about 2 years
Currently we can move a line up/down by
alt
+shift
+UP
andalt
+shift
+DOWN
Though, when we have moved the line to target position and want to indent it, we have to go to the beginning of the line to
tab
/shift-tab
.I wonder if we can do that right away at caret position i.e. without having to move to the begin of line.
p.s.
My google results as this page put
ctrl
+alt
+I
not work for me. -
Chandan Nayak over 5 yearsselecting a character is the key, I was used to vs code where just keeping the cursor does the indent work.
-
Nam G VU over 5 years@ChandanNayak What is your point about vscode, I don't get it?
-
Chandan Nayak over 5 yearsI wanted to say - on vs code I do not have to select any character by just placing the cursor anywhere on the line and hit cmd + }/{ to do the indent. But with pycharm i needed to select a word/character to do the indent. Because it just tabs outward from the cursor with pycharm.
-
Nam G VU over 5 yearsGot it. Thanks for sharing. But working with Python the opensource way, vscode from microsoft should not be the IDE for us I think.
-
qiz_newbie about 2 yearsthere is a keymap named "indent Line or Selection",it dont need to select any text @ChandanNayak