logo

let’s make something together

Give us a call or drop by anytime, we endeavour to answer all enquiries within 24 hours on business days.

Find us

PO Box 16122 Collins Street West
Victoria 8007 Australia

Email us

info@domain.com
example@domain.com

Phone support

Phone: + (066) 0760 0260
+ (057) 0760 0560

20 VS Code Shortcuts for Faster Coding

  • By Rajkumar M G
  • December 31, 2019
  • 61 Views

Shortcuts are the most helpful tools for developers while coding. Hopefully, it gives you a faster and smarter way to do your work. So, let see the best shortcut keys for the boring stuff that needs to be repeated while coding.
Visual Studio Code provides almost every feature by command that is accessible via the command palette or via a shortcut on your keyboard. Also, it provides various extensions libraries for keymap. Here, we will discuss the default keymap of visual studio code.

1.Ctrl + P => Go To File

This Key helps to search and open a file in your working directory. It opens a dialogue box and supports fuzzy search to get your file. When you need to move a new file it makes things easier.
For Ubuntu – Ctrl + P
For Windows – Ctrl + P
For Mac – ⌘ + P

2.Ctrl + Shift + Tab => Navigate editor group history

This key helps you to navigate between files that you have currently opened or worked in the editor group history. So, we can easily move to previous files.
For Ubuntu – Ctrl + Shift + Tab
For Windows – Ctrl + Shift + Tab
For Mac – ⌃ + ⇧ + Tab

3.Ctrl + Shift + I => Format document

This key help you to format your HTML and TS code. Formating code is one of good practices in coding. But, formatting code requires extra attention while you merge your code with remote branches.
For Ubuntu – Ctrl + Shift + I
For Windows – Shift + Alt + F
For Mac – ⇧ + ⌥ + F

READ MORE: Top 9 Must-Have Visual Studio Code Extensions for Developers

4.Ctrl + Shift + A => Toggle Block Comment

This key will help you to comment on your code. A comment is wild usage one. Keep your deprecated code by comments for future use. And don’t forget to provide a description to that comment.
For Ubuntu – Ctrl + Shift + A
For Windows – Shift + Alt + A
For Mac – ⇧ + ⌥ + A

5.Ctrl + L => Select Current Line

This key will help you to select your current line without effortlessly. Selected words in the line will be highlighted and excluding the whitespaces in the end.
For Ubuntu – Ctrl + L
For Windows – Shift + L
For Mac – ⌘ + L

6.Ctrl + Shift + K = > Delete line

This Key helps you to remove a line where currently your cursor is present on.
For Ubuntu – Ctrl + Shift + K
For Windows – Ctrl + Shift + K
For Mac – ⇧ + ⌘ + K

7.Ctrl + Space => Trigger Suggestion

This Key helps you to get a suggestion for your code. A dialogue box will appear to list out all methods and variable that available in TS. This will help you to avoid unnecessary errors.
For Ubuntu – Ctrl + Space
For Windows – Ctrl + Space
For Mac – ⌃ + Space

8.F12 => Go to Definition

This Key help you to move to the method definition. When you need to navigate the method that currently in, this shortcut helps to make it easier. Ctrl + mouse click will also perform the same operation.
For Ubuntu – F12
For Windows – F12
For Mac – F12

9.Alt + Up arrow / Alt + Down Arrow => Move line up /down

It helps you to move the current line up / down. When you need to change the order of the code in the method, it helps you to perform better.
For Ubuntu – Alt + ↑ / Alt + ↑
For Windows – Alt + ↑ / Alt + ↑
For Mac – ⌥ + ↑ / ⌥ + ↓

10.Ctrl + . => Quick fix

It helps you to know the quick fix solution for the error. When you get any error in your code, this will open a dialogue box followed by a list of available solutions that IDE provides.
For Ubuntu – Ctrl + .
For Windows – Ctrl + .
For Mac – ⌘ + .

11.Ctrl + G => Go To Line

It helps you to navigate to the desired line of the file. A dialogue box will appear and you need to enter the desired line number of the current file. Then, the cursor will move to that line.
For Ubuntu – Ctrl + G
For Windows – Ctrl + G
For Mac – ⌃ + G

READ MORE: 8 Best Angular IDE To Use In 2020

12.Ctrl + F => Find

These keys help you to find any word in the current file. It will be most useful in finding any keyword and replacing it with another. A pop-up window will appear in the current file to support you in this operation. You also use Ctrl + H to perform Find & Replace operation directly.
For Ubuntu – Ctrl + F
For Windows – Ctrl + F
For Mac – ⌘ + F

13.F3 / Shift F3 = > Find Next / Previous

This Key helps in moving next/previous of the searched word. When you are using the “Find” key, you need to move forward or backwards among the search results. You can effortlessly navigate through the entire file using these keys.
For Ubuntu – F3 / Shift F3
For Windows – F3 / Shift F3
For Mac – ⌘ + G / ⇧ + ⌘ + G

14.Ctrl + Shift + F => Show Search

This Key helps you to open search panel in the sidebar. You can search for any keyword through the entire work directory and also perform Replace if needed.
For Ubuntu – Ctrl + Shift + F
For Windows – Ctrl + Shift + F
For Mac – ⇧ + ⌘ + F

15.Ctrl + ` => Show / Hide Integrated Terminal

This Key will help you to show/hide the integrated terminal. As we know that Visual Studio Code provides an integrated terminal, this key is very useful to hide and open the terminal.
For Ubuntu – Ctrl + `
For Windows – Ctrl + `
For Mac – ⌃ + `

16.Ctrl + Shift +M => Show Problems panel

This Key helps you to show/hide the Problems panel. The panel shows the errors and problems in your project directory. You can use it in an efficient way using this Key combination.
For Ubuntu – Ctrl + Shift + M
For Windows – Ctrl + Shift + M
For Mac – ⇧ + ⌘ + M

17.Ctrl + B => Toggle Sidebar visibility

This Key helps you to toggle sidebar visibility. Most of the developers close the sidebars when they are writing complex methods or codes to get the view of the entire screen. In such times, this key combination is the most helpful one for developers.
For Ubuntu – Ctrl + B
For Windows – Ctrl + B
For Mac – ⌘ + B

18.Ctrl + K+ S => Save All

It helps to save all your file in editor history. Probably, most of the developers forget to save their files when they work on different files. So, it leads to unchanged output. This Key becomes helpful to save all files in a single step.
Ubuntu users will not get this shortcut, but you can manually configure it in your keyboard settings.
For Ubuntu – need to configure manually ( Ctrl + K+S – preferable)
For Windows – Ctrl + K+S
For Mac – ⌥ + ⌘ + S

19.Ctrl + W => Close File / Close Editor

This Key helps you to close your current file. When you don’t want to modify a file any longer, then you can close using this Key to make your navigation easier. When you close all files and attempt this key combination, it closes the visual studio code.
For Ubuntu – Ctrl + W
For Windows – Ctrl + W
For Mac – ⌘ + K / ⌘ + W

20.Ctrl+Shift+T => Reopen Closed Editor

This Key helps you to reopen your last closed file. When you unexpectedly close the file, it helps to easily get back in seconds.
For Ubuntu – Ctrl + Shift + T
For Windows – Ctrl + Shift + T
For Mac – ⇧ + ⌘ + T
For time constraints in coding, shortcuts are major features for us to code even faster. IDE is a major thing that we can select and use to code. Visual Studio Code is the most usable IDE for developers and also enhances our productivity.
You can still change your own keys for your convenient ways to perform some actions. For more, you can view and review your VS settings ( Ctrl + , ).
Happy Coding…!!!
Get in touch with us to build a world-class web application at affordable prices by hiring the most skilled developers in the tech industry. Contact now.

Looking for a Tech partner to dominate the digital world?

References:
For Ubuntu: https://code.visualstudio.com/shortcuts/keyboard-shortcuts-linux.pdf
For Windows: https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf
For Mac: https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf
 

Rajkumar M G

Rajkumar M G

Around 3 years of experience in IT, Rajkumar evolving as a knowledge packed developer by expertising the technologies like JavaScript, AngularJS, Apache Cordova, Ionic, Java Spring MVC. And also extends his love on Robotic science & embedded system and trying to master it all.

Leave a Reply

Your email address will not be published. Required fields are marked *