问题记录 | VScode中使用IntelliJ的快捷键

主要想用ctrl+alt+l格式化Python代码
安装VScode的插件:IntelliJ IDEA Keybindings
安装方法:

Installation

  1. Install Visual Studio Code 1.30.2 or higher
  2. Launch Code
  3. From the extension view Ctrl-Shift-X (Windows, Linux) or Cmd-Shift-X (macOS)
  4. Search and Choose the extension Intellij IDEA Keybindings
  5. Reload Visual Studio Code

就可以使用一下快捷键:

Usage

Editing

ctrl+spacectrl+spaceBasic code completion (the name of any class, method or variable)
ctrl+shift+spacectrl+shift+spaceSmart code completion (filters the list of methods and variables by expected type)N/A
ctrl+shift+entercmd+shift+enterComplete statement
ctrl+pcmd+pParameter info (within method call arguments)
ctrl+qctrl+jQuick documentation lookup
ctrl+f1shift+f1External DocN/A
ctrl+mouseovercmd+mouseoverBrief InfoN/A
ctrl+f1cmd+f1Show descriptions of error or warning at caret
alt+insertcmd+nGenerate code... (Getters, Setters, Constructors, hashCode/equals, toString)
ctrl+octrl+oOverride methodsN/A
ctrl+ictrl+iImplement methodsN/A
ctrl+alt+tcmd+alt+tSurround with... (if..else, try..catch, for, synchronized, etc.)N/A
ctrl+/cmd+/Comment/uncomment with line comment
ctrl+numpad_dividecmd+numpad_divideComment/uncomment with line comment
ctrl+alt+/cmd+alt+/Comment/uncomment with block comment
ctrl+alt+numpad_dividecmd+alt+numpad_divideComment/uncomment with block comment
ctrl+walt+upSelect successively increasing code blocks
ctrl+shift+walt+downDecrease current selection to previous state
alt+qctrl+shift+qContext infoN/A
alt+enteralt+enterShow intention actions and quick-fixes
ctrl+alt+lcmd+alt+lReformat code
ctrl+alt+lcmd+alt+lReformat selected code
ctrl+alt+octrl+alt+oOptimize importsN/A
ctrl+alt+ictrl+alt+iAuto-indent line(s)N/A
tabtabIndent selected linesN/A
shift+tabshift+tabUnindent selected linesN/A
ctrl+xcmd+xCut current line or selected block to clipboard
shift+deletecmd+deleteCut current line or selected block to clipboard
ctrl+ccmd+cCopy current line or selected block to clipboard
ctrl+vcmd+vPaste from clipboard
ctrl+shift+vcmd+shift+vPaste from recent buffers...N/A
ctrl+dcmd+dDuplicate current line or selected block
ctrl+ycmd+backspaceDelete line at caret
ctrl+shift+jctrl+shift+jSmart line join
ctrl+entercmd+enterSmart line split
shift+entershift+enterStart new line
ctrl+shift+ucmd+shift+uToggle case for word at caret or selected blockN/A
ctrl+shift+]cmd+shift+]Select till code block endN/A
ctrl+shift+[cmd+shift+[Select till code block startN/A
ctrl+deletealt+deleteDelete to word end
ctrl+backspacealt+backspaceDelete to word start
ctrl+=cmd+=Expand code block
ctrl+numpad_addcmd+numpad_addExpand code block
ctrl+-cmd+-Collapse code block
ctrl+numpad_subtractcmd+numpad_subtractCollapse code block
ctrl+shift+=cmd+shift+=Expand all
ctrl+shift+numpad_addcmd+shift+numpad_addExpand all
ctrl+shift+-cmd+shift+-Collapse all
ctrl+shift+numpad_subtractcmd+shift+numpad_subtractCollapse all
ctrl+f4cmd+wClose active editor tab
alt+jctrl+gAdd selection for Next Occurrence
alt+shift+jctrl+shift+gUnselect Occurrence
shift+alt+downshift+alt+downMove Line Down
shift+alt+upshift+alt+upMove Line Up

Search/Replace

shift shiftshift shiftSearch everywhereN/A
ctrl+fcmd+fFind
f3cmd+gFind next
shift+f3cmd+shift+gFind previous
ctrl+rcmd+rReplace
ctrl+shift+fcmd+shift+fFind in path
ctrl+shift+rcmd+shift+rReplace in path
ctrl+shift+scmd+shift+sSearch structurally (Ultimate Edition only)N/A
ctrl+shift+mcmd+shift+mReplace structurally (Ultimate Edition only)N/A

Usage Search

alt+f7alt+f7Find usages
alt+ctrl+f7alt+cmd+f7Show usages
ctrl+f7cmd+f7Find usages in fileN/A
ctrl+shift+f7cmd+shift+f7Highlight usages in fileN/A
ctrl+alt+f7cmd+alt+f7Show usagesN/A

Compile and Run

ctrl+f9cmd+f9Make project (compile modifed and dependent)
ctrl+shift+f9cmd+shift+f9Compile selected file, package or moduleN/A
alt+shift+f10ctrl+alt+rSelect configuration and run
alt+shift+f9ctrl+alt+dSelect configuration and debug
shift+f10ctrl+rRunN/A
shift+f9ctrl+dDebug
ctrl+shift+f10ctrl+shift+rRun context configuration from editorN/A
ctrl+shift+f10ctrl+shift+rDebug context configuration from editorN/A

Debugging

f8f8Step over
f7f7Step into
shift+f7shift+f7Smart step intoN/A
shift+f8shift+f8Step out
alt+f9alt+f9Run to cursor
alt+f8alt+f8Evaluate expression
alt+f8alt+f8Evaluate expression (selection)
f9cmd+alt+rResume program
ctrl+f8cmd+f8Toggle breakpoint
ctrl+shift+f8cmd+shift+f8View breakpoints

Navigation

ctrl+ncmd+oGo to class
ctrl+shift+ncmd+shift+oGo to file
ctrl+alt+shift+ncmd+alt+oGo to symbol
alt+leftctrl+leftGo to previous editor tab
shift+cmd+[Go to previous editor tab
alt+rightctrl+rightGo to next editor tab
shift+cmd+]Go to next editor tab
f12f12Go back to previous tool windowN/A
escapeescapeGo to editor (from tool window)N/A
shift+escapeshift+escapeHide active or last active window (Sidebar)
shift+escapeshift+escapeHide active or last active window (Output)
shift+escapeshift+escapeHide active or last active window (Problems)
shift+escapeshift+escapeHide active or last active window (Debug Console)
shift+escapeshift+escapeHide active or last active window (Terminal)
shift+escapeshift+escapeHide active or last active window (Panel)N/A
ctrl+shift+f4cmd+shift+f4Close active run/messages/find/... tabN/A
ctrl+gcmd+lGo to line
ctrl+ecmd+eRecent files popup
ctrl+alt+leftcmd+alt+leftNavigate back
cmd+[Navigate back
ctrl+alt+rightcmd+alt+rightNavigate forward
cmd+]Navigate forward
ctrl+shift+backspacecmd+shift+backspaceNavigate to last edit location
alt+f1alt+f1Select current file or symbol in any viewN/A
ctrl+bcmd+bGo to declaration
ctrl+alt+bcmd+alt+bGo to implementation(s)
ctrl+shift+ialt+spaceOpen quick definition lookup
cmd+yOpen quick definition lookup
ctrl+shift+bctrl+shift+bGo to type declaration
ctrl+ucmd+uGo to super-method/super-classN/A
alt+upctrl+upGo to previous methodN/A
alt+downctrl+downGo to next methodN/A
ctrl+]cmd+]Move to code block endN/A
ctrl+[cmd+[Move to code block startN/A
ctrl+f12cmd+f12File structure popup
ctrl+hctrl+hType hierarchyN/A
ctrl+shift+hcmd+shift+hMethod hierarchyN/A
ctrl+alt+hctrl+alt+hCall hierarchyN/A
f2f2Next highlighted error
shift+f2shift+f2Previous highlighted error
f4f4Edit source
ctrl+entercmd+downView source
shift+ctrl+downshift+alt+downMove Statement Down
shift+ctrl+upshift+alt+upMove Statement Up
alt+homealt+homeShow navigation barN/A
f11f3Toggle bookmarkN/A
ctrl+f11alt+f3Toggle bookmark with mnemonicN/A
ctrl+0ctrl+0Go to numbered bookmarkN/A
shift+f11cmd+f3Show bookmarksN/A
ctrl+alt+shift+downctrl+alt+shift+downNext Change
ctrl+alt+shift+upctrl+alt+shift+upPrevious Change

Refactoring

f5f5CopyN/A
f6f6MoveN/A
alt+deletecmd+deleteSafe DeleteN/A
shift+f6shift+f6Rename
shift+f6shift+f6Rename (File)
ctrl+f6cmd+f6Change SignatureN/A
ctrl+alt+ncmd+alt+nInlineN/A
ctrl+alt+mcmd+alt+mExtract Method
ctrl+alt+vcmd+alt+vExtract Variable
ctrl+alt+fcmd+alt+fExtract FieldN/A
ctrl+alt+ccmd+alt+cExtract ConstantN/A
ctrl+alt+pcmd+alt+pExtract ParameterN/A

VCS/Local History

ctrl+kcmd+kCommit project to VCS
ctrl+shift+kcmd+shift+kPush commits to VCS
ctrl+tcmd+tUpdate project from VCS
alt+shift+calt+shift+cView recent changesN/A
ctrl+`ctrl+v‘VCS’ quick popup

Live Templates

ctrl+alt+jcmd+alt+jSurround with Live TemplateN/A
ctrl+jcmd+jInsert Live TemplateN/A

General

alt+0cmd+0Activate Messages window (Problems)
alt+numpad0cmd+numpad0Activate Messages window (Problems)
alt+1cmd+1Open corresponding tool window (Explorer)
alt+numpad1cmd+numpad1Open corresponding tool window (Explorer)
alt+1cmd+1Close corresponding tool window (Explorer)
alt+numpad1cmd+numpad1Close corresponding tool window (Explorer)
alt+3cmd+3Open corresponding tool window (Search)
alt+numpad3cmd+numpad3Open corresponding tool window (Search)
alt+3cmd+3Close corresponding tool window (Search)
alt+numpad3cmd+numpad3Close corresponding tool window (Search)
alt+5cmd+5Open corresponding tool window (Debug)
alt+numpad5cmd+numpad5Open corresponding tool window (Debug)
alt+5cmd+5Close corresponding tool window (Debug)
alt+numpad5cmd+numpad5Close corresponding tool window (Debug)
alt+9cmd+9Open corresponding tool window (Git)
alt+numpad9cmd+numpad9Open corresponding tool window (Git)
alt+9cmd+9Close corresponding tool window (Git)
alt+numpad9cmd+numpad9Close corresponding tool window (Git)
ctrl+scmd+sSave all
ctrl+alt+ycmd+alt+ySynchronize
ctrl+alt+fctrl+cmd+fToggle full screen mode
ctrl+shift+f12cmd+shift+f12Toggle maximizing editor
alt+shift+falt+shift+fAdd to FavoritesN/A
alt+shift+ialt+shift+iInspect current file with current profileN/A
ctrl+`ctrl+`Quick switch current scheme
ctrl+alt+scmd+,Open Settings dialog
ctrl+alt+scmd+numpad_separatorOpen Settings dialog
ctrl+alt+shift+scmd+;Open Project Structure dialog
ctrl+shift+ashift+cmd+aFind Action
ctrl+tabctrl+tabSwitch between tabs and tool window

Custom

f7f7Next difference
shift+f7shift+f7Previous difference
alt+ctrl+enteralt+cmd+enterStart new line before current
shift+ctrl+entershift+cmd+enterStart new line
alt+f12alt+f12Opens and focuses corresponding tool window (Terminal)
alt+f12alt+f12Close corresponding tool window (Terminal)
ctrl+shift+alt+jctrl+cmd+gSublime Text style multiple selections
alt+leftshift+cmd+[Select previous tab (Terminal)
alt+rightshift+cmd+]Select next tab (Terminal)
alt+tabalt+tabGoto next splitter
shift+alt+tabshift+alt+tabGoto previous splitter
enterenterOpen Highlighted File (Explorer)
alt+homealt+homeJump to Navigation Bar

Custom

f7f7Next difference
shift+f7shift+f7Previous difference
alt+ctrl+enteralt+cmd+enterStart new line before current
shift+ctrl+entershift+cmd+enterStart new line
alt+f12alt+f12Opens and focuses corresponding tool window (Terminal)
alt+f12alt+f12Close corresponding tool window (Terminal)
ctrl+shift+alt+jctrl+cmd+gSublime Text style multiple selections
alt+leftshift+cmd+[Select previous tab (Terminal)
alt+rightshift+cmd+]Select next tab (Terminal)
alt+tabalt+tabGoto next splitter
shift+alt+tabshift+alt+tabGoto previous splitter
enterenterOpen Highlighted File (Explorer)
alt+homealt+homeJump to Navigation Bar
shift+ctrl+cshift+cmd+cCopy paths
05-11 13:48