Cookie Consent by Free Privacy Policy Generator ๐Ÿ“Œ 20+ Essential VS Code Shortcuts to Become a Ninja Coder (No Mouse Needed!)

๐Ÿ  Team IT Security News

TSecurity.de ist eine Online-Plattform, die sich auf die Bereitstellung von Informationen,alle 15 Minuten neuste Nachrichten, Bildungsressourcen und Dienstleistungen rund um das Thema IT-Sicherheit spezialisiert hat.
Ob es sich um aktuelle Nachrichten, Fachartikel, Blogbeitrรคge, Webinare, Tutorials, oder Tipps & Tricks handelt, TSecurity.de bietet seinen Nutzern einen umfassenden รœberblick รผber die wichtigsten Aspekte der IT-Sicherheit in einer sich stรคndig verรคndernden digitalen Welt.

16.12.2023 - TIP: Wer den Cookie Consent Banner akzeptiert, kann z.B. von Englisch nach Deutsch รผbersetzen, erst Englisch auswรคhlen dann wieder Deutsch!

Google Android Playstore Download Button fรผr Team IT Security



๐Ÿ“š 20+ Essential VS Code Shortcuts to Become a Ninja Coder (No Mouse Needed!)


๐Ÿ’ก Newskategorie: Programmierung
๐Ÿ”— Quelle: dev.to

Alone programming is tedious task to do. The constant switch between the keyboard and mouse every few seconds disrupts the flow for developers. What if I tell you You can throw away the mouse and use our magic keyboard to perform the task even better then mouse. This can be done with keyboard shortcuts, you can even customize key bindings.

Table Of Content

  1. Introduction
  2. Essential Shortcuts for Everyone
  3. Beyond the Basics
  4. Conclusion

Introduction

VS Code, a widely embraced text editor among developers, is on the rise. As its popularity soars, it's worth learning shortcuts that acts a catalyst for productivity. The VS Code documentation has hundreds of shortcuts but we'll focus on the most useful ones in this article.

Let's me take a moment to consider the time saved by avoiding the mouse. Imagine Alok, coding for four hours daily. Each mouse use takes about 10 seconds. If he clicks a hundred times, a daily saving of 16 minutes is possible โ€“ just by using keyboard shortcuts.

I have divided this shortcuts into 2 broad categories as follows:-

Essential Shortcuts for Everyone

1. Toggle Sidebar:

Instantly hide or show the sidebar for a cleaner workspace and focus on your code.

  • Windows/Linux: Ctrl + B
  • Mac: Cmd + B Toggle Sidebar

2. Open Integrated Terminal:

Launch the terminal directly within VS Code, eliminating the need to switch between applications.

  • Windows/Linux: Ctrl + `
  • Mac: Cmd +` Open Integrated Terminal

3. Quickly Find Files:

Open the Command Palette and search for any file in your project with lightning speed.

  • Windows/Linux: Ctrl + P
  • Mac: Cmd + P Quickly Find Files

4. Scroll Like a Breeze:

Smoothly scroll up or down through your code file without needing to use the mouse.

  • Windows/Linux: Ctrl + Up/Down Arrow
  • Mac: Cmd + Up/Down Arrow Scroll Like a Breeze

5. Jump to Specific Elements:

Quickly navigate to specific symbols, functions, or file paths within your codebase.

  • Windows/Linux: Ctrl + P + @NameOfCodeBlock
  • Mac: Cmd + P + @NameOfCodeBlock Jump to Specific Elements

6. Split the View:

Divide your workspace into two panes to compare code, work on multiple files simultaneously, or reference different sections easily.

  • Windows/Linux: Ctrl + \
  • Mac: Cmd + \ Split the View

7. Close Tabs:

Close the currently active tab without the need to click the "X" button, saving time and effort.

  • Windows/Linux: Ctrl + W
  • Mac: Cmd + W Close Tabs

8. New Line Without Reaching:

Add a new line to your code without moving your hand from the home row, maintaining a comfortable typing flow.

  • Windows/Linux: Ctrl + Enter
  • Mac: Cmd + Enter New Line Without Reaching

9. Select All Occurrences:

Highlight all instances of the currently selected text across your entire file for simultaneous editing or replacement.

  • Windows/Linux: Ctrl + Shift + L
  • Mac: Cmd + Shift + L Select All Occurrences

10. Jump to Next Match:

Quickly cycle through all occurrences of the same text selection within your file, allowing for efficient editing across multiple instances.

  • Windows/Linux: Ctrl + Alt + D
  • Mac: Cmd + Option + D

11. Enter Zen Mode:

Hide all unnecessary UI elements except the code editor, creating a distraction-free environment for focused coding.

  • Windows/Linux: Ctrl + K Z
  • Mac: Cmd + K Z Enter Zen Mode

12. Delete Whole Lines:

Delete the entire line where your cursor is positioned, eliminating manual selection and saving time.

  • Windows/Linux: Ctrl + Shift + K
  • Mac: Cmd + Shift + K Delete Whole Lines

13. Toggle Comments:

Quickly comment out or uncomment blocks of code for readability, testing, or hiding specific sections.

  • Windows/Linux: Ctrl + /
  • Mac: Cmd + / Toggle Comments

14. Remove Trailing Whitespace:

Automatically eliminate unnecessary whitespace characters at the end of lines, ensuring clean and consistent code formatting.

  • Windows/Linux: Ctrl + K Ctrl + X
  • Mac: Cmd + K Cmd + X

15. Go to Specific Line:

Jump directly to a specific line number within your code file, bypassing manual scrolling.

  • Windows/Linux: Ctrl + G
  • Mac: Cmd + G Go to Specific Line

16. Return to Previous Cursor Position:

Navigate back to the last place you had your cursor, undoing any accidental code changes.

  • Windows/Linux: Ctrl + U
  • Mac: Cmd + U Return to Previous Cursor Position

17. Select Current Line:

Highlight the entire line where your cursor is positioned for quick editing or copying.

  • Windows/Linux: Ctrl + L
  • Mac: Cmd + L Select Current Line

Beyond the Basics

18. Search Within Projects:

Find specific files, symbols, or text within your entire project, regardless of their location.

  • Windows/Linux: Ctrl + Shift + F
  • Mac: Cmd + Option + F Search Within Projects

19. Add Multiple Cursors:

Create multiple cursors on different lines at the same time, allowing for simultaneous editing in multiple locations.

  • Windows/Linux: Ctrl + Alt + Up/Down Arrow
  • Mac: Cmd + Option + Up/Down Arrow Add Multiple Cursors

20. Expand/Shrink Code Blocks:

Precisely adjust the selection of code blocks, expanding or shrinking them as needed for targeted editing.

  • Windows/Linux: Shift + Alt + Left/Right Arrow
  • Mac: Shift + Option + Left/Right Arrow Expand/Shrink Code Blocks

21. Instant Markdown Preview:

See a live preview of your Markdown formatting as you type, ensuring your content will be displayed correctly.

  • Windows/Linux: Ctrl + Shift + V
  • Mac: Cmd + Shift + V Instant Markdown Preview

22. View Files Side-by-Side:

Open two files side-by-side within the same window, making it easier to compare code, reference different sections, or work on multiple files simultaneously.

  • Windows/Linux: Ctrl + K V
  • Mac: Cmd + K V View Files Side-by-Side

23. Fold/Unfold Code Blocks:

Collapse or expand sections of code to hide or reveal specific parts, improving code readability and organization.

  • Windows/Linux: Ctrl + Shift + /
  • Mac: Cmd + Shift + /

24. Browse Github directory in VS Code (Bonus!):

Explore the contents of a GitHub repository directly within VS Code, streamlining your code navigation and exploration. In your repo's url replace github.com with github1s.com. For example, replace https:/github.com/username/repositoryname with https:/github1s.com/username/repositoryname (Replace with your own GitHub directory)

Conclusion

Using this shortcuts can be very powerful into your coding journey. However, you will notice its real impact once you get used to these key bindings. Try using these key bindings and build muscle memory.

Customizing the key bindings can be very user-friendly experience. I also use custom keys bindings which make my development experience personalized.

Note: These key bindings are based on the default VS Code settings. You can customize them to your liking within the VS Code settings.

If you have read this far and found the article helpful, please feel free to share them on X by mentioning JitendraC. Let me you which new shortcuts you discovered from this article into the comments. If you would like to read more of my content, you can follow me here. Also, say hello on X where I share my tech journey.

...



๐Ÿ“Œ 20+ Essential VS Code Shortcuts to Become a Ninja Coder (No Mouse Needed!)


๐Ÿ“ˆ 90.46 Punkte

๐Ÿ“Œ 10 Essential VS Code Shortcuts to Boost Your Productivity


๐Ÿ“ˆ 27.83 Punkte

๐Ÿ“Œ Manjaro text-only terminal mode doesn't accept needed special character for my password, leaving me unable to login as needed.


๐Ÿ“ˆ 26.84 Punkte

๐Ÿ“Œ Type faster with these essential Mac keyboard shortcuts


๐Ÿ“ˆ 23.95 Punkte

๐Ÿ“Œ 14 Essential Ubuntu Keyboard Shortcuts


๐Ÿ“ˆ 23.95 Punkte

๐Ÿ“Œ Essential Keyboard Shortcuts and Time-Saving Tips for Linux Productivity


๐Ÿ“ˆ 23.95 Punkte

๐Ÿ“Œ Essential Phone: Essential PH-1 bald auch in Europa erhรคltlich


๐Ÿ“ˆ 21.7 Punkte

๐Ÿ“Œ Australian government looks to make Essential Eight essential


๐Ÿ“ˆ 21.7 Punkte

๐Ÿ“Œ #0daytoday #WordPress Essential Blocks 4.2.0 / Essential Blocks Pro 1.1.0 PHP Object Injection Vuln [#0day #Exploit]


๐Ÿ“ˆ 21.7 Punkte

๐Ÿ“Œ Razer Basilisk Essential Review - A Gamer's Essential Tool


๐Ÿ“ˆ 21.7 Punkte

๐Ÿ“Œ The Razer Basilisk Essential is an awesome gaming mouse for $50


๐Ÿ“ˆ 21.69 Punkte

๐Ÿ“Œ The Razer Basilisk Essential is an awesome gaming mouse for $50


๐Ÿ“ˆ 21.69 Punkte

๐Ÿ“Œ Omen Vector (Essential) Mouse: HP versucht sich an zwei gรผnstigen Palm-Grip-Mรคusen


๐Ÿ“ˆ 21.69 Punkte

๐Ÿ“Œ Grab the white Razer DeathAdder Essential gaming mouse for a low of $20


๐Ÿ“ˆ 21.69 Punkte

๐Ÿ“Œ Mouse Double Clicks (FIXED): Why Is My Mouse Double Clicking?


๐Ÿ“ˆ 21.68 Punkte

๐Ÿ“Œ Mouse Double Clicks (FIXED): Why Is My Mouse Double Clicking?


๐Ÿ“ˆ 21.68 Punkte

๐Ÿ“Œ Remote Mouse App Crippled With โ€˜Mouse Trapโ€™ Zero-Day Bugs


๐Ÿ“ˆ 21.68 Punkte

๐Ÿ“Œ How to keep track of your mouse pointer with the PowerToys Mouse utilities


๐Ÿ“ˆ 21.68 Punkte

๐Ÿ“Œ This $9 gaming mouse pad can hold your keyboard, mouse, phone and more


๐Ÿ“ˆ 21.68 Punkte

๐Ÿ“Œ Your mouse can glide on this Premium-Textured Mouse Pad for less than $4


๐Ÿ“ˆ 21.68 Punkte

๐Ÿ“Œ This $5 XL Gaming Mouse Pad can hold your keyboard, mouse, and phone


๐Ÿ“ˆ 21.68 Punkte

๐Ÿ“Œ This $5 XL Gaming Mouse Pad can hold your keyboard, mouse, and phone


๐Ÿ“ˆ 21.68 Punkte

๐Ÿ“Œ can i click my mouse using my voice? example say "mouse right click"


๐Ÿ“ˆ 21.68 Punkte

๐Ÿ“Œ Razer Basilisk V3 Pro and Mouse Dock Pro review: Qi charging and loads of RGB make this the best mouse of 2022


๐Ÿ“ˆ 21.68 Punkte

๐Ÿ“Œ Mechanical Mouse Vs Optical Mouse: Differences & Advantages


๐Ÿ“ˆ 21.68 Punkte

๐Ÿ“Œ MacBook Mouse Lag and How to Fix a Laggy Magic Mouse


๐Ÿ“ˆ 21.68 Punkte

๐Ÿ“Œ SteelSeries Sensei Ten gaming mouse review: A mouse superbly revived


๐Ÿ“ˆ 21.68 Punkte

๐Ÿ“Œ The 8BitDo N30 Wireless mouse looks like an NES controller had a baby mouse


๐Ÿ“ˆ 21.68 Punkte

๐Ÿ“Œ Microsoft Ergonomic Mouse review: A budget Surface Precision Mouse


๐Ÿ“ˆ 21.68 Punkte











matomo