Don't Use a Mouse Anymore! VSCode Shortcuts Tips and Tricks

Lama Dev
3 Feb 202217:24

Summary

TLDRThis tutorial focuses on enhancing productivity with essential VS Code shortcuts. It starts with opening projects using the terminal, then navigates through managing multiple files with keyboard shortcuts. It highlights the benefits of using shortcuts over a mouse for speed and efficiency, teaching viewers how to switch between files, close tabs, and manage folders. The video also covers editor customization, such as zooming and splitting the editor, and concludes with terminal usage tips for coding efficiency.

Takeaways

  • 💻 Use keyboard shortcuts to increase productivity in VS Code.
  • 🔑 Press `ctrl+\` to open the terminal for quick project access.
  • 📂 Type 'code' followed by your project name in the terminal to open it directly.
  • 🗂️ Use `ctrl+p` to quickly navigate to files within a project.
  • 👉 Use `alt` plus number keys to switch between open files.
  • 🗑️ Close tabs with `ctrl+w` or `ctrl+k+w` to close all tabs at once.
  • 📁 Use the integrated terminal to create folders and files quickly with commands.
  • 🖥️ Close the sidebar with `ctrl+b` to maximize coding space.
  • 🔍 Use `ctrl+\` to split the editor and `ctrl` plus number keys to switch between splits.
  • 🔄 Use arrow keys to edit and rerun previous terminal commands.
  • 🧠 Over time, keyboard shortcuts become second nature and enhance coding speed.

Q & A

  • What is the main focus of the video transcript?

    -The main focus of the video transcript is to teach viewers how to use Visual Studio Code (VS Code) shortcuts to increase productivity.

  • Why is it recommended to use keyboard shortcuts instead of a mouse in VS Code?

    -Using keyboard shortcuts can make coding faster and more efficient once a user gets accustomed to them, leading to a more professional workflow.

  • How can you quickly open a project in VS Code without searching through folders?

    -You can open your terminal using 'ctrl+`', type 'code' followed by your project name, and press enter to quickly open the project.

  • What is the benefit of using 'ctrl+p' in VS Code?

    -'ctrl+p' allows you to quickly navigate to a file by typing a few letters of the file name, which is helpful when working with many files or folders.

  • How can you close multiple open tabs in VS Code?

    -To close all open tabs, you can use the shortcut 'ctrl+k+w', which will close all tabs at once.

  • What is a quick way to create a nested folder structure and a file in VS Code?

    -You can type the folder path followed by the file name in the 'New File' input field, and it will create the necessary folders and the file.

  • How can you see more of the coding area in VS Code by hiding the sidebar?

    -You can close the sidebar using 'ctrl+b', and open it again with the same shortcut.

  • What is the purpose of splitting the editor in VS Code?

    -Splitting the editor allows you to work on multiple files simultaneously in different parts of the screen, which can be helpful when referencing styles or other code.

  • How can you correct a typo in a command in the terminal without retyping the entire command?

    -You can use the arrow keys to navigate to the previous command, make the necessary corrections, and then press enter to execute the corrected command.

  • What is the shortcut to clear the terminal in VS Code?

    -You can clear the terminal by typing 'clear' and pressing enter.

  • How can you switch between split editor views in VS Code?

    -You can switch between split editor views using 'ctrl' and the slice number, such as 'ctrl+1' or 'ctrl+2'.

Outlines

00:00

💻 Enhancing Productivity with VS Code Shortcuts

The speaker introduces the importance of learning keyboard shortcuts in VS Code for increased productivity. They emphasize that while using a mouse might be easier initially, mastering shortcuts will eventually make coding faster. The tutorial begins with opening a project using the terminal shortcut 'ctrl+`' followed by 'code hotelApp' to quickly access the project. The speaker then demonstrates how to efficiently switch between files using tab numbers and 'alt' key. They also introduce 'ctrl+p' for searching and opening files, 'ctrl+w' for closing tabs, and 'ctrl+k+w' for closing all tabs. Additionally, they show how to create nested folders and files quickly without using the mouse, and how to manage the editor view with shortcuts like 'ctrl+b' to toggle the sidebar and 'ctrl+-' or 'ctrl=' to zoom.

05:01

🔍 Splitting Editor Views and Terminal Efficiency

This paragraph continues with tips on how to work more efficiently in VS Code. The speaker shows how to split the editor view using 'ctrl+\' and switch between different splits using 'ctrl' and the split number. They also discuss the benefits of using shortcuts for managing terminal commands, such as using the arrow keys to repeat and correct previous commands. The paragraph concludes with a demonstration of how to clear the terminal using the 'clear' command, emphasizing the speed and efficiency gained from using these shortcuts after a month of practice.

Mindmap

Keywords

💡VS Code

VS Code stands for Visual Studio Code, a popular source-code editor developed by Microsoft. It is free and available on multiple platforms. The video focuses on using VS Code shortcuts to increase productivity, which implies that VS Code is the primary tool discussed for enhancing coding efficiency.

💡Keyboard Shortcuts

Keyboard shortcuts are combinations of keys that allow users to perform tasks more quickly than using a mouse. The video emphasizes the importance of learning keyboard shortcuts in VS Code to transition from a beginner to a more professional coding approach.

💡Productivity

Productivity in the context of the video refers to the efficiency and effectiveness with which developers can complete tasks in VS Code. The video aims to show how mastering keyboard shortcuts can lead to increased productivity by reducing the time spent on routine tasks.

💡Professional

In the video, being 'professional' is associated with the level of skill and efficiency in using development tools like VS Code. It suggests that professionals use keyboard shortcuts effectively to navigate and edit code more quickly than those who rely on a mouse.

💡Terminal

The terminal is a command-line interface where users can execute commands. The video mentions using the terminal in VS Code with a shortcut (ctrl+`) to open and work with projects, demonstrating its utility in a development workflow.

💡Project Navigation

Project navigation refers to the process of moving between files and folders within a project. The video discusses using shortcuts like 'ctrl+p' to quickly find and open files, which streamlines navigation and enhances productivity.

💡Tab Management

Tab management involves organizing and controlling the multiple tabs or files open in an editor. The video introduces shortcuts like 'ctrl+w' to close a single tab and 'ctrl+k+w' to close all tabs, which are essential for maintaining an organized workspace.

💡File System Navigation

File system navigation is the process of moving through the file hierarchy on a computer. The video shows how to use shortcuts to quickly create and navigate file structures, such as typing 'folder/folder2/myApp.js' to create nested folders and a file.

💡Editor Splitting

Editor splitting is the act of dividing the editor window into multiple panes to view different parts of a project simultaneously. The video demonstrates using 'ctrl+\' to split the editor and 'ctrl' with a number to switch between panes, which can help in coding tasks that require referencing multiple files.

💡Zooming

Zooming in and out allows users to adjust the text size in the editor for better readability. The video mentions using 'ctrl -' to zoom out and 'ctrl =' to zoom in, which can be useful when working on large screens or when fine details need to be seen more clearly.

💡Command History

Command history refers to the ability to access previously entered commands in the terminal. The video shows how to use arrow keys to navigate through command history, which can save time when fixing typos or reusing commands.

Highlights

Introduction to using VS Code shortcuts for increased productivity

Advantage of keyboard shortcuts over using a mouse for professionals

Opening projects quickly using the terminal with 'code' command

Navigating between files using tab numbers and 'alt' button

Using 'ctrl+p' to quickly open files by name

Closing tabs individually with 'ctrl+w'

Closing all tabs at once with 'ctrl+k+w'

Creating nested folders and files quickly in the terminal

Minimizing the sidebar to maximize coding area with 'ctrl+b'

Zooming in and out of the editor with 'ctrl -' and 'ctrl ='

Splitting the editor to view multiple files with 'ctrl+\'

Switching between editor splits using 'ctrl' and the split number

Using keyboard shortcuts to install libraries or push to Github

Fixing typos in terminal commands using arrow keys

Clearing the terminal with the 'clear' command

Efficient coding practices to increase speed

The transition from difficulty to proficiency with keyboard shortcuts

Transcripts

play00:00

Hello, my friends

play00:01

today we are gonna talk about how to use

play00:04

the most important vs code shortcuts to increase our productivity.

play00:09

If you are a beginner,

play00:10

using a mouse and regular shortcuts are okay

play00:14

but if want to be more professional

play00:16

you must learn how to use your keyboard effectively

play00:20

but don't worry,

play00:21

after this video, you are gonna be much faster.

play00:24

If you are ready, let's get started.

play00:27

Firstly, when you open your projects,

play00:30

most probably, you are clicking here

play00:33

and searching for your folder.

play00:37

not this one

play00:40

it's gonna be hotelApp

play00:41

But, If you have a lot of folders here, it can be a waste of time.

play00:46

So what I'm gonna do is

play00:47

opening my terminal

play00:49

-By the way, you can do this using ctrl+` buttons-

play00:52

and writing here "code"

play00:54

and my app name

play00:55

which is hotelApp

play00:58

I'll enter

play01:00

And that's all. It's here.

play01:02

If it's in another folder, I'm gonna go to the desktop,

play01:07

and my project name.

play01:11

it's that easy.

play01:13

By the way guys, during this video,

play01:15

You ll probably think that using a mouse is easier and faster.

play01:20

Well,

play01:21

for a couple of weeks after starting using shortcuts, you are right.

play01:25

It's gonna be hard for you.

play01:27

But once you get used to it, you'll see how fast you are

play01:31

and you will regret that you didn't use them before.

play01:35

Okay, let's go on.

play01:36

After opening the project, you will probably use different files at the same time.

play01:42

index, style, and js file.

play01:45

Let's say I'm writing some code here.

play01:47

I'll say "div"

play01:49

and class name will be "myDiv"

play01:52

And I want to give a style for this div.

play01:55

Instead of clicking here, writing my style

play02:02

and coming back, creating another one.

play02:06

and going back again.

play02:07

Basically, instead of doing this with the mouse,

play02:10

I can use my keyboard and I can use tab numbers.

play02:14

Number 1, 2 and 3

play02:18

I can use "alt" button

play02:19

And if I press on 1,

play02:22

As you can see it's in the index file.

play02:30

It's gonna work like that.

play02:32

If I create here another div

play02:35

I can quickly go to style.css, and write other divs.

play02:40

But what if we have many files here.

play02:43

We are working with multiple pages, multiple css files or js files

play02:48

I cannot count them like that.

play02:51

So what I'm gonna do is, using ctrl+p

play02:54

and writing here some letters of my target file

play02:58

As you can see I can go to "contact.html" quickly

play03:01

ctrl+p

play03:03

I want to go to the app.js or style.css

play03:07

It's that easy.

play03:08

You might say selecting here is easier.

play03:11

But imagine, you have many pages, folders, files

play03:16

Instead of searching for them in the sidebar,

play03:18

Just use ctrl+p and search for it.

play03:21

And after working for a while,

play03:23

You'll probably have many tabs here.

play03:26

To prevent this, after finishing your task,

play03:29

You can close them using ctrl+w

play03:32

like that.

play03:34

In this case it's gonna close them one by one.

play03:36

And if you want to close all tabs here,

play03:39

You can use ctrl+k+w

play03:42

Like that. It's gonna close everything.

play03:45

By the way, if you are creating a folder,

play03:48

Let's say "folder". And inside another folder.

play03:55

And inside this, maybe "myFile"

play03:59

Instead of doing this. Let's delete here.

play04:02

I can come here, and say:

play04:05

folder/folder2/myApp.js

play04:12

In this case, it's gonna create those folders, and inside, this file.

play04:16

So, you don't have to waste your time.

play04:18

If you want to see more coding areas, you can close your sidebar using ctrl+b

play04:25

And you open it again. Like that.

play04:28

And you can zoom in or zoom out using ctrl - or ctrl =

play04:37

And let's say you have a lot of HTML elements here.

play04:41

And, it's not possible to remember every class name here.

play04:45

Instead of going style.css again and again,

play04:49

You can basically split your editor using ctrl+\

play04:55

In this case, to switch between different slices, you can use ctrl and slice number.

play05:01

It's gonna be slice number 1

play05:03

Slice number 2.

play05:04

So, if I say ctrl+1 we are here. ctrl+2. We are here.

play05:10

If I come here and close this tab using ctrl+w

play05:15

Right now I can see my class names here and I can give styles for them.

play05:24

By the way, guys we are gonna talk about a lot of shortcuts. As I said at the beginning.

play05:29

It's gonna be hard to memorize all those things but I promise you after coding let's say for one month with these shortcuts.

play05:35

You will not even recognize that you are using them. You are gonna be a robot.

play05:41

Okey.

play05:42

Let's say, you want to install a library or basically you want to push your project to Github.

play05:48

So, what you can do is opening terminal. (ctrl + `)

play05:52

When writing any command here, if you have any mistake,

play05:56

Let's say "giit init". As you can see, there is a typo here.

play06:01

It's gonna give me this error.

play06:03

Instead of writing this again,

play06:05

You can just use your arrow keys, and it's gonna repeat the previous command.

play06:10

And you can come here and fix it.

play06:13

If you want to clear your terminal. You can write here: "clear". And enter.

play06:19

Okey. Let's see how we can be faster while coding.

play06:23

I'm gonna delete here.

Rate This

5.0 / 5 (0 votes)

関連タグ
VS CodeProductivityKeyboard ShortcutsCoding TipsDeveloper ToolsEfficiency HacksProject ManagementShortcut TutorialWorkflow OptimizationCoding Speed
英語で要約が必要ですか?