52

Visual Studio Code and its magic

 5 years ago
source link: https://www.tuicool.com/articles/hit/36ZviaA
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Hello, I am Madhav Gupta(someone who's been using VS Code for a long time sufficient to fall in love with it) and I'd like to walk you through the amazing world of shortcuts in VS Code and a wonderful extension.

We all love studio code, don't we? ( talking about those who use it )

Age my starting point, I always how the tutor was able to move a selection up without moving the mouse, copy a whole selection and move it down simultaneously. Turns out these were the key shortcuts who were the culprits all along.

So coming on to the point,

Being a developer, you sure know one thing that mouse is wicked for you. You should be familiar with most of the key shortcuts available in your editor.

While there are so many shortcuts available in the editor, I will be listing some of the shortcuts I use the most. As a side note, you can find the full list of keyboard shortcuts here .

These are for windows users , so please excuse me if you use any other OS.

Here's a table for the shortcuts and what they do.

Keyboard Shortcut Their effects Alt+ ↑ / ↓ Move your selection up or down Shift+Alt + ↓ / ↑ Copy your selection and move it up or down Ctrl+ ] / [ Indent/Outdent Line(move your selection left or right,in simple words) Ctrl+Shift+\ Jump to matching bracket Ctrl+↑ / ↓ Scroll your selection UP or Down Ctrl+/ Toggle comment (uncomment a selection if commented & vice versa)

While these are shortcuts which I tend to use most of the times, Some of the honorable mentions are,

Keyboard Shortcut Their effects Ctrl+Space Shows you all the recommendations when coding/Trigger suggestion Ctrl+F Find Ctrl + H Replace F11 Toggle Full Screen F5 Start debugging F9 Toggle Breakpoint Ctrl+Shift+T Reopen closed editor
  • So these were some of the most used keyboard shortcuts, besides Ctrl+C & Ctrl+V of course :grinning::grinning:
  • If you knew them all and use them, Congratulations. Be sure to share some of the shortcuts which you use all the time in comments.

Now, let's talk about the extension.

The name of the extension is JavaScript (ES6) code snippets

People who use it know the power of this extension. As the name depicts, this extension provides you code snippets with some shortcuts and you can use them by hitting TAB or ENTER.

Shortcut What it becomes into clg console.log() thenc Then and catch chained .then((res) => {).catch((err) => {}); imp imports entire module rqr Require mde module.exports() con adds default constructor in the class constructor() {} Ctrl+Shift+T forEach loop in ES6 syntax array.forEach(currentItem => {})

So, that's it for today. Pheww ,writing my first post was not that tough.

I'll be back with more posts( Thinking to write a guide on markdown) and one more thing, No hate on other editors, Just use what fits you.

Hope you like it. Have a great day. Thanks.

3MJBRru.gif


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK