PyCharm 4.0.0 Web Help

Function Shortcut Use this shortcut to...
Enter EnterEnterEnterEnterEnterEnterEnterEnterEnterEnterEnter Depending on the context:
  • In a lookup list: select an item.
  • In the editor: enter a new line and set the caret at its beginning.
  • In the editor: enter a new line and set the caret at its beginning.

    On pressing EnterEnterEnterEnterEnterEnterEnterEnterEnterEnterEnter, PyCharm adds backslash character to avoid syntactical errors.

Tab TabTabTabTabTabTabTabTabTabTabTab In the editor:
  • With selection: indent selected lines.
  • Without selection: insert a tab symbol (or corresponding number of space characters).
In a lookup list:
  • No code after the caret: select an item.
  • Some code after the caret: select an item and substitute the code after the caret with it.
Delete DeleteDeleteDeleteDeleteDelete or Ctrl+DDeleteDeleteDeleteDelete, Backspace or ⌘ BackspaceDelete, Backspace or ⌘ BackspaceDelete, Backspace or ⌘ Backspace Depending on the context:
  • In the editor: delete selected symbol/block.
  • In a usage view: exclude a selected item.
  • In other views: remove selected items.
Backspace Backspace or Shift+BackspaceBackspace or Shift+BackspaceBackspace or Shift+BackspaceBackspace or Shift+BackspaceBackspace or Shift+BackspaceBackspace or Shift+BackspaceBackspace or Shift+BackspaceBackspace or Shift+BackspaceBackspace or Shift BackspaceBackspace or Shift BackspaceBackspace or Shift Backspace Delete a character to the left of the caret.
Undo Ctrl+Z or Alt+BackspaceCtrl+Z or Alt+BackspaceCtrl+Z or Alt+BackspaceCtrl+Z or Alt+BackspaceCtrl+Shift+Minus or Ctrl+SlashCtrl+ZCtrl+Z or Alt+BackspaceCtrl+Z⌘ Z⌘ Z⌘ Z Undo last operation.
Redo Ctrl+Shift+Z or Shift+Alt+BackspaceCtrl+Shift+Z or Shift+Alt+BackspaceCtrl+Shift+Z or Shift+Alt+BackspaceCtrl+Shift+Z or Shift+Alt+BackspaceCtrl+Shift+Z or Shift+Alt+MinusCtrl+Y or Ctrl+Shift+ZCtrl+Shift+Z, Shift+Alt+Backspace or Ctrl+YCtrl+YShift ⌘ Z or Shift Alt BackspaceShift ⌘ Z or Shift Alt BackspaceShift ⌘ Z Redo last undone operation.
Cut Ctrl+X or Shift+DeleteCtrl+X or Shift+DeleteCtrl+X or Shift+DeleteCtrl+X or Shift+DeleteShift+Delete or Alt+XCtrl+X or Shift+DeleteCtrl+X or Shift+DeleteCtrl+X or Shift+Delete⌘ X or Shift Delete⌘ X or Shift Delete⌘ X or Shift Delete Cut a current line or a selected code block to the Clipboard.
Copy Ctrl+C or Ctrl+InsertCtrl+C or Ctrl+InsertCtrl+C or Ctrl+InsertCtrl+C or Ctrl+InsertCtrl+Insert, Alt+C or Escape, WCtrl+C or Ctrl+InsertCtrl+C or Ctrl+InsertCtrl+C or Ctrl+Insert⌘ C or ⌘ Insert⌘ C or ⌘ Insert⌘ C or ⌘ Insert Copy a current line or a selected code block to the Clipboard.
Paste Ctrl+V or Shift+InsertCtrl+V or Shift+InsertCtrl+V or Shift+InsertCtrl+V or Shift+InsertAlt+P, Shift+Insert or Ctrl+YCtrl+V or Shift+InsertCtrl+V or Shift+InsertCtrl+V or Shift+Insert⌘ V or Shift Insert⌘ V or Shift Insert⌘ V or Shift Insert Paste from the Clipboard to the caret location.
Paste from History Ctrl+Shift+V or Ctrl+Shift+InsertCtrl+Shift+V or Ctrl+Shift+InsertCtrl+Shift+V or Ctrl+Shift+InsertCtrl+Shift+V or Ctrl+Shift+InsertAlt+YCtrl+Shift+V or Ctrl+Shift+InsertCtrl+Shift+V or Ctrl+Shift+InsertCtrl+Shift+V or Ctrl+Shift+InsertShift ⌘ V or Shift ⌘ InsertShift ⌘ V or Shift ⌘ InsertShift ⌘ V or Shift ⌘ Insert Paste selected entry from the Clipboard to the caret location.
Up UpUpUpUpUp or Ctrl+PUpUpUpUp or Control PUpUp or Control P Move the caret one line up.
Up with Selection Shift+UpShift+UpShift+UpShift+UpShift+UpShift+UpShift+UpShift+UpShift UpShift UpShift Up Move the caret one line up selecting the text.
Down DownDownDownDownDown or Ctrl+NDownDownDownDown or Control NDownDown or Control N Move the caret one line down.
Down with Selection Shift+DownShift+DownShift+DownShift+DownShift+DownShift+DownShift+DownShift+DownShift DownShift DownShift Down Move the caret one line down selecting the text.
Left LeftLeftLeftLeftLeft or Ctrl+BLeftLeftLeftLeft or Control BLeftLeft or Control B Move the caret one character to the left.
Left with Selection Shift+LeftShift+LeftShift+LeftShift+LeftShift+LeftShift+LeftShift+LeftShift+LeftShift LeftShift LeftShift Left Move the caret one character to the left selecting the text.
Right RightRightRightRightRight or Ctrl+FRightRightRightRight or Control FRightRight or Control F Move the caret one character to the right.
Right with Selection Shift+RightShift+RightShift+RightShift+RightShift+RightShift+RightShift+RightShift+RightShift RightShift RightShift Right Move the caret one character to the right selecting the text.
Go to Page Bottom Ctrl+Page DownCtrl+Page DownCtrl+Page DownCtrl+Page DownCtrl+Page DownCtrl+Page DownShift+Alt+Page DownCtrl+Page Down⌘ Page Down⌘ Page Down⌘ Page Down Move the caret down to the page bottom.
Go to Page Bottom with Selection Ctrl+Shift+Page DownCtrl+Shift+Page DownCtrl+Shift+Page DownCtrl+Shift+Page DownCtrl+Shift+Page DownCtrl+Shift+Page DownCtrl+Shift+Page DownCtrl+Shift+Page DownShift ⌘ Page DownShift ⌘ Page DownShift ⌘ Page Down Move the caret down to the page bottom, selecting the text.
Go to Page Top Ctrl+Page UpCtrl+Page UpCtrl+Page UpCtrl+Page UpCtrl+Page UpCtrl+Page UpShift+Alt+Page UpCtrl+Page Up⌘ Page Up⌘ Page Up⌘ Page Up Move the caret up to the page top.
Go to Page Top with Selection Ctrl+Shift+Page UpCtrl+Shift+Page UpCtrl+Shift+Page UpCtrl+Shift+Page UpCtrl+Shift+Page UpCtrl+Shift+Page UpCtrl+Shift+Page UpCtrl+Shift+Page UpShift ⌘ Page UpShift ⌘ Page UpShift ⌘ Page Up Move the caret up to the page bottom, selecting the text.
Page Down Page DownPage DownPage DownPage DownPage Down or Ctrl+VPage DownPage DownPage DownPage DownPage DownPage Down Move the caret one page down.
Page Down with Selection Shift+Page DownShift+Page DownShift+Page DownShift+Page DownShift+Page DownShift+Page DownShift+Page DownShift+Page DownShift Page DownShift Page DownShift Page Down Move the caret one page down, selecting the text.
Page Up Page UpPage UpPage UpPage UpPage Up, Ctrl+Z or Alt+VPage UpPage UpPage UpPage UpPage UpPage Up Move the caret one page up.
Page Up with Selection Shift+Page UpShift+Page UpShift+Page UpShift+Page UpShift+Page UpShift+Page UpShift+Page UpShift+Page UpShift Page UpShift Page UpShift Page Up Move the caret one page up, selecting the text.
Scroll Down Ctrl+DownCtrl+DownCtrl+DownCtrl+DownCtrl+DownCtrl+DownCtrl+DownCtrl+DownEditorScrollDown⌘ DownEditorScrollDown Scroll the text one line down.
Scroll to Center Ctrl+MCtrl+MCtrl+MCtrl+MCtrl+MCtrl+MCtrl+MCtrl+MEditorScrollToCenterEditorScrollToCenterEditorScrollToCenter Scroll a line at caret to the center of the screen.
Scroll Up Ctrl+UpCtrl+UpCtrl+UpCtrl+UpCtrl+UpCtrl+UpCtrl+UpCtrl+UpEditorScrollUp⌘ UpEditorScrollUp Scroll the text one line up.
Move to Line End EndEndEndEndEnd or Ctrl+EEndEndEndEnd, ⌘ Right or Control EEnd or ⌘ RightEnd, ⌘ Right or Control E Move the caret to the end of line.
Move to Line End with Selection Shift+EndShift+EndShift+EndShift+EndShift+EndShift+EndShift+EndShift+EndShift End or Shift ⌘ RightShift End or Shift ⌘ RightShift End or Shift ⌘ Right Move the caret to the end of line, selecting the text.
Move to Line Start HomeHomeHomeHomeHome, Ctrl+A or Alt+MHomeHomeHomeHome, ⌘ Left or Control AHome or ⌘ LeftHome, ⌘ Left or Control A Move the caret to the beginning of line.
Move to Line Start with Selection Shift+HomeShift+HomeShift+HomeShift+HomeShift+HomeShift+HomeShift+HomeShift+HomeShift Home or Shift ⌘ LeftShift Home or Shift ⌘ LeftShift Home or Shift ⌘ Left Move the caret to the beginning of line, selecting the text.
Move to Next Word Ctrl+RightCtrl+RightCtrl+RightCtrl+RightCtrl+Right, Alt+F or Escape, Ctrl+FCtrl+RightCtrl+RightCtrl+RightAlt RightAlt RightAlt Right Move the caret to the next word.
Move to Next Word with Selection Ctrl+Shift+RightCtrl+Shift+RightCtrl+Shift+RightCtrl+Shift+RightCtrl+Shift+RightCtrl+Shift+RightCtrl+Shift+RightShift+Alt+Right or Ctrl+Shift+RightShift Alt RightShift Alt RightShift Alt Right Move the caret to the next word, selecting it.
Move to Previous Word Ctrl+LeftCtrl+LeftCtrl+LeftCtrl+LeftCtrl+Left, Alt+B or Escape, Ctrl+BCtrl+LeftCtrl+LeftCtrl+LeftAlt LeftAlt LeftAlt Left Move the caret to the previous word.
Move to Previous Word with Selection Ctrl+Shift+LeftCtrl+Shift+LeftCtrl+Shift+LeftCtrl+Shift+LeftCtrl+Shift+LeftCtrl+Shift+LeftCtrl+Shift+LeftShift+Alt+Left or Ctrl+Shift+LeftShift Alt LeftShift Alt LeftShift Alt Left Move the caret to the previous word, selecting it.
Move to Text End Ctrl+EndCtrl+EndCtrl+EndCtrl+EndCtrl+End or Shift+Alt+PeriodCtrl+EndCtrl+EndCtrl+End⌘ End⌘ End⌘ End Move the caret to the end of text.
Move to Text End with Selection Ctrl+Shift+EndCtrl+Shift+EndCtrl+Shift+EndCtrl+Shift+EndCtrl+Shift+EndCtrl+Shift+EndCtrl+Shift+EndCtrl+Shift+EndShift ⌘ EndShift ⌘ EndShift ⌘ End Move the caret to the end of text, selecting it.
Move to Text Start Ctrl+HomeCtrl+HomeCtrl+HomeCtrl+HomeCtrl+Home, Shift+Alt+Comma or Escape, CommaCtrl+HomeCtrl+HomeCtrl+Home⌘ Home⌘ Home⌘ Home Move the caret to the beginning of text.
Move to Text Start with Selection. Ctrl+Shift+HomeCtrl+Shift+HomeCtrl+Shift+HomeCtrl+Shift+HomeCtrl+Shift+HomeCtrl+Shift+HomeCtrl+Shift+HomeCtrl+Shift+HomeShift ⌘ HomeShift ⌘ HomeShift ⌘ Home Move the caret to the beginning of text, selecting it.
Select All Ctrl+ACtrl+ACtrl+ACtrl+ACtrl+X, HCtrl+ACtrl+ACtrl+A⌘ A⌘ A⌘ A Select the entire text opened in the editor.
Delete Line at Caret Ctrl+YCtrl+YCtrl+YCtrl+YCtrl+YCtrl+Shift+LCtrl+ECtrl+D⌘ Backspace⌘ Y⌘ D Delete the line where the caret is currently located.
Delete to Word End Ctrl+DeleteCtrl+DeleteCtrl+DeleteCtrl+DeleteCtrl+DeleteCtrl+DeleteCtrl+DeleteCtrl+DeleteAlt DeleteAlt Delete⌘ Delete Delete the word starting from the current caret location up to the word end.
Delete to Word Start Ctrl+BackspaceCtrl+BackspaceCtrl+BackspaceCtrl+BackspaceCtrl+Backspace, Alt+Backspace or Escape, BackspaceCtrl+BackspaceCtrl+BackspaceCtrl+BackspaceAlt BackspaceAlt Backspace⌘ Backspace Delete the word starting from the current caret location up to the word start.
Toggle Insert/Overwrite InsertInsertInsertInsertInsertInsertInsertInsertShift BackspaceInsertShift Backspace Toggle insert/overwrite modes.
Duplicate Line or Block Ctrl+DCtrl+DCtrl+DCtrl+D⌘+DCtrl+DCtrl+D, Ctrl+Shift+Down or Ctrl+Shift+UpCtrl+D⌘ D⌘ D⌘ D Duplicate selected block or the line at the caret.
Toggle Case Ctrl+Shift+UCtrl+Shift+UCtrl+Shift+UCtrl+Shift+UCtrl+Shift+UCtrl+Shift+UCtrl+U, SCtrl+Shift+U, Ctrl+Shift+X or Ctrl+Shift+YShift ⌘ UShift ⌘ UShift ⌘ X or Shift ⌘ Y Toggle case of the selected text block.
Move to Code Block End Ctrl+Close BracketCtrl+Close BracketCtrl+Close BracketCtrl+Close BracketCtrl+Close Bracket, Ctrl+Alt+Close Bracket or Ctrl+Alt+BCtrl+Close Bracket or Ctrl+AsteriskCtrl+Close BracketCtrl+Close Bracket or Ctrl+Shift+PAlt ⌘ Close Bracket⌘ Close BracketControl Close Bracket or Control Shift P Move the caret to the current code block end, highlighting the block limits.
Move to Code Block End with Selection Ctrl+Shift+Close BracketCtrl+Shift+Close BracketCtrl+Shift+Close BracketCtrl+Shift+Close BracketCtrl+Shift+Close Bracket or Ctrl+Shift+Alt+FCtrl+Shift+Close BracketCtrl+Shift+Close BracketCtrl+Shift+Close BracketShift Alt ⌘ Close BracketShift ⌘ Close BracketShift Alt ⌘ Close Bracket Move the caret to the current code block end, selecting the code beginning from the initial caret location.
Move to Code Block Start Ctrl+Open BracketCtrl+Open BracketCtrl+Open BracketCtrl+Open BracketCtrl+Open Bracket, Ctrl+Alt+Open Bracket or Ctrl+Alt+FCtrl+Open BracketCtrl+Open BracketCtrl+Open BracketAlt ⌘ Open Bracket⌘ Open BracketAlt ⌘ Open Bracket Move the caret to the current code block start, highlighting the block limits.
Move to Code Block Start with Selection Ctrl+Shift+Open BracketCtrl+Shift+Open BracketCtrl+Shift+Open BracketCtrl+Shift+Open BracketCtrl+Shift+Open Bracket or Ctrl+Shift+Alt+BCtrl+Shift+Open BracketCtrl+Shift+Open BracketCtrl+Shift+Open BracketShift Alt ⌘ Open BracketShift ⌘ Open BracketShift Alt ⌘ Open Bracket Move the caret to the current code block start, selecting the code beginning from the initial caret location.
Start New Line Shift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift EnterShift EnterShift Enter Start a new line after the current one positioning the caret in accordance with the current indentation level.
Start New Line Before Current One Ctrl+Alt+EnterCtrl+Alt+EnterCtrl+Alt+EnterCtrl+Alt+EnterCtrl+Alt+EnterCtrl+Alt+EnterCtrl+Alt+EnterCtrl+Alt+EnterAlt ⌘ EnterAlt ⌘ EnterAlt ⌘ Enter Start a new line before the current one.
Join Lines Ctrl+Shift+JCtrl+Shift+JCtrl+Shift+JCtrl+Shift+JCtrl+Shift+JCtrl+Shift+JCtrl+Shift+JCtrl+Shift+JControl Shift JControl Shift JControl Shift J Concatenate the selected lines into one or concatenate the line where the caret is currently located with the next line.
1.2+Split Line Ctrl+EnterCtrl+EnterCtrl+EnterCtrl+EnterCtrl+OCtrl+EnterCtrl+EnterCtrl+Enter⌘ Enter⌘ Enter⌘ Enter Split the selected line at the point where the caret is located, leaving the caret at the end of the first line.
1.2+Split Line Ctrl+EnterCtrl+EnterCtrl+EnterCtrl+EnterCtrl+OCtrl+EnterCtrl+EnterCtrl+Enter⌘ Enter⌘ Enter⌘ Enter Split the selected line at the point where the caret is located, leaving the caret at the end of the first line.

This shortcut splits a line without adding a backslash.

Select Word at Caret Ctrl+WCtrl+WCtrl+WCtrl+WCtrl+Alt+WCtrl+WShift+Alt+PeriodShift+Alt+UpAlt Up⌘ WControl Shift Up Select successively increasing code blocks starting from the current caret location.
Unselect Word at Caret Ctrl+Shift+WCtrl+Shift+WCtrl+Shift+WCtrl+Shift+WCtrl+Shift+WCtrl+Shift+WShift+Alt+CommaShift+Alt+DownAlt DownShift ⌘ WControl Shift Down Remove sequentially the selection made by the action.
Indent Selection TabTabTabTabTabTabTabTabTabTabTab Move the selected block to the next indentation level.
Unindent Selection Shift+TabShift+TabShift+TabShift+TabShift+TabShift+TabShift+Alt+Left or Shift+TabShift+TabShift TabShift TabShift Tab Move the selected block to the previous indentation level.
Auto-Indent Lines Ctrl+Alt+ICtrl+Alt+ICtrl+Alt+ICtrl+Alt+ICtrl+Alt+I or Ctrl+Alt+QCtrl+Alt+ICtrl+Alt+ICtrl+IControl Alt IAlt ⌘ I⌘ I Indent the current line or selected block according to the Code Style settings.

See Also

Procedures:

Reference:

Getting Started:

Web Resources: