Introduction :
IntelliJ Idea is the most popular IDEs for java developers, offering many features to increase productivity. For improving coding speed and efficiency IDEs shortcuts are very useful. For working fast you should know Shortcut and in this blog you learn many useful shortcuts.
1. Navigation Shortcuts
- For go to any class, method of file
Shortcut :
Windows/Linux: Ctral + N (For class), Ctral + shift + N (For file), shift shift
Mac: Command +O (For class), Command + shift + O(For File)
Usage : You can navigate easily to any class or file in your project.
- Go to recent files
Shortcut :
Windows/Linux: Ctrl + E
Mac: Command +E
Usage : You can quickly navigate to a recently opened file.
- Navigate to Declaration
Shortcut :
Windows/Linux: Ctrl + B or Ctrl + Click
Mac: Command + B or Command + Click
Usage : Navigate to the declaration of a variable, method, or class.
- Back and Forward
Shortcut :
Windows/Linux: Ctrl + Alt + Left/Right
Mac: Command + Option + Left/Right
Usage : Move back or forward in the navigation history.
2. Code Editing Shortcuts
- Code Completion
Shortcut :
Windows/Linux: Ctrl + Space
Mac: Command + Space
Use : Invoke basic code completion to speed up coding.
- Smart Completion
Shortcut :
Windows/Linux: Ctrl + Shift + Space
Mac: Command + Shift + Space
Usage : Suggests the most relevant options based on context.
- Generate Code
Shortcut :
Windows/Linux: Alt + Insert
Mac: Command + N
Usage : Quickly generate constructors, getters, setters, equals, hashCode, and toString methods.
- Surround with
Shortcut :
Windows/Linux: Ctrl + Alt + T
Mac: Command + Option + T
Usage : Surround code with common structures like try-catch, if-else, or loops.
- Reformat Code
Shortcut :
Windows/Linux: Ctrl + Alt + L
Mac: Command + Option + L
Usage : Automatically reformat your code like coding standards.
3. Debugging Shortcuts
- Step Into
Shortcut :
Windows/Linux: F7
Mac: F7
Usage : Step into a method during debugging to analyze its implementation.
- Step Over
Shortcut :
Windows/Linux: F8
Mac: F8
Usage : Execute the next line without going into methods.
- Resume Program
Shortcut :
Windows/Linux: F9
Mac: Command + Option + R
Usage : Continue program execution until the next breakpoint.
- Evaluate Expression
Shortcut :
Windows/Linux: Alt + F8
Mac: Option + F8
Usage : Evaluate an expression during debugging to inspect values.
4. Refactoring Shortcuts
- Rename
Shortcut :
Windows/Linux: Shift + F6
Mac: Shift + F6
Usage : Rename variables, methods, classes, or files with automatic updates across the project.
- Extract Variable/Method
Shortcut :
Windows/Linux: Ctrl + Alt + V/M
Mac: Command + Option + V/M
Usage : Extract selected code into a variable or method to enhance readability.
- Safe Delete
Shortcut :
Windows/Linux: Alt + Delete
Mac: Command + Delete
Usage : Safely delete a variable, method, or class, ensuring no references are left.
5. Search Shortcuts
- Find in Files
Shortcut :
Windows/Linux: Ctrl + Shift + F
Mac: Command + Shift + F
Usage : Search for text across all files in the project.
- Replace in Files
Shortcut :
Windows/Linux: Ctrl + Shift + R
Mac: Command + Shift + R
Usage : Search and replace text across the project.
- Highlight Usages
Shortcut :
Windows/Linux: Ctrl + Shift + F7
Mac: Command + Shift + F7
Usage : Highlight all usages of a selected variable or method in the current file.
6. Run and Build Shortcuts
- Run Application
Shortcut :
Windows/Linux: Shift + F10
Mac: Control + R
Usage : Run the application quickly.
- Debug Application
Shortcut :
Windows/Linux: Shift + F9
Mac: Control + D
Usage : Start debugging the application.
- Build Project
Shortcut :
Windows/Linux: Ctrl + F9
Mac: Command + F9
Usage : Compile and build the entire project.
7. Miscellaneous Shortcuts
- Search Everywhere
Shortcut :
Windows/Linux: Shift + Shift
Mac: Shift + Shift
Usage : Search for classes, files, actions, and settings in one place.
- Open Settings
Shortcut :
Windows/Linux: Ctrl + Alt + S
Mac: Command + ,
Usage : Quickly access IDE settings for customization.
Conclusion :
These shortcuts are you can use in your project and easily manage your project. Improve your productivity using shortcuts. By this you can easily format your code and debug into your project.
Whether you are a beginner or experienced developer, these shortcuts helped you very much into your coding.