-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kawtar Choubari
committed
Feb 18, 2024
1 parent
9dda9f7
commit dfc87c9
Showing
2 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
--- | ||
title: My Favorite VSCode Shortcuts & Tricks of All Time | ||
description: The ultimate guide to navigating VS Code like a pro with my essential shortcuts. | ||
image: /blog/my-favorite-vscode-shortcuts/thumbnail.jpg | ||
published: true | ||
date: 2024-02-18 | ||
--- | ||
|
||
Hey friends, I recently ran a poll on Twitter asking which format you prefer for learning new skills: a 20-minute video tutorial or a blog post. | ||
|
||
<div className="flex justify-center"> | ||
<ReactTweet id={"1758097614828916912"} /> | ||
</div> | ||
|
||
The results were evenly split, so I decided to create both! If you're here for the video version, check it out below. | ||
|
||
<br /> | ||
|
||
<div className="flex justify-center"> | ||
<iframe | ||
width="560" | ||
height="315" | ||
src="https://www.youtube.com/embed/DHQSOGMJq0o?si=OLBKE1W4W-J7l5j2" | ||
title="YouTube video player" | ||
frameborder="0" | ||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; fullscreen; web-share" | ||
></iframe> | ||
</div> | ||
|
||
And if you're coming from the video, welcome! This blog post serves as a cheat sheet for everything I've discussed in the video. | ||
|
||
## 🌟 Level Zero: Absolute Beginner | ||
|
||
At level zero, we're focusing on essential shortcuts that every programmer should master for a smooth coding experience. These shortcuts are not only applicable in VS Code but also in tools like Google Docs and Microsoft Word, making them universally useful. | ||
|
||
- **Creating a New File:** Instead of relying on mouse clicks, use `CTRL + N` to create a new file swiftly. | ||
|
||
- **Selecting the Whole Document:** Quickly select everything with `CTRL + A`. | ||
|
||
- **Mastering Text Selection:** | ||
- To select character by character, use `Shift + Left/Right Arrow`. | ||
- For selecting a word at a time, `Shift + CTRL + Left/Right Arrow` will do the trick. | ||
- Selecting a whole line? `Shift + Up/Down Arrow` or `Shift + FN + Left/Right Arrow` for line selection without moving the cursor. | ||
|
||
## 🚀 Level One: Building Skills | ||
|
||
- **Multi-Cursor Editing:** `ALT + Click` or `CTRL + ALT + Up/Down Arrow` lets you edit multiple lines simultaneously. | ||
|
||
- **Viewing Suggestions:** Forgot a Tailwind utility class? `CTRL + Space` brings up the suggestions. | ||
|
||
- **Renaming Attributes:** Use `CTRL + Shift + L` to select all occurrences of a specific term for renaming, or `CTRL + D` for selecting the next instance. | ||
|
||
- **Jumping to a Function's Definition:** Use `F12` to navigate directly to the definition of a function or variable. | ||
|
||
- **Reopening a Closed Tab:** Accidentally closed a tab? `CTRL + Shift + T` will bring it back. | ||
|
||
## 💡 Level Two: Enhancing Workflow | ||
|
||
- **Commenting Code:** Use `CTRL + /` or `CTRL + K, CTRL + C` to comment and `CTRL + K, CTRL + U` to uncomment. | ||
|
||
- **Collapsing Functions:** `CTRL + K, CTRL + 0` collapses all functions, while `CTRL + K, CTRL + J` unfolds them. | ||
|
||
- **Navigating Files and More:** | ||
- `CTRL + P` for quick file access. | ||
- `>` for searching commands. | ||
- `@` to search for symbols within the current file. | ||
- `:` followed by a line number to jump to a specific line. | ||
|
||
## 🏆 Pro Level: Advanced Techniques | ||
|
||
- **Sticky Scroll:** Keep your headers visible while scrolling through your code by enabling sticky scroll in the settings. | ||
|
||
- **Customizing Shortcuts:** Modify your shortcuts in the Keyboard Shortcuts settings to suit your workflow. | ||
|
||
- **Sidebar Position:** Consider moving your sidebar to the right for less layout shift and more focused coding. | ||
|
||
<div className="flex justify-center"> | ||
<ReactTweet id={"1727747135846641773"} /> | ||
</div> | ||
|
||
_That was a good decision!_ | ||
|
||
Incorporating keyboard shortcuts into your workflow can significantly save time. I hope this guide enhances your efficiency in VS Code. | ||
|
||
Share this with anyone who might find it beneficial and let me know your thoughts or any shortcuts you love in the [video comments]()! | ||
|
||
Happy coding! 🚀 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.