Visual Studio / IntelliJ Shortcuts

Moving to a new IDE? Need some help navigating the shortcut keys and descriptions? Here are 22 shortcut keys used in both Visual Studio and IntelliJ to try and help.

I started my career as a .Net developer, using Visual Studio to write 100% of my code. Naturally over the course of my development, I picked up several shortcuts that drastically increased my productivity. When I started to expand my knowledge and started working with Java, I reluctantly had to switch my IDE as well. The most difficult and frustrating part of that process was having to to start over with my shortcuts and learning the difference between what Microsoft called something and what JetBrains called something. Hopefully the 22 keyboard shortcuts below will help you make the transition, whichever way you are going.

Visual Studio to IntelliJ Shortcut Map

Below is a chart of shortcuts in Visual Studio and the equivalent shortcut in IntelliJ. I used dofactory's Visual Studio shortcut keys to assist with the Visual Studio descriptions and JetBrains Help Documentation with the IntelliJ descriptions.

All shortcut keys were tested for accuracy using Visual Studio - Enterprise 2017 Version 4.6.01055 and IntelliJ IDEA 2016.2.5.

Visual Studio
Intelli J
Go To Declaration: Navigates to the declaration of the selected symbol in the code. This is slightly different than Go To Definition because it goes to the implementation whereas Go To Definition navigates to an interface / base class if it exists.
Navigate to Implementation: Navigate to implementation of an item at the caret. This is slightly different than Go To Definition because it goes to the implementation whereas Go To Definition navigates to an interface / base class if it exists.
Go To Declaration
Ctrl + F12
Navigate to Implementation
Ctrl + Alt + B
Go To Definition: Navigates to the definition of the selected symbol in the code. This is slight different than Go To Declaration because this one will go the interface or base class if it exists, whereas the Go To Declaration goes to the implementation.
Navigate To Declaration: Navigates directly to an elements declaration from any usage. This is slight different than Go To Declaration because this one will go the interface or base class if it exists, whereas the Go To Declaration goes to the implementation.
Go To Definition
F12
Navigate To Declaration
Ctrl + B
Comment: Surrounds the current line or the selected lines of code with the correct comment syntax for the programming language. Also know as "commenting out code".
Comment: Comments the current line or selected block of source code.
Comment
Ctrl + K, Ctrl + C
Comment
Ctrl + /
Uncomment: Removes the comment syntax from the current line or the currently selected lines of code.
Uncomment: Uncomments the current line or current block or source the.
Uncomment
Ctrl + K, Ctrl + U
Uncomment
Ctrl + Shift + /
Go To Line: Opens the Go to Line modal dialog where you can jump to a specific line of code in the current file.
Navigate to Line: Navigate to a line with the specified number in the current file.
Go To Line
Ctrl + G
Navigate to Line
Ctrl + G
Find all references: Finds all references within the solution to the selected item or the item under the cursor.
Find Usages: Initiate search for usages.
Find all references
Shift + F12
Find Usages
Alt + F7
Intellisense: Opens up the intellisense (or code completion) list while editing code.
Basic Code Completion: Complete code for any class, method or variable.
Intellisense
Ctrl + J
Basic Code Completion
Ctrl + Space
Toggle code block: Toggles the current state, by hiding or showing the currently selected text section or the section of code that the cursor is in if no code was selected.
Collapse code block: Will collapse the code block immediately adjacent to the cursor or the selected code block.
Toggle code block
Ctrl + M, Ctrl + M
Collapse code block
Ctrl + NumPad -
Toggle code block: Toggles the current state, by hiding or showing the currently selected text section or the section of code that the cursor is in if no code was selected.
Expand code block: Expands the code block immediately adjacent to the cursor or the selected code block.
Toggle code block
Ctrl + M, Ctrl + M
Expand code block
Ctrl + NumPad +
Go To Type: Opens the Go To dialog with a filter to search for only classes starting with the value typed in.
Navigate to Class: Jump to a class in the project with the specified name.
Go To Type
Ctrl + 1, Ctrl + T
Navigate to Class
Ctrl + N
Go To File: Opens the Go To dialog with a filter to search for only file names containing the value typed in.
Navigate to File: Jump to the specified file in the project.
Go To File
Ctrl + 1, Ctrl + F
Navigate to File
Ctrl + Shift + N
Go to All: Opens the Go To dialog without any filters and will search for anything (class, file, type) containing the value typed in.
Unable to find an equivalent in IntelliJ.
Go to All
Ctrl + T
Navigate Backwards: Navigates backwards through the navigation history.
Back: Undo last navigation operation.
Navigate Backwards
Ctrl +, Ctrl -
Back
Ctrl + Alt + Left
Navigate Forwards: Navigates forward through the navigation history.
Forward: Redo last undone navigation operation.
Navigate Forwards
Ctrl + Shift +, Ctrl + Shift -
Forward
Ctrl + Alt + Right
Step Over: Executes the next line of code but does not step into any function calls.
Step Over: Step to the next line in the current file (during debugging).
Step Over
F10
Step Over
F8
Step Into: Executes code on statement at a time, and moves into execution of any function calls.
Step Into: Step to the next executed line (during debugging).
Step Into
F11
Step Into
F7
Resume Program: While debugging, resume program execution. If not currently debugging, this runs the startup project or projects and attaches the debugger.
Resume Program: Resume program executing (during debugging).
Resume Program
F5
Resume Program
F9
Format Document: Formats the entire document by applying indenting and spacing for the language as specified on the Formatting pane.
Format Document: Formats the entire document when a code block has not been selected.
Format Document
Ctrl + E, D
Format Document
Ctrl + Alt + L
Format Selection: Formats the selected lines of code in accordance with the indenting and spacing for the language as specified in the formatting pane.
Format Selection: Formats the selected code block.
Format Selection
Ctrl + E, F
Format Selection
Ctrl + Alt + L
Make Uppercase: Converts the entire selected section of code into uppercase characters.
Toggle Case: Toggle case of the selected text fragment.
Make Uppercase
Ctrl + Shift + U
Toggle Case
Ctrl + Shift + U
Make Lowercase: Converts the entire selected section of code into lowercase characters.
Toggle Case: Toggle case of the selected text fragment.
Make Lowercase
Ctrl + U
Toggle Case
Ctrl + Shift + U
Rename: Initiates the rename functionality to rename the element at the cursor, if the value or block of code is highlighted then the it will initiate the rename for the element at the beginning of the selection.
Rename: Rename a statement and correct all references. (Refactoring).
Rename
F2
Rename
Shift + F6
Surround With: Opens the Surround With list to wrap the selected code block with an option available in the list. For example, wrapping a block of code in a region will surround the selected text with #region and #endregion.
Surround With: Surround selected for fragment with if, while, try/catch, or another construct.
Surround With
Ctrl + K, S
Surround With
Ctrl + Alt + T

I hope that you find this post helpful! Did I miss something that you always use in either IDE? If so, please feel free to post a comment and I'll add it to the list.

Thanks for reading!

Company Reviews

Leave a Reply

Your email address will not be published.