Visual Studio Code 2022 | Web Dev Setup | Top Extensions, Themes, Settings, Tips & Tricks

codeSTACKr
27 Dec 202119:36

Summary

TLDRThis video tutorial offers a beginner's guide to setting up Visual Studio Code (VS Code) for web development. It covers installation, customization, and usage of features like extensions, themes, and keyboard shortcuts. The tutorial also introduces VS Code's powerful built-in tools like Emmet for HTML and CSS shorthand, IntelliSense for code suggestions, and the terminal for command-line operations. Viewers are directed to additional resources for learning web development languages and VS Code proficiency.

Takeaways

  • πŸ’» **Choose a Code Editor**: The first step to becoming a web developer is selecting a code editor, with Visual Studio Code (VS Code) being recommended for its community support and customization options.
  • πŸ”— **Download and Install VS Code**: VS Code is a free, open-source, and cross-platform editor available for Windows, Linux, and macOS, which can be downloaded from code.visualstudio.com.
  • πŸ› οΈ **Customize VS Code**: After installation, customize VS Code by integrating it fully into your operating system and adjusting settings like font size and tab size for better readability and coding experience.
  • πŸ—‚οΈ **Understand the Interface**: Familiarize yourself with the VS Code interface, including the sidebar for project files, search functionality, source control integration, and extensions.
  • πŸ” **Utilize the Command Palette**: Use the Command Palette (Ctrl+Shift+P or F1) to quickly access and execute commands without navigating through menus.
  • ⌨️ **Master Keyboard Shortcuts**: Enhance productivity by learning and using keyboard shortcuts for common actions instead of relying on the mouse.
  • 🎨 **Select a Theme**: Personalize your coding environment by choosing from various themes available in VS Code, including dark and light options.
  • πŸ“š **Extensions for Enhanced Productivity**: Install essential extensions like Live Server for real-time previews, Prettier for code formatting, and Auto Rename Tag for HTML editing convenience.
  • πŸ“ **Project Management**: Learn to open and manage project folders in VS Code, create necessary file structures, and switch between files efficiently.
  • πŸ’‘ **Embrace Built-in Features**: Leverage VS Code's built-in features like Emmet for HTML and CSS shorthand, IntelliSense for code suggestions, and multi-cursor editing for faster coding.
  • πŸ–₯️ **Terminal Usage**: Overcome any fear of the terminal by learning its basics in VS Code, as it's essential for tasks like file management, running Node.js scripts, and using Git for version control.

Q & A

  • What is the first step to becoming a web developer according to the script?

    -The first step to becoming a web developer is to pick a code editor.

  • Which code editor is recommended in the script for web development?

    -The script recommends Visual Studio Code (VS Code) as the code editor for web development.

  • What are some of the features of Visual Studio Code mentioned in the script?

    -VS Code is described as free, open source, cross-platform, with great community support, tons of extensions, fully customizable, lightweight, and fast.

  • How can one get started with VS Code as per the script?

    -To get started with VS Code, one needs to download and install it from code.visualstudio.com, and then select additional tasks during installation for full integration.

  • What is the purpose of the sidebar in VS Code?

    -The sidebar in VS Code contains the explorer for project files, search functionality, source control with Git integration, run and debug options, and the extensions panel.

  • What keyboard shortcuts are recommended for navigating VS Code?

    -The script suggests remembering keyboard shortcuts like Ctrl+Shift+P or F1 for the command palette, Ctrl+K Ctrl+S for keyboard shortcuts, and Ctrl+Comma for settings.

  • What are some settings changes recommended for new users in the script?

    -The script recommends increasing the font size for readability, adjusting the tab size, enabling bracket pair colorization, and turning on word wrap.

  • How can one change the theme in VS Code as per the script?

    -To change the theme in VS Code, one can go to the manage cog, select themes or color theme, and use the up and down arrows to cycle through themes or search for additional themes.

  • What is the benefit of using the 'Live Server' extension mentioned in the script?

    -The 'Live Server' extension is beneficial as it sets up a local web server to view changes in real time without having to reload the page.

  • How does the 'Prettier' extension help in web development?

    -The 'Prettier' extension helps to keep the code formatted and uniform, making the code 'pretty' and easier to read.

  • What is the functionality of the 'Emmet' feature in VS Code?

    -The 'Emmet' feature in VS Code allows for shorthand coding, enabling users to write HTML and CSS more quickly by expanding abbreviations into full code.

  • How can one open a project folder in VS Code?

    -One can open a project folder in VS Code by right-clicking on a folder and selecting 'Open with VS Code' or by using the 'File' menu and choosing 'Open Folder'.

  • What is the significance of the 'IntelliSense' feature in VS Code?

    -IntelliSense provides context-aware suggestions to help with coding, offering properties, methods, and functions available for the object being coded, speeding up the development process.

Outlines

00:00

πŸ’» Introduction to Web Development and VS Code

The paragraph introduces the viewer to the world of web development and the importance of selecting a good code editor. Visual Studio Code (VS Code) is highlighted as the recommended choice due to its popularity, open-source nature, cross-platform compatibility, community support, and extensive extension library. The presenter shares tips and tricks to maximize the use of VS Code and mentions additional resources available in the video description, including a VS Code cheat sheet and a course for becoming proficient in VS Code. The installation process for VS Code is outlined, emphasizing the selection of additional tasks during installation to integrate it well with the operating system. The video also provides a quick tour of VS Code's interface, focusing on the sidebar, which includes the explorer for project files, a search function, source control integration with Git, and the extensions tab. The command palette is introduced as a powerful tool for executing commands quickly, and the status bar's informational role is explained.

05:02

πŸ–ŒοΈ Customizing VS Code with Themes and Extensions

This section delves into customizing VS Code's appearance through themes and extensions. The presenter demonstrates how to change color themes and introduces several built-in themes, then shares personal preferences for dark themes, including Night Owl and Code Stacker. The process of installing new themes via the extensions panel is shown. The paragraph continues with a discussion on popular extensions like Live Server for real-time web server setup, Prettier for code formatting, and Auto Rename Tag for HTML tag synchronization. The presenter also covers the installation of icon packs to enhance the visual identification of files and folders within VS Code. The process of opening a project folder in VS Code and setting up a basic file structure for web development, including HTML, CSS, and JavaScript files, is also explained.

10:04

πŸ—‚οΈ Navigating and Editing Files in VS Code

The focus of this paragraph is on file navigation and editing within VS Code. It starts by demonstrating how to close files using keyboard shortcuts and reopen them using the 'Go to File' command. The paragraph then covers the preview feature of files and how to disable it through settings for a more permanent file-opening approach. The presenter introduces Emmet, a shorthand feature for quickly writing HTML and CSS code, with examples of how to create elements and lists efficiently. IntelliSense, a context-aware suggestion feature, is also explored, showing how it assists in writing JavaScript code by providing property and method suggestions. The paragraph concludes with a demonstration of how to close the sidebar using a keyboard shortcut and a brief mention of other shortcuts for navigating different menus within the sidebar.

15:04

πŸ”„ Advanced Editing and Terminal Usage in VS Code

This paragraph covers advanced text manipulation and navigation techniques in VS Code, such as using the arrow keys with Ctrl for word-by-word navigation, Alt for moving lines, and Ctrl+D for duplicating selections. The presenter also shows how to use multiple cursors for simultaneous editing in multiple lines. The paragraph transitions into introducing the terminal within VS Code, aiming to demystify it for beginners. It explains how to open a terminal session, switch between different terminal types, and set a default terminal. The terminal's versatility in tasks like directory navigation, file management, and interaction with Node.js, npm, and Git is highlighted. The video concludes with encouragement for beginners to explore further with provided learning resources and a call to action for viewers to like and subscribe for more content.

Mindmap

Keywords

πŸ’‘Code Editor

A code editor is a type of software used for editing source code. In the video, Visual Studio Code (VS Code) is highlighted as a popular choice among developers due to its open-source nature, cross-platform support, and extensive community and extension support. It's central to the video's theme as the presenter guides viewers on setting up VS Code for web development.

πŸ’‘Visual Studio Code (VS Code)

VS Code is a free, open-source editor that supports various programming languages. It's noted for its customization options, extensions, and integration with Git for version control. The video emphasizes VS Code's lightweight and fast nature, making it ideal for web development, and it serves as the primary tool discussed throughout the tutorial.

πŸ’‘Extensions

Extensions in the context of VS Code are add-ons that enhance the editor's functionality. The video introduces several extensions such as 'Live Server' for real-time web page updates and 'Prettier' for code formatting. Extensions are crucial for tailoring the development environment to specific needs, exemplifying the video's focus on optimizing the VS Code setup.

πŸ’‘Keyboard Shortcuts

Keyboard shortcuts are quick key combinations that perform specific actions within an application. The video encourages the use of shortcuts like 'Ctrl+Shift+P' for accessing the command palette in VS Code to improve efficiency. These shortcuts are integral to the video's message of streamlining the coding process.

πŸ’‘Themes

Themes in VS Code are visual skins that change the appearance of the editor's interface. The video showcases how to switch between themes, including 'Night Owl' and 'Coder Dark Theme', to personalize the coding environment. Themes are part of the broader discussion on customizing VS Code to fit individual preferences.

πŸ’‘Bracket Pair Colorization

Bracket Pair Colorization is a feature that colors matching pairs of brackets, improving code readability. The video demonstrates enabling this feature in the settings, emphasizing the importance of visual aids in coding and how they can enhance the development experience within VS Code.

πŸ’‘Source Control

Source control, or version control, is a system that tracks and manages changes to source code over time. The video mentions VS Code's integration with Git, a widely used source control system. This ties into the broader theme of efficient code management and collaboration tools for developers.

πŸ’‘Emmet

Emmet is a productivity tool for web developers that provides shorthand for writing HTML, CSS, and other markup languages. The video demonstrates how Emmet can rapidly generate code snippets in VS Code, which is a testament to the video's goal of showcasing tools that accelerate web development.

πŸ’‘IntelliSense

IntelliSense is a code completion feature in VS Code that provides smart suggestions based on the context of the code being written. The video illustrates how IntelliSense can assist with JavaScript coding, underscoring the video's theme of leveraging editor capabilities to write efficient and error-free code.

πŸ’‘Terminal

The terminal, as discussed in the video, is a command-line interface for executing shell commands. The video explains how to open and use the terminal in VS Code, which is essential for tasks like running Node.js scripts, using npm, and handling Git operations, thus emphasizing the terminal's role in the developer's toolkit.

πŸ’‘Project Folder

A project folder is a directory containing all the files related to a specific project. The video guides viewers on how to open and organize a project folder in VS Code, which is a fundamental step in setting up a development workspace and aligns with the video's educational focus on project management in VS Code.

Highlights

Choosing a code editor is the first step to becoming a web developer.

Visual Studio Code (VS Code) is recommended for its popularity, community support, and customization options.

VS Code is lightweight and fast, making it suitable for web development.

The video provides a free VS Code cheat sheet with keyboard shortcuts, extensions, themes, and fonts.

Instructions on how to install VS Code on various operating systems are provided.

VS Code supports multiple programming languages, with a focus on HTML, CSS, and JavaScript for web development.

A tour of the VS Code interface is given, including the sidebar, search, and extensions.

The Command Palette (Ctrl+Shift+P or F1) is highlighted for quick access to commands.

Customizing keyboard shortcuts can improve efficiency.

Settings such as font size and tab size can be adjusted to personal preferences.

Bracket pair colorization is a new feature in VS Code for better code readability.

Word wrap can be enabled to keep long lines of code within the viewable area.

Themes can be changed to suit personal preferences, with a focus on dark themes.

Extensions like Live Server, Prettier, and Auto Rename Tag are recommended for web development.

Icon packs can be installed to customize the appearance of files and folders in the sidebar.

Opening a project folder in VS Code is demonstrated with different methods for various operating systems.

Creating a basic website structure with HTML, CSS, and JavaScript files is shown.

Navigating between open files and using the 'Preview' feature is explained.

EMMET is introduced as a shorthand for quickly writing HTML and CSS code.

IntelliSense is highlighted for providing context-aware suggestions and autocompletion.

The ability to split editors in VS Code allows working on multiple files side by side.

Keyboard shortcuts for navigating and manipulating code are demonstrated.

The terminal in VS Code is introduced as a powerful tool for various development tasks.

The video concludes with a call to action for viewers to like, subscribe, and follow a learning roadmap.

Transcripts

play00:00

do you want to learn how to become a web

play00:01

developer well the first step is to pick

play00:03

a code editor let me show you how to get

play00:05

set up so that you can start learning

play00:07

today i'll also show you a bunch of tips

play00:09

and tricks to get the most out of your

play00:11

code editor

play00:14

[Music]

play00:18

there are a lot of code editors to

play00:19

choose from but the most popular and my

play00:21

favorite is visual studio code and don't

play00:24

confuse visual studio code with visual

play00:27

studio vs code is a free open source

play00:30

cross-platform application it has great

play00:32

support from the community and tons of

play00:34

extensions it's also fully customizable

play00:37

to fit any developers preferences and

play00:39

project needs it's lightweight and fast

play00:41

which is why it's perfect for web

play00:43

development

play00:44

throughout this video i'll reference

play00:46

links to other resources and all of

play00:48

those links will be in the video

play00:49

description below included is a free vs

play00:52

code cheat sheet that includes common

play00:54

keyboard shortcuts my favorite

play00:56

extensions themes fonts and icon packs

play00:59

and if you really want to become a vs

play01:00

code pro go check out my vs code course

play01:02

at vscodehero.com

play01:05

the first step is to install vs code so

play01:07

go to code.visualstudio.com

play01:10

download this is a cross-platform

play01:12

application that works on windows linux

play01:15

and mac os and go ahead and download the

play01:17

appropriate version and begin the

play01:19

installation

play01:20

when you get to this section select

play01:22

additional tasks i would recommend

play01:24

checking everything this just fully

play01:25

integrates vs code into your operating

play01:27

system you may or may not see these

play01:29

exact settings if you're on linux or mac

play01:31

os or once the installation is complete

play01:34

this is what you're going to see a vs

play01:35

code can be used for many different

play01:37

programming languages for now we're just

play01:39

going to focus on the basic web

play01:40

development languages which include html

play01:43

css and javascript so we're going to set

play01:45

it up for that but first let's take a

play01:47

quick tour

play01:48

on the left side we see our sidebar at

play01:51

the top we have our explorer this is

play01:53

where you're going to find all of your

play01:54

project files and directories once you

play01:56

have a project folder opened

play01:58

next is search this is pretty

play02:00

self-explanatory this will allow you to

play02:02

search within your project files there's

play02:03

also a find and replace functionality

play02:06

and next is source control

play02:08

this uses git integration and if you

play02:10

don't know what git is don't worry i

play02:12

have an entire video that explains it

play02:13

and i'll include a link for that

play02:15

next is run and debug

play02:17

we're not going to get into debugging in

play02:19

this video but of course i have a video

play02:20

for that too and next we have extensions

play02:24

we'll come back to the extensions tab in

play02:25

just a bit

play02:26

at the bottom we have our manage cog in

play02:29

this menu you'll find things like

play02:31

settings keyboard shortcuts themes and

play02:33

settings sync the top of this menu we

play02:35

see the command palette or the shortcut

play02:37

for is ctrl shift p

play02:39

if you have a keyboard with an f1 key

play02:41

you can also just press f1

play02:43

so this is a really cool feature in here

play02:45

you can search for just about anything

play02:47

you can open a file change a theme view

play02:50

the keyboard shortcuts basically every

play02:52

command that's available is here in the

play02:53

command palette and you don't have to

play02:55

complete a word just start typing and

play02:56

it's going to figure out what you're

play02:57

looking for it's very helpful saves a

play02:59

lot of time if the only keyboard

play03:01

shortcut that you remember is ctrl shift

play03:03

p or f1 then you're going to be set also

play03:07

at the bottom of the user interface is

play03:08

the status bar it has a lot of useful

play03:11

information if you're using source

play03:12

control you're going to see the branch

play03:14

that you're on you're also going to see

play03:15

the current line number and the language

play03:17

of the current document and many other

play03:19

pieces of helpful information let's go

play03:21

ahead and check out the keyboard

play03:23

shortcuts we can go to the manage cog

play03:25

and then go to keyboard shortcuts or we

play03:27

can press control k control s

play03:30

you can see here that there are tons of

play03:32

keyboard shortcuts and you can even

play03:34

customize them and now you'll never

play03:36

remember them all but try to remember as

play03:38

many as you can as you need them when

play03:40

you notice yourself needing to use the

play03:42

mouse for something look for the

play03:43

keyboard shortcut for that action and

play03:45

then try to remember that for next time

play03:47

you're going to save a lot of time by

play03:49

using keyboard shortcuts over using the

play03:51

mouse

play03:52

now let's look at some settings to get

play03:54

to the settings we can go to the manage

play03:56

cog and then we can go to settings or

play03:58

you can press ctrl comma

play04:00

there are just a few settings that i'd

play04:02

recommend that you change right off the

play04:03

bat and these are just my personal

play04:04

preference so you can set these however

play04:07

you like

play04:08

first i like to increase the font size

play04:10

just a bit i'm going to change mine to

play04:11

18.

play04:12

i have a larger screen i just want to

play04:14

make sure that i don't strain my eyes

play04:15

and make sure that the font is nice and

play04:17

readable and next is the tab size so by

play04:21

default it's four i prefer two but again

play04:23

personal preference

play04:25

next let's search we go up here to

play04:27

search settings and let's type in

play04:29

editor bracket pair and i'm going to

play04:31

enable bracket pair colorization there

play04:33

used to be an extension for this but now

play04:35

it's built right into vs code so i'm

play04:37

going to enable that and i'm going to

play04:39

turn the bracket pairs on to true and

play04:42

the horizontal i'm going to change that

play04:44

to true as well and lastly let's go up

play04:46

here and search for word wrap

play04:50

and so editor word wrap i'm going to

play04:52

turn this to on

play04:53

this will prevent long lines of code

play04:55

from going off the right side of the

play04:57

page

play04:58

everything automatically saves so we can

play05:00

just close that and next we're going to

play05:01

look at themes now again we can go to

play05:04

our manage cog and go to themes or color

play05:07

theme or the shortcut for that is ctrl k

play05:10

ctrl t

play05:11

in here we can use the up and down

play05:13

arrows to cycle through the themes so

play05:14

i'll give you a quick preview of the

play05:16

built-in themes

play05:18

so we've got abyss dark dark plus

play05:21

hindi

play05:22

monica monica dimmed red

play05:26

solarize dark tomorrow night blue

play05:29

high contrast and then quick warning

play05:31

we're about to get into the light themes

play05:33

so put on your sunglasses

play05:35

so here we go light light plus quiet

play05:38

light and solarized light all right

play05:40

let's get off of that i don't care much

play05:42

for light themes at all i prefer the

play05:44

dark themes so i'm going to show you my

play05:46

five favorite themes we can search for

play05:49

them right here by going to browse

play05:51

additional color themes

play05:53

so there's tons of additional themes

play05:54

here first i'm going to search for night

play05:56

owl so night owl by sarah drazner this

play05:59

is a great theme another one that i like

play06:01

is cobalt 2 that's by west boss

play06:04

and then shades of purple this one is by

play06:07

amadowas

play06:08

another great one is the coder coder

play06:11

dark theme and that's by my friend

play06:13

jessica at codercoder and then my

play06:15

favorite theme of course is my code

play06:18

stacker theme

play06:20

so to install this i just have to hit

play06:22

enter and it will install and apply this

play06:24

theme

play06:25

and we just want to just go ahead and

play06:26

say yes install

play06:28

and that's it so now we have a new theme

play06:30

and there are links to all of these

play06:32

themes in the description or you can

play06:33

just search for them right here or from

play06:35

the extensions panel which we're going

play06:37

to look at next all right so we're

play06:39

actually already in the extensions panel

play06:41

it's right here on the side here and

play06:42

we're just going to clear out this

play06:43

search

play06:44

and so in the extensions panel we're

play06:46

going to find all of our installed

play06:47

extensions and then there's a bunch of

play06:49

popular extensions that we can install

play06:51

or we can manually search for an

play06:52

extension in the marketplace

play06:54

so the first extension that we're going

play06:56

to look at is live server now this is a

play06:59

very popular extension with over 17

play07:02

million downloads this extension sets up

play07:04

a local web server so that you can see

play07:07

changes that you make to your code in

play07:08

real time without having to reload it's

play07:11

a must have for web development so let's

play07:13

go ahead and install this

play07:15

the next extension we're going to look

play07:16

at is called prettier this extension

play07:19

helps you to keep your code formatted

play07:20

and uniform throughout it makes your

play07:22

code pretty

play07:23

next we're going to look for

play07:25

auto rename

play07:26

ag

play07:27

whenever you change an html tag it

play07:29

automatically

play07:30

renames the corresponding tag so it just

play07:33

saves you a little bit of time

play07:35

there's a couple of other things that

play07:36

you can install to customize vs code

play07:40

one of them is

play07:41

icon packs so we're going to look for vs

play07:44

code

play07:44

dash icon

play07:46

i like these icons

play07:48

so this adds some icons to your files

play07:50

and folders to make them easily

play07:53

identifiable

play07:54

the other thing that we can look for are

play07:56

product icon packs so the one that i

play07:59

like is called fluent icon

play08:02

and so what that does is it changes the

play08:04

icons on the left side in your sidebar

play08:07

so i'm going to install that now you can

play08:09

see that the icons on the left side just

play08:11

look a little different here's the

play08:13

default and here are the fluent icons

play08:16

there are other icon packs that you can

play08:18

choose from as well

play08:19

next let's open up a project folder so

play08:22

there are several ways to go about doing

play08:23

this from outside of vs code i'm on

play08:27

windows so depending on the operating

play08:29

system that you're using it might differ

play08:32

but i can right click on a folder that i

play08:33

want to open up in vs code and then

play08:36

open with vs code

play08:38

and you'll want to say yes i trust this

play08:40

author and now you can see that we have

play08:42

our demo folder opened in vs code we can

play08:45

close this getting started and the other

play08:47

way is from inside vs code we can go to

play08:50

file and then open folder and then again

play08:52

just pick the folder that you want to

play08:54

open up in vs code from your operating

play08:56

system file explorer so now that we have

play08:58

a project folder open we can now add a

play09:01

folder structure and some files in a

play09:04

typical basic website you're going to

play09:05

have an index.html file a css folder

play09:08

containing your style sheets and a js

play09:10

folder containing your javascript files

play09:13

so let's go ahead and add our index.html

play09:15

file so we go right here add new file

play09:18

we're going to name it index.html

play09:21

so as we create a file it automatically

play09:22

opens it for us

play09:24

next let's create a new folder so right

play09:26

here add new folder we're going to name

play09:28

this one css

play09:30

and then inside this folder we're going

play09:31

to create a new file we're going to name

play09:33

this

play09:34

style.css

play09:35

now we have that file and folder created

play09:38

now there's a shortcut instead of

play09:39

creating a folder and a file at the same

play09:41

time we can just click add file and now

play09:44

we can create a folder and file at the

play09:46

same time so we want to create a js

play09:47

directory and then slash and we'll

play09:50

create an app.js file so now it creates

play09:53

the folder and the file for us and again

play09:56

it opened the file now to switch between

play09:58

these files we can use control tab or

play10:01

ctrl shift tab to go forward and

play10:03

backward between the files if we want to

play10:05

close a file we can press ctrl w

play10:08

so let's just close all of these files

play10:10

a great way to open a file again instead

play10:12

of using our mouse we can press ctrl p

play10:15

and then we have our files right here

play10:16

ready for us and we can just select

play10:18

which file we want to open and hit enter

play10:20

if you have a lot of files to search

play10:21

through just start typing the name of

play10:23

the file and it's going to pop up now

play10:25

notice something if i click on app.js

play10:28

it pops up here and it's italicized and

play10:30

if i click on style.js it's replaced

play10:33

right here so this is a preview if you

play10:36

want to open and keep the file open you

play10:39

have to either double click the file

play10:41

and now it will remain open

play10:44

or edit something inside the file and

play10:46

now it will remain open as well you'll

play10:48

notice that none of these are italicized

play10:50

anymore if you want to change this

play10:52

functionality we can go to the settings

play10:54

so control comma

play10:56

and then let's search for

play10:59

enable review

play11:01

so workbench editor enable preview let's

play11:04

go ahead and uncheck that

play11:05

and we can close the settings let's

play11:08

close these files and then let me click

play11:10

on app and you see this not italicized i

play11:13

can click on style and it's not

play11:14

italicized and they

play11:16

remain open as we click through i prefer

play11:19

it this way all right next i want to

play11:20

show you my favorite built-in feature of

play11:23

vs code and it's called imit now think

play11:26

of emmitt as shorthand with it you can

play11:28

easily write a lot of code quickly and

play11:30

it dramatically speeds up your html and

play11:33

css workflow here i'm going to

play11:35

demonstrate creating an html page you

play11:38

can do this by just pressing exclamation

play11:41

point you're gonna see emit pop up says

play11:43

emit abbreviation

play11:45

so i'm gonna press enter now and there

play11:47

we have it a basic blank html web page

play11:50

ready to go if you've never seen html

play11:53

before and you have no clue what all

play11:54

this is don't worry i'm just

play11:56

demonstrating the capabilities of vs

play11:58

code and imit you don't have to know

play11:59

exactly what any of this means right now

play12:01

so other things that we can do we go

play12:03

down here to the body we start typing we

play12:05

can create a div by just typing div

play12:08

enter and that creates a div tag for us

play12:10

we can automatically start typing inside

play12:13

this div tag

play12:16

we can go below that and then let's

play12:18

create a list so we'll say ul

play12:20

and we can say greater than li

play12:23

times 4 so we just created a list with 4

play12:27

items in it

play12:28

i could also

play12:29

create a div with the class of my class

play12:33

just by typing period my class

play12:36

and now we have the div with the class

play12:37

of my class

play12:39

i can create an input

play12:41

and i can give it an id

play12:43

of boo and a class of bar just by typing

play12:46

this there we go we have our input with

play12:48

the idn class

play12:50

if i just type input then we can see in

play12:52

this pop-up all of the different input

play12:54

types that we can select from so if i

play12:55

needed a date input just hit enter and

play12:58

now i have a date input and within it

play13:00

you can create a really complex html

play13:02

structure with one line it's really

play13:05

awesome and i have an entire video on

play13:07

emmett if you want to learn more now

play13:09

somewhat similar to emmett is

play13:10

intellisense this is another built-in

play13:13

feature of vs code and it helps you with

play13:15

context aware suggestions intellisense

play13:18

features are sometimes called by other

play13:20

names such as code completion code

play13:22

assist or code hinting vs code

play13:24

intellisense is provided for javascript

play13:27

typescript json html css scss and less

play13:31

out of the box

play13:33

vs code supports word-based completions

play13:35

for any programming language but it can

play13:37

also be configured to have richer

play13:38

intellisense by installing a language

play13:41

extension

play13:42

so if we go over to extensions and we go

play13:44

to filter category and then programming

play13:47

languages

play13:49

and we're going to see all of these

play13:50

different programming languages that we

play13:51

can choose from and these include python

play13:54

c c plus c sharp java go php ruby and

play13:58

rust so let's see what intellisense can

play14:00

do we're going to go to the app.js file

play14:02

this is a javascript file so we're going

play14:05

to type document and we can see it's

play14:06

already starting to help us so let's hit

play14:07

enter we want document and then we're

play14:10

going to press period and this is going

play14:12

to give us a list of suggestions these

play14:13

are all of the available properties and

play14:15

methods and functions available to us on

play14:18

document a no developer can remember

play14:20

every method function and property

play14:22

available so intellisense helps us and

play14:24

allows us to write code much faster

play14:28

right now when you're writing code you

play14:29

want as much space as possible right now

play14:32

i have this very zoomed in so this is

play14:35

not exactly what it would look like on

play14:36

your computer but i'm kind of running

play14:38

out of space here

play14:40

we can actually get rid of this sidebar

play14:41

we press ctrl b that's going to close

play14:44

the sidebar so remember b is for side

play14:46

bar

play14:47

and press ctrl b again it will bring it

play14:49

right back

play14:50

but if we want to open a specific menu

play14:52

in the sidebar then those have specific

play14:55

keyboard shortcuts as well so ctrl shift

play14:57

e is the explorer control shift f is

play15:01

this search control shift g is the

play15:04

source control control shift d is debug

play15:07

and control shift x is extensions so

play15:10

ctrl shift e we'll go back to the

play15:11

explorer

play15:12

now another awesome feature of vs code

play15:14

is the ability to split editors so let's

play15:17

press ctrl b we're going to close the

play15:18

sidebar and now let's say i want to work

play15:20

on these side by side so i'll take my

play15:22

app.js and just move it right over here

play15:25

and now i can have two files open side

play15:27

by side

play15:29

i can also put this down below

play15:31

horizontally if i wanted to

play15:33

i guess that might be a little better if

play15:34

my monitor was vertical but we can put

play15:36

it wherever we want all right so let's

play15:38

move this back over here

play15:40

now there are a bunch of keyboard

play15:41

shortcuts that will help you to navigate

play15:43

quickly through your code and manipulate

play15:46

the text of course you could use the

play15:47

arrow keys to move around that's pretty

play15:49

easy but if we hold down the ctrl key

play15:52

while we move our arrow keys it moves us

play15:54

one word at a time instead of one

play15:56

character at a time that makes it a

play15:58

little bit quicker

play16:00

let's say we wanted to move this div

play16:02

down below the ul we could you know use

play16:05

our mouse and copy it and paste it and

play16:08

delete it and do all that but just with

play16:11

our keyboard we can press the alt key

play16:15

and then the up and down arrows we can

play16:17

move this line now anywhere we want and

play16:20

let's say i want to duplicate uh these

play16:22

allies i wanted to add uh two more

play16:25

allies so i can press alt shift down

play16:27

arrow and add as many lis as i want

play16:31

now maybe i want to

play16:33

change

play16:34

all of these divs here to span tags so i

play16:36

can press ctrl d and it's going to

play16:38

select the current word that the cursor

play16:40

is on but if i press ctrl d again i'm

play16:43

going to select the next occurrence of

play16:44

that same word and keep pressing it and

play16:47

select as many as i want now they're all

play16:49

selected i have multiple cursors going

play16:51

on here now i can start typing i can say

play16:54

span so now

play16:56

all of the divs turned into span now

play16:59

let's say i want to type into all of

play17:01

these allies at the same time well if i

play17:03

click into here i can hold down the alt

play17:06

key

play17:07

and i can create multiple cursors

play17:10

all at the same time then i can type

play17:12

into all of them and then of course as

play17:14

in just about every other application if

play17:17

i did something that i didn't mean to do

play17:19

i can press ctrl z to undo it alright so

play17:22

now we're going to talk about the

play17:23

terminal this is probably the scariest

play17:25

subject for a lot of people but it's

play17:27

really not that scary i promise there's

play17:30

so much that we can do with the terminal

play17:32

so the easiest way to open the terminal

play17:33

is by pressing control back tick or if

play17:36

you have to use the mouse go up here to

play17:37

terminal and then new terminal

play17:40

all right so i'm just going to press

play17:41

ctrl back tick that is the key to the

play17:43

left of the number one on your keyboard

play17:46

alright so i again i'm on windows so

play17:48

this came up to powershell windows has

play17:50

powershell or the command line and on

play17:53

windows i actually prefer git bash if

play17:56

you're on linux or mac os i prefer zsh

play17:59

if we go up here to the right of this

play18:00

plus there's a down arrow we can select

play18:02

powershell command prompt or git bash so

play18:05

i'm going to select get bash i already

play18:07

have that installed and if you don't

play18:09

have get bash installed don't worry i

play18:10

have an entire video on git where i'll

play18:12

show you how to get it installed the

play18:14

link of course is in the description

play18:15

below so that started a new bash

play18:17

terminal i want to select my default

play18:20

terminal so i'm going to go to select

play18:22

default profile

play18:23

and i'm going to select git bash as my

play18:26

default let's go ahead and close out

play18:28

this powershell we're going to close out

play18:30

this bash so now when i press ctrl

play18:33

backtick it's going to automatically

play18:35

open up a bash terminal for me so again

play18:37

there's a lot that we can do with the

play18:38

terminal you're going to have to use it

play18:40

at some point you can traverse

play18:42

directories create directories create

play18:44

files you're going to use it for node.js

play18:46

and npm you're going to use it for git

play18:49

version controlling and so many other

play18:51

things

play18:52

vs code is a powerful and versatile code

play18:54

writing application and it can handle

play18:56

every web development language that you

play18:58

would want to use so what next if you're

play19:00

just starting out check out my html css

play19:03

and javascript crash courses to start

play19:05

with and i have an entire roadmap that

play19:07

you can follow and i'll include the link

play19:08

to that in the description if this video

play19:10

was helpful help me out by giving it a

play19:12

like and subscribe if you haven't

play19:14

already for more videos like this

play19:21

[Music]

play19:36

you

Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
Web DevelopmentVS CodeCode EditorExtensionsKeyboard ShortcutsThemesCustomizationProductivityGit IntegrationCode FormattingIntelliSense