This blog will explore the benefits of Visual Studio Code for Salesforce and its developers, highlighting how the Visual Studio Code shortcuts can enhance productivity when building Salesforce projects.
What is Visual Studio Code?
Visual Studio Code (VS Code) is an open-source code editor developed by Microsoft. It provides tools for building codes for the development process and supports various programming languages like C++, C++/CLI, Visual Basic .NET, JavaScript, TypeScript, XSLT, XML, HTML, CSS, Node.js, Ruby, and, Python.
How VS Code is Helpful in Salesforce Development:
VS Code comes with a range of Salesforce extensions, like the Salesforce Extension Pack, that bring tools for Apex, Visualforce, Lightning Web Components (LWC), and more, right into the editor. These extensions make it easy to complete code, debug, and deploy projects without leaving VS Code.
When it comes to building Lightning Web Components, VS Code simplifies the process with built-in tools for creating, testing, and deploying these components seamlessly.
It also makes finding and fixing issues in your Apex code, triggers and Lightning Web Components easy. VS Code integrates smoothly with Git, making it easy for Salesforce developers to manage source control, track changes, and collaborate effectively with their teams.
Visual Code Studio Shortcuts –
Keyboard shortcuts of VS code help developers complete tasks quickly without navigating menus. This is especially useful for repetitive tasks in Salesforce development.
Here we have VS Code Shortcuts –
Basic editing:
1 |
Show Command Palette: |
Ctrl+Shift+P/F1
|
2 |
Quick Open: |
Ctrl+P
|
3 |
Close window/instance : |
Ctrl+Shift+W
|
4 |
New window/instance: |
Ctrl+Shift+N
|
Navigation:
5 |
Jump to a specific line: |
Ctrl+G
|
6 |
Locate symbols within your project: |
Ctrl+T
|
7 |
Peek at a symbol’s definition without leaving your code: |
Alt+F12
|
8 |
View all symbols in your workspace: |
Ctrl+Shift+O
|
9 |
Check for errors and warnings: |
Ctrl+Shift+M
|
10 |
Navigate between issues: |
F8 (next), Shift+F8 (previous)
|
Switching Between Files and Editors
11 |
Column (box) selection page up/down |
Ctrl+Shift+Alt+PgUp /PgDn
|
12 |
Go back and forth in navigation history: |
Alt+Left Arrow, Alt+Right Arrow
|
13 |
Switch focus between editor and tabs: |
Ctrl+M
|
Basic Search and Replace
14 |
Open the search panel: |
Ctrl+F
|
15 |
Replace mode: |
Ctrl+H
|
16 |
Find next/previous: |
F3/Shift+F3
|
17 |
Select all occurrences of the current find match: |
Alt+Enter
|
18 |
Add next occurrence to selection: |
Ctrl+D
|
19 |
Move the last selection to the next find match: |
Ctrl+K, then Ctrl+D
|
20 |
Case-sensitive/Regex/Whole word: |
Alt+C/R/W
|
Managing Cursors
21 |
Insert cursor at click location: |
Alt+Click
|
22 |
Insert cursor above/below current line: |
Ctrl+Alt+Up/DownArrow
|
23 |
Undo the last cursor operation: |
Ctrl+U
|
24 |
Insert cursor at the end of each selected line: |
Shift+Alt+I
|
25 |
Select the current line: |
Ctrl+I
|
26 |
Select all occurrences of the current selection: |
Ctrl+Shift+L
|
27 |
Select all occurrences of the current word: |
Ctrl+F2
|
28 |
Expand selection: |
Shift+Alt+Right Arrow
|
29 |
Shrink selection: |
Shift+Alt+Left Arrow
|
Code Formatting
30 |
Go to definition: |
F12
|
31 |
Rename symbol: |
F2
|
32 |
Expand Emmet abbreviations: |
Tab
|
33 |
Format the entire document: |
Shift+Alt+F
|
34 |
Format selected code: |
Ctrl+K, then Ctrl+F
|
35 |
Trim trailing whitespace: |
Ctrl+K, then Ctrl+X
|
36 |
Trigger suggestions: |
Ctrl+Space
|
37 |
Peek definition: |
Alt+F12
|
38 |
Open definition to the side: |
Ctrl+K, then F12
|
39 |
Find references: |
Shift+F12
|
40 |
Trigger parameter hints: |
Ctrl+Shift+Space
|
41 |
Quick fixes: |
Ctrl+.
|
42 |
Change file language mode: |
Ctrl+K, then M
|
43 |
Replace with next/previous value: |
Ctrl+Shift+./
|
Working with Editor Groups
44 |
Close active editor: |
Ctrl+F4, then Ctrl+W
|
45 |
Close active folder: |
Ctrl+K, then F
|
46 |
Split editor vertically or horizontally: |
Ctrl+\
|
47 |
Focus on the first, second, or third editor group: |
Ctrl+1, Ctrl+2, Ctrl+3
|
48 |
Switch to the previous or next editor group: |
Ctrl+K, then Ctrl+Left Arrow/Right Arrow
|
49 |
Move editor left or right: |
Ctrl+Shift+Page Up/Page Down
|
50 |
Move active editor group: |
Ctrl+K, then Left Arrow/Right Arrow.
|
Managing Open Files
51 |
Create a new file: |
Ctrl+N
|
52 |
Open an existing file: |
Ctrl+O
|
53 |
Save the current file: |
Ctrl+S
|
54 |
Save the current file with a different name: |
Ctrl+Shift+S
|
55 |
Save all open files: |
Ctrl+K, then S
|
56 |
Close the active file: |
Ctrl+F4
|
57 |
Close all open files: |
Ctrl+K, thenCtrl+W
|
58 |
Reopen a recently closed file: |
Ctrl+Shift+T
|
59 |
Prevent a file from being closed on exit: |
Ctrl+K, then Enter
|
60 |
Switch to the next open file: |
Ctrl+Tab
|
61 |
Switch to the previous open file: |
Ctrl+Shift+Tab
|
62 |
Copy the path of the active file: |
Ctrl+K, then P
|
63 |
Open the file’s location in the file explorer: |
Ctrl+K, then R
|
64 |
Open the active file in a new window or instance: |
Ctrl+K, then O
|
Display and User Interface
65 |
Toggle editor layout: |
Shift+Alt+1
|
66 |
Zoom in/out: |
Ctrl+=, Ctrl+-
|
67 |
Toggle sidebar visibility: |
Ctrl+B
|
68 |
Show/hide Explorer: |
Ctrl+Shift+E
|
69 |
Show/hide Search panel: |
Ctrl+Shift+F
|
70 |
Show/hide Git panel: |
Ctrl+Shift+G
|
71 |
Show/hide Debug panel: |
Ctrl+Shift+D
|
72 |
Show/hide Extensions panel: |
Ctrl+Shift+X
|
73 |
Show Output panel: |
Ctrl+Shift+U
|
74 |
Replace in files: |
Ctrl+Shift+H
|
75 |
Toggle Search details: |
Ctrl+Shift+J
|
76 |
Open new command prompt/terminal: |
Ctrl+Shift+C
|
77 |
Toggle Markdown preview: |
Ctrl+Shift+V
|
78 |
Open Markdown preview to the side: |
Ctrl+K, then V
|
Debugging Code
79 |
Set/remove a breakpoint: |
F9
|
80 |
Start or continue debugging: |
F5
|
81 |
Stop debugging: |
Shift+F5
|
82 |
Step into a function: |
F11
|
83 |
Step out of a function: |
Shift+F11
|
84 |
Step over a line: |
F10
|
85 |
Show code hints: |
Ctrl+K, then Ctrl+I
|
Integrated Terminal
86 |
Open/close the integrated terminal: |
Ctrl+`
|
87 |
Create a new terminal: |
Ctrl+Shift+`
|
88 |
Copy selected text: |
Ctrl+Shift+C
|
89 |
Paste into the active terminal |
Ctrl+Shift+V
|
90 |
Scroll up/down in the terminal: |
Ctrl+UpArrow/Ctrl+DownArrow
|
91 |
Scroll the page up/down in the terminal: |
Shift+Page Up/Page Down
|
92 |
Scroll to the top/bottom of the terminal: |
Ctrl+Home/Ctrl+End
|
Line Actions
93 |
Copy line up/down: |
Shift+Alt+Down Arrow/Up Arrow
|
94 |
Delete current line: |
Ctrl+Shift+K
|
95 |
Insert the line below: |
Ctrl+Enter
|
96 |
Insert line above: |
Ctrl+Shift+Enter
|
Navigation and Selection
97 |
Jump to the matching bracket: |
Ctrl+Shift+\
|
98 |
Indent/outdent current line: |
Ctrl+]/[
|
99 |
Go to the beginning/end of the line: |
Home/End
|
100 |
Go to the beginning/end of the file: |
Ctrl+Home/Ctrl+End
|
102 |
Scroll line up/down: |
Ctrl+Up Arrow/Down Arrow
|
103 |
Scroll page up/down: |
Alt+Page Up/Page Down
|
Code Folding
104 |
Collapse/expand region: |
Ctrl+Shift+[/]
|
105 |
Collapse/expand all subregions: |
Ctrl+K, then Ctrl+[/]
|
106 |
Collapse/expand all regions: |
Ctrl+K, then Ctrl+0/Ctrl+J
|
Commenting and Formatting
107 |
Add line comment: |
Ctrl+K, then Ctrl+C
|
108 |
Remove line comment: |
Ctrl+K, then Ctrl+U
|
109 |
Toggle line comment: |
Ctrl+/
|
110 |
Toggle block comment: |
Shift+Alt+A
|
111 |
Change theme: |
Ctrl+K, then Ctrl+T
|
112 |
Toggle word wrap: |
Alt+Z
|
FAQs
1. What programming languages does Visual Studio support?
VS code supports various programming languages like C++, C++/CLI, Visual Basic .NET, JavaScript, XSLT, XML, HTML, CSS, Node.js, and, Python.
2. On which operating systems can Visual Studio Code run?
Visual Studio Code supports Windows, Linux, and Mac
Conclusion
Visual Studio Code is an editor platform designed for Salesforce developers that provides many features and extensions that speed up the coding process. Developers can focus more on developing and improving their Salesforce applications by using keyboard shortcuts to save time on repeated processes.
Get a complete Roadmap To Learn Salesforce Admin And Development
One thought on “100 + Visual Studio Code Shortcuts”