IntelliJ idea for Mac shortcut keys

Source: Internet
Author: User
Tags class definition delete key

    • According to the official PDF translation: Https://www.jetbrains.com/idea/docs/IntelliJIDEA_ReferenceCard_Mac.pdf
    • In IntelliJ idea there are two Mac versions of the shortcut keys, one called: Mac OS X, one called: Mac OS X 10.5+
    • Currently used: Mac OS X 10.5+
    • There are two sets of reasons: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206159109-Updated-Mac-OS-X-keymap-Feedback-needed

It is recommended that you cancel or change the shortcut keys in your MAC system that conflict with IntelliJ idea, and do not recommend changing the default shortcut key for IntelliJ.

Description of Mac keyboard symbols and modifier keys
    • ?Command
    • ?Shift
    • ?Option
    • ?Control
    • ??Return/enter
    • ?Delete
    • ?Forward Delete key (Fn+delete)
    • Up ARROW
    • Down ARROW
    • Left Arrow
    • Right Arrow
    • ?Page Up (fn+↑)
    • ?Page Down (fn+↓)
    • HomeFn +←
    • EndFn +→
    • ?Right tab (Tab key)
    • ?Left tab (SHIFT+TAB)
    • ?Escape (ESC)
First, Editing (edit)
  • Control + SpaceBasic code completion (complete any class, method, variable)
  • Control + Shift + SpaceSmart Code Completion (Filter method list and expected types of variables)
  • Command + Shift + EnterAuto-end code, automatically add semicolon at end of line
  • Command + PDisplay parameter information for a method
  • Control + JQuickly view documents
  • Shift + F1View external documents (on some code triggers open browser display related documents)
  • Command + 鼠标放在代码上Display Code Summary information
  • Command + F1Display specific description information at error or warning
  • Command + N, Control + Enter, Control + NGenerate code (getter, setter, constructor, hashcode/equals,tostring)
  • Control + Ooverriding methods (overriding parent class methods)
  • Control + IImplementation method (implements the method in the interface)
  • Command + Option + TSurround the code (using the IF: else, try: Catch, for, synchronized, etc. surround the selected code)
  • Command + /Comment/Uncomment and line comment
  • Command + Option + /Commenting/canceling comments and block annotations
  • Option + 方向键上Continuous selection of code blocks
  • Option + 方向键下Reduce the code block currently selected
  • Control + Shift + QDisplay contextual information
  • Option + EnterShow intent actions and quick fix codes
  • Command + Option + LFormatting code
  • Control + Option + OOptimize import
  • Control + Option + IAuto Indent Line
  • Tab / Shift + TabIndent code/anti-indent code
  • Command + XCuts the current row or selected block to the Clipboard
  • Command + CCopy the current line or selected block to the Clipboard
  • Command + VPaste from clipboard
  • Command + Shift + VPaste from the nearest buffer
  • Command + DCopy the current row or selected block
  • Command + DeleteDelete the row of the current row or selected block
  • Control + Shift + JIntelligently stitching code into a single line
  • Command + EnterSmart Split stitching Lines
  • Shift + EnterStart a new line
  • Command + Shift + UCase switching
  • Command + Shift + ] / Command + Shift + [Select until code block ends/starts
  • Option + Fn + DeleteDelete to the end of a word
  • Option + DeleteDelete to the beginning of a word
  • Command + 加号 / Command + 减号Expand/Collapse Code blocks
  • Command + Shift + 加号Expand so the code block
  • Command + Shift + 减号Collapse All code blocks
  • Command + WClose the Active editor tab
Second, search/replace (query/replace)
    • Double ShiftCheck anything.
    • Command + FFind in Files
    • Command + GFind mode, look down
    • Command + Shift + GFind mode, look up
    • Command + RIn-file replacement
    • Command + Shift + FGlobal lookup (depending on path)
    • Command + Shift + RGlobal substitution (based on path)
    • Command + Shift + SQuery structure (Ultimate Edition version is dedicated, need to be set in Keymap)
    • Command + Shift + MReplacement structure (Ultimate Edition version, need to be set in Keymap)
Iii. usage search (using queries)
    • Option + F7 / Command + F7Find usages in files/find usages in a class
    • Command + Shift + F7The usage highlighted in the file
    • Command + Option + F7Display usage
Iv. Compile and run (compiling and running)
    • Command + F9Compiling project
    • Command + Shift + F9Compiling a selected file, package, or module
    • Control + Option + RPop-up Run's selectable menu
    • Control + Option + DPop-up Debug selectable menu
    • Control + RRun
    • Control + DDebugging
    • Control + Shift + R, Control + Shift + DTo run the context environment configuration from the editor
Five, debugging (commissioning)
    • F8Enter next, if the current line breakpoint is a method, do not enter the current method body
    • F7In the next step, if the current line breakpoint is a method, enter the current method body, and if the method body has a method, it will not enter the inline method
    • Shift + F7Smart step in, there are multiple method calls on the line of the breakpoint, which will pop into which method
    • Shift + F8Jump
    • Option + F9Run to the cursor, if there are other breakpoints in front of the cursor to enter the breakpoint
    • Option + F8Evaluate an expression (you can change the value of the variable to take effect)
    • Command + Option + RThe recovery program runs and stops at the next breakpoint if the code below the breakpoint has a breakpoint
    • Command + F8Toggle Breakpoint (If the cursor has a breakpoint at the current line, the breakpoint is canceled and no breakpoint is added)
    • Command + Shift + F8Viewing breakpoint information
Vi. Navigation (Navigation)
  • Command + OFind class file
  • Command + Shift + OFind all types of files, open files, open directories, open directories you need to add a backslash before or after the input/
  • Command + Option + OGo to the specified variable/method
  • Control + 方向键左 / Control + 方向键右Toggle open Edit Tab left and right
  • F12Go back to the previous tool window
  • EscEnter the code file window from the tool window
  • Shift + EscHides the current or last active window, and the cursor enters the code file window
  • Command + Shift + F4Close Activity run/messages/find/... tab
  • Command + LJumps to a line at the specified point in the current file
  • Command + EDisplays a list of recently opened file records
  • Option + 方向键左 / Option + 方向键右Cursor jumps to the left/right start position of the current word/Chinese sentence
  • Command + Option + 方向键左 / Command + Option + 方向键右Go back/forward to the last action place
  • Command + Shift + DeleteJump to the last edit place
  • Option + F1Display the current file selection target pop-up layer, there are many targets in the pop-up layer can be selected (such as in the Code editing window can select the Finder to display the file)
  • Command + B / Command + 鼠标点击Enter the interface or definition of the method/variable where the cursor is located
  • Command + Option + BJump to the implementation, use the method name on a call will jump to the specific implementation, you can skip the interface
  • Option + Space, Command + YQuick Open cursor method, class definition
  • Control + Shift + BJump to type declaration
  • Command + UGo to the method/interface definition of the parent class of the method where the cursor is currently located
  • Control + 方向键下 / Control + 方向键上The current cursor jumps to the previous/next method name location of the current file
  • Command + ] / Command + [Move the cursor to the start/end position of the curly brace of the current code
  • Command + F12pops up the current file structure layer, which can be filtered directly on the popup layer (can be used to search for methods in the class)
  • Control + HDisplays the hierarchy of the current class
  • Command + Shift + HShow method Hierarchies
  • Control + Option + HShow Call Hierarchy
  • F2 / Shift + F2Jump to Next/previous highlight error or warning location
  • F4 / Command + 方向键下Edit/View Code source
  • Option + HomeDisplay the navigation bar to the current file
  • F3Select File/folder/Line of code, add/Remove bookmarks
  • Option + F3Select File/folder/Line of code, use mnemonics to add/Remove bookmarks
  • Control + 0...Control + 9Position the bookmark location to the corresponding value
  • Command + F3Show All bookmarks
Vii. Refactoring (reconstruction)
    • F5Copy files to the specified directory
    • F6Move files to the specified directory
    • Command + DeleteDelete file on file for safe, popup confirmation box
    • Shift + F6Renaming files
    • Command + F6Change signature
    • Command + Option + NConsistency
    • Command + Option + MExtract the selected code as a method
    • Command + Option + VExtracting variables
    • Command + Option + FExtract fields
    • Command + Option + CExtracting constants
    • Command + Option + PExtracting parameters
Viii. vcs/local History (version control/local record)
    • Command + KSubmit code to version controller
    • Command + TUpdating code from a version controller
    • Option + Shift + CView the most recent change history
    • Control + CQuick Eject version Controller operator panel
Ix. Live Templates (Dynamic code template)
    • Command + Option + JPop-up template selection window, use dynamic template to wrap selected code
    • Command + JInserting custom dynamic Code templates
X. General (GM)
    • Command + 1...Command + 9Open the corresponding numbered tool window
    • Command + SSave All
    • Command + Option + YSync, Refresh
    • Control + Command + FToggle Full Screen mode
    • Command + Shift + F12Toggle Maximize Editor
    • Option + Shift + FAdd to Favorites
    • Option + Shift + ICheck the current file with the current configuration file
    • Control + ' quick switch to Current scheme (toggle theme, code style, etc.)
    • Command + ,Open Idea System settings
    • Command + ;Open the Project Structure dialog box
    • Shift + Command + AFind actions (you can set related options)
    • Control + Shift + TabToggle between the Edit Window label and the tool window (if you press DELETE in the toggle process, the selected window is closed)
Xi. Other (shortcut keys not shown on some official documents)
    • Command + Shift +8Vertical edit mode

IntelliJ idea for Mac shortcut keys

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.