25 VS Code Productivity Tips and Speed Hacks

Поділитися
Вставка
  • Опубліковано 27 гру 2024

КОМЕНТАРІ • 2,1 тис.

  • @stefandili2650
    @stefandili2650 3 роки тому +1252

    Emmet balance outward command - expands selection outwards to the nearest tags/brackets. Hit again to include the tag in the selection. Now combine with another powerful one: emmet wrap with abbreviation. Never cut + write + cursor between + newline + paste again! Just click on the desired section, balance outward, wrap with abbreviation. Boom!

    • @Fireship
      @Fireship  3 роки тому +182

      🎉 T-Shirt WINNER! Thanks for the awesome tip. Reach out via email or slack with your mailing address and size. Also, your comment will be featured in the next short :)

    • @stefandili2650
      @stefandili2650 3 роки тому +38

      @@Fireship 🔥🔥🔥

    • @antio1753
      @antio1753 3 роки тому +39

      @@Fireship I wrote the same tip, (I don't know if it was earlier than Stefan or after, But says "3 days ago" on both of our comment).....aaah maybe next time I will be more lucky :(
      Well done Stefan Enjoy your reward :D !!!!

    • @ALLINONETECH6
      @ALLINONETECH6 3 роки тому +11

      I don't understand 🤔

    • @stefandili2650
      @stefandili2650 3 роки тому +22

      @@ALLINONETECH6 create a tag with some text inside. Select part of text. Hit the emmet balance outward command. Repeat until the tag is included in selection. Hit emmet wrap with abbreviation. Enter div in the input and hit enter. Voila

  • @desther
    @desther 3 роки тому +4535

    VS Code is piece of art, Microsoft really outdone itself here.

    • @everyhandletaken
      @everyhandletaken 3 роки тому +725

      I get irate with every MS product, except VSC.. it is really darn stable & it is capable of just about anything (especially with extensions)- all whilst looking sleek.
      The Command Palette over traditional toolbars & menus is pure genius.
      All this, for free..? Am I the product? 🤔

    • @jaedson-barbosa
      @jaedson-barbosa 3 роки тому +286

      @@everyhandletaken nop, because it's a open source project.

    • @bayramkazk5112
      @bayramkazk5112 3 роки тому +135

      @@jaedson-barbosa no it isn't. the builds on the vscode website and the github repo have different licenses. the build you install from the site is based on the vscode repo at github but they add their own telemetry junk etc. it is even written as "built on open source" instead of "open source" in the site. if you want to build from github repo source code or use open source binaries, you can't install most of the extensions which sucks.

    • @beignetkiller
      @beignetkiller 3 роки тому +27

      @@bayramkazk5112 Very interesting, thank you !

    • @ggsvr8926
      @ggsvr8926 3 роки тому +116

      @@bayramkazk5112 There are still full open source builds without any spyware bullshit available, like vscodium.

  • @chrisfilippidis
    @chrisfilippidis Рік тому +650

    Just for me:
    1:47 ctrl+P open command palette and > for all the commands
    2:59 ctrl+F find word (meh)
    3:04 @ symbol at command palette is better than ctrl+F
    3:13 ctrl+shift+. for the same thing
    3:53 ctrl+G go to line number
    3:59 shft+arrows highlight
    4:02 ctrl+arrows move word by word
    4:07 ctrl+D highlight and replace word / add multiple cursors
    4:28 alt+click create cursor at any place
    5:02 ctrl+X cut line
    5:08 alt+arrows move line
    5:14 alt+shift+arrows move and copy line
    5:33 ctrl+L highlight line
    5:37 ctrl+/ comment
    6:27 ctrl+` open terminal
    7:07 ctrl+K clear terminal
    7:12 ctrl+arrows command history

  • @andersinperson
    @andersinperson 3 роки тому +830

    *Sets the play speed to x2 while hearing "the most valuable thing you own is your time..."*

    • @UsamaKarim
      @UsamaKarim 3 роки тому +16

      You should also mute the speaker than. This way you can save your battery & you can save some time by not plugin phone again & again 😂

    • @mohamed6272
      @mohamed6272 3 роки тому +6

      Themostvaluablethingyouownisyourtime

    • @suriya7646
      @suriya7646 3 роки тому +6

      You guys are wasting your time commenting here. Oh wait I am doing the same......

  • @sirdrzamich
    @sirdrzamich 3 роки тому +243

    My favourite shortcut is expand / shrink selection.
    Mac: ⇧ + ⌃ + ⌘ + ←/→
    Windows: Shift + Alt +
    Place the cursor in the middle of a string and start expanding. It will firstly select the word and then will be gradually adding surroundings to the selection: firstly the whole string, then the quotes, then the brackets, then the object, then object's brackets and so on and so forth - feels like AI and can save a lot of time.

    • @primumNocere
      @primumNocere 2 роки тому

      Hey, it's my favorite shortcut too. :) I like it so much that I customized keybindings of them to:
      Ctrl + D Expand (Add Selection To Next Find Match by default)
      Alt + D Shrink (unbound by default)
      Ctrl + Alt + D Add Selection To Next Find Match (unbound by default)
      These 3 work so good with each other, highly recommend giving it a try if those keys are available to you.

    • @mohsinmahmoodmdl
      @mohsinmahmoodmdl 2 роки тому +5

      I was searching for this since long. thanks for sharing :)

    • @mwagaha3343
      @mwagaha3343 Рік тому +3

      This is awesome, thanks!

    • @kaotiskhund
      @kaotiskhund Рік тому +9

      The fact that you distinguish ⇧ from Shift... Yes, doctor

    • @privateagent
      @privateagent 5 місяців тому +1

      It appear first on IntelliJ, microcrap just copied it

  • @andrewglick6279
    @andrewglick6279 3 роки тому +37

    One of my favorites:
    Shift + Alt + A -- Create a block comment (useful for languages that have specific block comment syntax that varies from inline comments). It can turn a highlighted selection into a block comment or create an empty block comment if nothing is selected.

  • @suparthghimire1644
    @suparthghimire1644 3 роки тому +360

    More:
    1) Ctrl + SHIFT + L -> Grandfather version of Ctrl + D (Selects all Occurrences of that string in text editor)
    2) Ctrl + B -> Toggle File Explorer
    3) Ctrl + J -> Alternate for Ctrl + ` (Toggle Terminal)
    4) ALT + Number -> Change Active Tab Windows
    5) Ctrl + Shift + P -> Direct Access to Command Runner for VS Code

    • @0xPanda1
      @0xPanda1 3 роки тому

      thanks dude

    • @BioniXdu25
      @BioniXdu25 3 роки тому +12

      Ctrl + J isn’t exactly the same, it just brings up the bottom panel iirc (but yeah usually you’re on your terminal so I just use it to toggle it on / off)

    • @katech6020
      @katech6020 3 роки тому +9

      F1 does the same as Ctrl+Shift+P

    • @TheSaintsVEVO
      @TheSaintsVEVO 3 роки тому +8

      Ctrl + B toggles sidebar, not file explorer.. I think 🤔

    • @BioniXdu25
      @BioniXdu25 3 роки тому +3

      @@TheSaintsVEVO You're right, CTRL + SHIFT + E brings out file explorer

  • @tjblackman08
    @tjblackman08 3 роки тому +263

    Code Folding at various levels:
    cmd+K+n = Fold code at n level; cmd+K+1, cmd+K+2, 3, 4....
    cmd+K+J = expand all lines of code.

  • @bobmicswarly8333
    @bobmicswarly8333 2 роки тому +24

    I've always used IDE's that were built for one or two languages, so as soon as I opened VS code I was blown away by how many options there were. Simply incredible! I'm using this as my main editor from now on.

    • @maneshipocrates2264
      @maneshipocrates2264 2 роки тому +4

      U said it all. MS will end Jetbrains if they do not improve.

    • @tongpoo8985
      @tongpoo8985 6 місяців тому

      ​@@maneshipocrates2264I don't even know what that is so I think they won.

    • @Kokurorokuko
      @Kokurorokuko 2 місяці тому

      ​@@maneshipocrates2264not really

  • @pasindudilshan4840
    @pasindudilshan4840 3 роки тому +67

    Always create code workspace for the project you're working on.
    If you're working on multiple projects that require different extensions or any other customizations this will help you out by a lot.
    Also you can add the extension(s) used as a workspace recommendations - which can be shared amongst the team.

  • @MindlessTurtle
    @MindlessTurtle 3 роки тому +33

    8:48 - "But now, thanks to the monopoly that Microsoft has on the developer ecosystem..." - it's quotes like these that make me love this channel so much. Kudos, Fireship!

    • @ja31ya
      @ja31ya 3 роки тому +3

      I was going to comment this exact thing...I love how casually he just drops that in... I wonder how many people noticed...

    • @MagicAndReason
      @MagicAndReason 2 роки тому

      @@ja31ya Telemetry

    • @ggGrey
      @ggGrey 2 роки тому +1

      It's not necessarily a dig. It's just stating a fact. So far, most devs seem to have no problem with it because it makes for a smooth working env. Nobody feels comfortable with a monopoly, yet for devs it might very well mean a non-sarcastic "thanks to" in this case.

  • @calitts4708
    @calitts4708 3 роки тому +328

    The things I like the most in VS Code are the auto-save, formatting and the fact that you can customize almost every keybindings you want to make it simple to your uses.
    But one thing that I consider very important and you didn't mention is the code runner extension, that can run almost every type of code easily and fast, very useful for testing for example.

    • @SXsoft99
      @SXsoft99 2 роки тому +4

      Like any editor worth it work

    • @nikhil6204
      @nikhil6204 2 роки тому +2

      Auto save is actually too much for big projects. Its restarts the server everytime you type anything

    • @mwelpa
      @mwelpa Рік тому

      @@nikhil6204 That's why you should build your main app with modules :P

  • @matangubkin6422
    @matangubkin6422 3 роки тому +129

    "Error lens" extension highlights errors and warnings. Works really nice with typescript and very useful overall

  • @feynmaz
    @feynmaz 2 роки тому +55

    Those shortcuts literally changed my life, providing for 10X productivity. Thank you for this awesome content

  • @Kynatosh
    @Kynatosh 3 роки тому +76

    When creating an HTML file you can type ! and hit tab and you have a default page
    Lorem99 is useful too, 99 being the number of Lorem ipsum words
    alt+click is useful to edit several lines at the same time
    You don't need the auto rename tag extension, it already exists as linked editing in the settings

    • @Endelean
      @Endelean 2 роки тому +1

      Linked editing... Nice.

    • @HypnosisBear
      @HypnosisBear Рік тому +1

      The last tip was very cool! Thank you!!

  • @kalokal5812
    @kalokal5812 3 роки тому +116

    Honestly, the best thing is instead of doing CRTL + P and then typing an > you can just do CRTL + SHIFT + P. Flows much better

    • @kalokal5812
      @kalokal5812 3 роки тому +6

      @Xavier James true, although I like the Crtl shift P better even though it is longer, I guess it's because the keys are where fingers are anyways which makes it more comfortable for me than reaching for the F1 key

    • @charlesm.2604
      @charlesm.2604 3 роки тому

      @@kalokal5812 You either need a smaller keyboard or bigger hands haha
      Personally I use a custom 60% layout and I have an additionnal Razer Tartarus to runs maccros and numpad (its kinda like a streamdeck on steroïd with a built-in joystick). Looks ugly tho.

    • @sacha6757
      @sacha6757 3 роки тому

      And CTRL + SHIFT + O to open symbols search bar directly

    • @musabsayyed8609
      @musabsayyed8609 3 роки тому

      Use VS Code without downloading : ua-cam.com/video/1fitt8XFpws/v-deo.html

  • @adnanamin3666
    @adnanamin3666 3 роки тому +114

    3 things I've been using constantly and I can say it has saved me a lot of mouse click and seconds doing this.
    1. Copy/Cut - without selecting the whole line, just placing the curson on the line and pressing ctrl+c/v
    2. Moving lines up and down with alt+↑ /↓
    3. Using the command palette which I have learned very recently

    • @internetexplorer7880
      @internetexplorer7880 3 роки тому +8

      4. Duplicating lines using Alt+shift + ⬆️/⬇️

    • @Shubhampalzy
      @Shubhampalzy 2 роки тому +5

      Is vs code recommended for a newbie?

    • @internetexplorer7880
      @internetexplorer7880 2 роки тому +4

      @@Shubhampalzy yep definitely 👍, unless you wanna use notepad

    • @zecuse
      @zecuse 2 роки тому +5

      @@Shubhampalzy Having used Notepad++ for about a decade, I've switched to VS Code because my work switched us to laptops last year and revoked our admin privileges. This meant I couldn't install extensions anymore and I finally bit the bullet and installed Code, which doesn't require admin for almost all extensions. I can say that if all you want is a text editor, Code will do everything Notepad++ will do, sometimes simpler as well, and give you access to more extensions.

  • @גיאשחר-ת5כ
    @גיאשחר-ת5כ 3 роки тому +8

    alt + left key : goes backwards to the last file or line you visited
    crtl + shift + f : finds all in your whole project/directory
    F12 : goes to defenition
    crtl + alt + up/down keys : sets cursor on multiple subsequent lines

  • @davemeech
    @davemeech 2 роки тому +7

    VS Code is probably my most favourite piece of software I've ever used. I thought I was a ninja with it but this video cranked up the heat. Awesome watch, I'm almost excited to go back to work after the weekend now.

  • @davidgutmann2083
    @davidgutmann2083 3 роки тому +2

    This video was mind blowing for me. I really didn't know how powerful VSCode is. Thank you really much for this video, you really saved hours of mindless working time for me. Give this guy a medal!

  • @naimreza2581
    @naimreza2581 3 роки тому +227

    Pro tip: instead of pressing crtl+p then ">", you can only press F1 to execute commands.

    • @demidevil666
      @demidevil666 3 роки тому +19

      For Mac users, the corresponding shortcut is [cmd+shift+P]. :)

    • @Lucas-gt8en
      @Lucas-gt8en 3 роки тому +13

      @@demidevil666 for my fellow Ballmer-heads out there: ctrl shift p also works on windows

    • @thedathoudarya
      @thedathoudarya 3 роки тому +2

      Super usefull, thanks a lot 🙏

    • @naimreza2581
      @naimreza2581 3 роки тому +1

      @@thedathoudarya 😊🥰

    • @moxy-bison
      @moxy-bison 3 роки тому +8

      Cntrl shift p if the F1 is not easy to reach all the time. Works on Linux

  • @anti1337speak
    @anti1337speak 3 роки тому +14

    This reminded me there's a few that I should try to incorporate more into my workflow:
    Ctrl + Shift + E to focus on the file sidebar, and use arrow keys to navigate through them.
    When a file is selected, Ctrl + \ to open it in a new split window.
    You can change the focus between split window groups with Ctrl + 1/2, etc.
    Ctrl + Tab, or Alt + 1/2/3 etc. to navigate through currently opened files in the currently focused window.
    Ctrl + W to close the currently opened file in the currently focused window.

  • @brindch8372
    @brindch8372 3 роки тому +92

    Some useful extensions:
    Auto close Tag - Automatically add HTML close tag, even JSX. Might be annoying when declaring types with TS
    Bracket Pair Colorizer - for colorizing match brackets
    Peacock - Change the color of VS code workspace

    • @Fovaxus
      @Fovaxus 2 роки тому +26

      vscode now natively has brackets pair colorization feature

    • @waiitwhaat
      @waiitwhaat 2 роки тому +2

      @@Fovaxus was gonna say the same. about time

  • @actuallyasriel
    @actuallyasriel 2 роки тому +3

    A little detail I appreciate is using the phonetic alphabet when saying shortcuts -- eliminates obscurity from mic pop, speaker issues, just hearing wrong, etc.
    I worked AppleCare for a time and it was one of the most transformative thing I did for customers -- while collecting names or email addresses, they'd struggle to enunciate a letter because phone call quality, and then I'd confirm in phonetic alphabet, and they'd go "oh, oh yeah" and then start doing it for the rest of the call, which would then go much smoother.
    Underrated tech support tactic.

  • @shaunpx1
    @shaunpx1 2 роки тому +5

    My favorite productivity tip aside from making my own custom keyboard short cuts is using multiple cursors.
    you hold down the Alt key and click somewhere, you’ll put down a new cursor. Each cursor will accept the same key commands at the same time-a handy way to enter boilerplate text on multiple lines at once, for example.
    Another way to add cursors is to hold Ctrl+Alt and press the up or down arrow keys. Doing so will insert cursors in the lines above or below the current one-useful for working in columns of text.
    Another slick move: You can insert a cursor at every instance of a selected piece of text by hitting Ctrl-Shift-L. You can also control the selection size of multiple cursors by pressing Shift-Alt and the left or right arrow.
    Cheers!

  • @adebayoomolumo1938
    @adebayoomolumo1938 3 роки тому +30

    One of the sweetest things about vscode is the fluidity, I am big fan of Atom editor and sometimes I prefer using it(it's an attachment thing). In vscode, you can easily import your settings by comparing settings.json files and changing values.
    eg. I use ctrl+⬆ instead of alt+⬆ to move lines of code up and down. So there, as requested @Fireship

  • @favna
    @favna 3 роки тому +9

    What makes me feel most powerful in VSCode is
    1. Search your file (using regex if you need a pattern)
    2. Focus the file itself
    3. Press Control + Shift + L to select all occurrences of your search with multi-cursor
    4. Make edits
    This way you can bulk edit things in a file super quickly.

    • @bob_bobsen
      @bob_bobsen 2 роки тому

      Commenting to bookmark

  • @jawadsrour8490
    @jawadsrour8490 3 роки тому +31

    Number 1 Developer! You’re an inspiration to many of us! Keep it up!

    • @musabsayyed8609
      @musabsayyed8609 3 роки тому

      Use VS Code without downloading : ua-cam.com/video/1fitt8XFpws/v-deo.html

  • @sourandbitter3062
    @sourandbitter3062 2 роки тому +3

    Other shortcuts I use everyday as a front-end developer:
    Shift + Alt + f12 to quickly search references to a selected type (if using Typescript), variable or function throughout the whole project.
    Ctrl + Shift + f to search selected text globally. Also learn when to search for whole words and/or with captions.
    Ctrl + Shift + t to reopen last closed files/tabs, just like in a browser. Ctrl + w to close the current file/tab.
    Alt + horizontal arrows to go back or forward to the last cursor positions.

  • @CalvinJKu
    @CalvinJKu Рік тому

    5 things I find EXTREMELY useful outta this video:
    1. alt ↑ / ↓ - move line around
    2. shift + alt ↑ / ↓ - move line around + copy
    3. ctrl ← / → - jump to next symbol
    4. Name your terminal sessions
    5. Paste JSON as Code
    I used to use Sublime for many years and started using VS Code because I just realized it was the right thing to do. LOL
    Some of my own tips that I used to think it was common sense but then realized not so many developers are using. Use emacs key combinations for navigation in VS Code. Saves me so much time!

  • @Centomila
    @Centomila 3 роки тому +65

    It's the first time i already know everything on a Fireship video. For once i don't suffer impostor syndrome :D

    • @SomeFreakingCactus
      @SomeFreakingCactus 3 роки тому

      The sign of a knowledgeable person is the fact they’re still learning things.

  • @sashikanawarathne8465
    @sashikanawarathne8465 3 роки тому +16

    One of my personal preferences is overriding the default ctrl+- and ctrl+= bindings which will change editor size to code folding and unfolding. You can do this by setting the shortcuts in preferences -> keyboard shortcuts. This is very handy in maintaining lengthy files

  • @kevinbatdorf
    @kevinbatdorf 3 роки тому +24

    Pro tip 2, remove the tabs and icon sidebar and navigate files and panels with keyboard shortcuts. Give yourself more visual space. Also, increase line heights and get a pretty font.

    • @hemantvetal
      @hemantvetal 3 роки тому

      yes, just find right font size, theme, font,font style and clear the clutter

    • @TheSaintsVEVO
      @TheSaintsVEVO 3 роки тому

      @@hemantvetal any recommendations?

    • @__redacted__
      @__redacted__ 3 роки тому

      Material theme and go borderless. Why have a border and padding when enough padding can accomplish both.

    • @rahulsriram6295
      @rahulsriram6295 3 роки тому +5

      Ctrl+K, Z....this is the Zen Mode. It's beautiful

    • @nobodydoe
      @nobodydoe 3 роки тому

      What do you mean by "remove tabs"? Typing a filename every time you want to switch to a tab? It seems to me not efficient at all.

  • @neonsilver1936
    @neonsilver1936 2 роки тому +2

    I keep watching this and adding pieces of it to my coding practices in VSCode. It's a game changer, for real, thank you!!

  • @narex45635
    @narex45635 2 роки тому +3

    A couple efficient ways of returning from multiple cursors to one:
    'esc' will remove all but one cursor and 'ctrl + u' will undo the last cursor action one at a time.
    Both are good muscle memories to develop as you begin using tricks like the 'ctrl + d' spam demonstrated in the video.

  • @napapt
    @napapt 3 роки тому +15

    One good way to keep your files organized is by pinning tabs by "right click" -> "pin" (Ctrl+K Shift+Enter), pinned tabs have a number of useful features to help mark files that are important to you.

    • @mustafavurkac1650
      @mustafavurkac1650 Рік тому

      One thing to add. Close all editors command won't close pinned editors. So thats also good if you are searching many files and when you finish you close all unnecessary editors and keep your main.

  • @silver7297
    @silver7297 3 роки тому +5

    This is hands down the best VS Code video in existence. 👏

  • @Gregorius421
    @Gregorius421 3 роки тому +224

    "There are only two hard things in CS: cache invalidation, naming things and off-by-one errors."
    missed opportunity...

    • @nourgaser6838
      @nourgaser6838 3 роки тому +9

      Not off-by-one if you're counting from 0. ;)

    • @EagerEggplant
      @EagerEggplant 3 роки тому +19

      @@nourgaser6838 still 3 things, doesn't matter at what number you start.

    • @dontbetoxic4387
      @dontbetoxic4387 3 роки тому

      @@nourgaser6838 what do you mean

    • @SomeFreakingCactus
      @SomeFreakingCactus 3 роки тому +8

      @@dontbetoxic4387 He’s making a joke about how computers count starting at 0, but 3 things are still 3 things.

    • @dontbetoxic4387
      @dontbetoxic4387 3 роки тому

      @@SomeFreakingCactus no you are wrong. It doesnt matter where you Start to count, the amount is always the same

  • @maxijonson
    @maxijonson 3 роки тому +1

    The CTRL+D is probably my favorite "pro user" shortcut, it saves me sooo much time

  • @jessepasley5429
    @jessepasley5429 Рік тому +9

    My favorite VScode trick is to not open VScode and open Steam instead, choosing a game to play, and playing a game instead of working. Definitely suits my programming style.

  • @dango_3016
    @dango_3016 3 роки тому +7

    I've been waiting for this video, despite neither of us knowing I did

  • @maacpiash
    @maacpiash 3 роки тому +7

    Selectively add changes to the Git staging, or revert them:
    If you want to add some particular changes made in a file to make a commit and keep the rest of the changes made in the same file for a later commit,
    - Click on the green spot between the changed line and the line number
    - Click on the '+' button to add the change to the staging, or the "undo" button to revert that change.
    This helps me keep my Git commits clean: each commit represents one unit of change.

    • @AkinBelieve
      @AkinBelieve Рік тому

      I do this also and atomic commit everything - it’s great.
      I gave it a custom shortcut of ‘ctrl + S + T’ I.e. stage. You can then just place your cursor or highlight blocks of code and stage only that.
      I wouldn’t recommend ‘command + s + t’ because it affects the conventional save command in an unexpected way.

  • @robertviragh6527
    @robertviragh6527 11 місяців тому

    This video is lifechanging.
    I use VSCode but didn't know these tips (example, alt up and down to move lines, ctrl x to cut a line like dd in vim and then paste it somewhere else).
    As a test, I clocked how long it takes me to simply either stay on my keyboard and type 1-20 without even rushing it (I typed the characters one at a time with a short pause, I didn't just run my finger across the top row), and it took 9 seconds while being slow and deliberate.
    Then I tried it again but after each one I lifted my finger, reached for the mouse, clicked another part of the screen, clicked back to where I was writing, moved my hand back to the keyboard from the mouse (just touching my right hand anywhere on the keyboard, with my left hand already ready to type the next number) and going back and forth to the mouse like this for a count 1-20 took this long:
    71 seconds.
    That means staying on the keyboard is literally 8x faster even while staying slow and deliberate.
    8x speed improvement!!
    that section of the video along with the other tips is literally lifechanging as a developer and helps explain how come Fireship is a God tier developer (for example for another video built an application in ten different frameworks quickly, which involves debugging JavaScript ten diffferent times, for ten different frameworks each with their own quirks).
    I will study and practice the tips in this video carefully. If anyone else has such God tier productivity tips for VS Code feel free to reply to this comment (even once it is a couple of years old), as I expect to stay on VS Code for my IDE for a very long time!
    Thank you Fireship for sharing these amazing tips.

  • @arwahsapi
    @arwahsapi 3 роки тому +1

    I've switched from Visual Studio to VS Code for most my .NET Core projects. VS Code is the most scalable editor Microsoft has ever built

  • @thehibbi
    @thehibbi 3 роки тому +85

    Best tip: Combine the greatness of vscode with vim. Takes some time to get used to but is super efficient and fun.
    I also liked how you sneaked the "i use arch btw" meme into the tweet ^^

    • @rice8864
      @rice8864 3 роки тому +2

      i cant even wrap my head around how to paste so no thx

    • @TheEroticDonkey
      @TheEroticDonkey 3 роки тому

      @@rice8864 that's not the spirit

    • @rice8864
      @rice8864 3 роки тому

      @@TheEroticDonkey lol

    • @rice8864
      @rice8864 3 роки тому +6

      @@TheEroticDonkey i have no spirit
      im dead

  • @Hydhen
    @Hydhen 3 роки тому +6

    To rename symbol you can simply use the F2 button from the keyboard on the symbol you want to rename in the entire project
    F2 is used in the whole Windows ecosystem so that's a nice thing they kept it :)
    Awesome video, learn tons of things I'll add to my setup thanks for sharing !

  • @alexf3946
    @alexf3946 3 роки тому +6

    The thing that I love the most is the colorized parenthesis, its an add on, and there are many, but for knowing what is what and where things start and end are amazing. It works for css, js, c, c++, etc. It also works with []{} and anything that makes you start and end things like that.

  • @salmankabirshouvo
    @salmankabirshouvo 3 роки тому +3

    There is also a key shortcut " Ctl + shift + F " and search whatever you want through your entire project.
    I like that shortcut so much. Because it helps me to search functions I forgot where I saved it.

  • @josephgutierrez8430
    @josephgutierrez8430 3 роки тому +16

    When working with poorly formatted or indented code, one of my favorites is ctrl +k, ctrl+f . This command formats and indents all the code selected. Its a life saver for HTML with many nested tags

    • @virus2028
      @virus2028 3 роки тому +5

      You could just turn on auto format on save in your vs code settings

    • @parkersmule
      @parkersmule 2 роки тому

      commenting for later

  • @khangnguyen469
    @khangnguyen469 3 роки тому +4

    My favorite feature I found out lately is Emmet Abbreviation. Type div.container#App and then press Tab will expand the expression to
    with the cursor goes in between the opening and closing tag. It work correctly with JSX too (className vs class).

  • @omegaomar29
    @omegaomar29 3 роки тому +6

    Amazing, you are helping so much a lot of developers around the globe

  • @codefrite
    @codefrite 2 роки тому +2

    I watched it many times along the year and I still learn new things ... Thx bro !

  • @ashadedblobfish
    @ashadedblobfish 11 місяців тому

    Alt+Click and Ctrl+Shift+Up/Down are probably my favourite vscode shortcuts. So useful for efficiently semicolonising multiple lines at once

  • @oumardicko5593
    @oumardicko5593 3 роки тому +4

    I use vscode with vim (got addicted by the combination of the two)..ctrl+p to open files, hjkl for navigation, dd to delete line, dw to delete a variable and rewrite the new name. It helps a lot

  • @sameer18213
    @sameer18213 3 роки тому +6

    Love every video, a simple but useful feature is on .md(markdown) files you can hit cmd+shift+v to preview the formatted file

  • @cakemnstr42
    @cakemnstr42 3 роки тому +6

    Highly recommend Bracket Pair Colorizer 2 and Indented Block Highlighting. Helps me a great deal when dealing with code nesting. Especially useful in Flutter.
    I also like Code Spell Checker, can handle camel case etc. Just prevents typos which can lead to headbanging bugs later if something is named slightly differently then you thought it was. Also supports a user dictionary and can fix it for you so you can add all your domain specific stuff and never mistype it again

  • @CorryTerblanche
    @CorryTerblanche 3 роки тому

    Am I the only one that presses the like button 2 seconds into any of the videos this man releases? Good job your videos never fail to impress!

  • @RobertMcGovernTarasis
    @RobertMcGovernTarasis 2 роки тому +1

    For once a VSCode video that genuinely helpful. Cheers! Wasn’t aware of a bunch of the bits you showed (like the @ symbol trick)

  • @AdisDurakovic
    @AdisDurakovic 3 роки тому +5

    My prefered shortcuts:
    Ctrl+Shift+C: Toggle line comments
    Ctrl+D: Duplicate line / selected lines
    Ctrl+Shift+D: Delete line / selected lines

    • @mormatus
      @mormatus 2 роки тому

      These aren't standard, are they?

    • @AdisDurakovic
      @AdisDurakovic 2 роки тому

      @@mormatus nope, but I got used to them a decade ago and whenever I switch IDEs, I set them up like that

  • @AttilaButurla
    @AttilaButurla 3 роки тому +10

    Great stuff, I'm going to rewatch this several times!

  • @jzerovnik
    @jzerovnik 6 місяців тому

    when highlighting a line rather than using shift arrow keys when you need to highlight the whole line hit shift end to highlight everything right of the cursor and shift home for everything left of the cursor. ctrl + shift + end will highlight everything to the right of and below the cursor and ctrl + shift + home with highlight everything to the left of and above the cursor. i use these all the time and they are awesome!

  • @yosrimhamdi1435
    @yosrimhamdi1435 3 роки тому

    I know 95% of these shortcuts, but there is always something new to learn on this channel.

  • @SzaboB33
    @SzaboB33 3 роки тому +30

    I hit like 3 times! This video is so useful! :)

    • @nielfollero5
      @nielfollero5 3 роки тому +1

      You should have hit it 1001 times

  • @iamunhoz
    @iamunhoz 3 роки тому +11

    If you have multiple windows with a different project in each one, things can get confusing during alt-tabs. It's possible to set different themes to each project, so the different colors will help not getting confused. To set themes to a specific project, create a .vscode folder in your root e set configurations there in json format.

    • @mustafavurkac1650
      @mustafavurkac1650 Рік тому

      I'm on Windows OS. I use 7+ Taskbar Tweaker which lets me change order of vs code instances (or any program). I put vs code on taskbard and press Win + $taskbarIndex multiple times to switch between instances.
      At the end I just memorize the index of each project and switch between them quickly.

  • @patterntrader690
    @patterntrader690 3 роки тому +7

    Amazing tips, that @ symbol to break down files is awesome

  • @omarabdulla9628
    @omarabdulla9628 3 роки тому

    I’ve been using VS code for close to 4 years now and I didn’t know about half of these. Thanks for the great video!

  • @zcryptxzz
    @zcryptxzz 3 роки тому +1

    This youtube channel just saved my life.

  • @nicolasdamours6817
    @nicolasdamours6817 3 роки тому +11

    My favorite extension, by far, is the CodeTogether extension. It allows multiple developers to work together on the same code, Google doc style. It's a lifesaver when we want to share and/or explain code, since everyone have it's own editor.

    • @whoman7930
      @whoman7930 3 роки тому +1

      how is it different than live share?

    • @nicolasdamours6817
      @nicolasdamours6817 3 роки тому +1

      @@whoman7930 Having the actual code, rather than a live stream, allows you to naviguate between files, edit, highlight, follow reference and all that good stuff. It make pair programming way easier.

  • @figloalds
    @figloalds 2 роки тому +4

    With multiple carrets, you can press home/end to go to the start/end of all lines, very useful for writing around multiple different things with different lengths

  • @devonchia5976
    @devonchia5976 2 роки тому

    1. Ctrl + click on function to open up preview of said preview function being used in current or other files. Double click on the preview window to bring focus to the specific page.
    2. Ctrl + Shift + F to search through all the files. There's option to exclude specific directory path to shorten results.
    3. Ctrl + D to remove selected line on any position
    4. Alt + Z to wrap text for easy reading
    5. Ctrl + C on target line without highlighting entire line, it will still copy whole line

  • @AkshayKumar-kz6zh
    @AkshayKumar-kz6zh 3 роки тому +1

    Currently using Remote containers in project. My teammates 💙 it.
    Btw your content quality is 💯. Never have I enjoyed a Dev channel so much!!

  • @tomasdrozdik7856
    @tomasdrozdik7856 3 роки тому +17

    tip: you can redirect the output of any terminal command to the vscode: `date | code -`
    it's really useful for commands with long output

  • @mb59621
    @mb59621 2 роки тому +16

    I like how you can press alt and prepare multiple cursors .

    • @goclbert
      @goclbert Рік тому +1

      I feel like I'm loading a revolver

  • @ashish_prajapati_tr
    @ashish_prajapati_tr 3 роки тому +6

    1. tip for renaming anything in all of our code there's an shortcut just press F2 key.
    and just type new name of your thing.
    2. to delete a whole line without selecting just press SHIFT + DELETE
    3. to delete a word in forward direction press Ctrl + Delete.This will delete the word after the cursor.
    4. to delete words in backward direction then just press Ctrl + Backspace to delete it.
    5. press F1 or fn + F1 to access command palllete
    enjoy.

  • @codeforweb7602
    @codeforweb7602 3 роки тому +1

    Awesome rundown of VS Code features in less than 12 minutes. Thank you.

  • @yohanfye
    @yohanfye 3 роки тому

    You just helped me prevent my future self from going back in time and disrupting the time-space continuum to use these features.

  • @santoshthedeveloper
    @santoshthedeveloper 3 роки тому +4

    If you cannot find a closing div tag in vs code you can use the "balance outward" command in the command palette that will select all the content inside the opening and closing tag including tags. Note that your cursor and opening tag should be on the same line. You can create a seperate keyboard binding for this command for ease of use.

  • @KetanLambat
    @KetanLambat 3 роки тому +4

    My fav vs code items.
    Code Auto formatters -> helps to write clean code.
    Bracket Pair Colorizer -> JS was never so easy
    Everything has a UI and a JSON file (settings, shortcuts, etc)

    • @martinlortie
      @martinlortie 2 роки тому

      I wish they had one for snippets, I hate modifying all those lines in these arrays...

  • @varunagarwal1756
    @varunagarwal1756 3 роки тому +5

    4:40 Use F2 instead of installing an extra extension.
    Even works for all the languages like React,JS and TS

    • @do0nv
      @do0nv 2 роки тому +1

      You can even use it on regular variables too!

  • @shifteditz06
    @shifteditz06 5 місяців тому +1

    1. use Ctrl + H to replace any word
    2. Ctrl + J to open/close terminal
    3. hover on link and then Ctrl + click to open the link
    4. Alt(hold) + click for multiple cursors

  • @nubnoobbo
    @nubnoobbo 2 місяці тому +2

    vscode is probably one of the best microsoft products

  • @furinick
    @furinick 2 роки тому +7

    you know this man is serious when he is using the NATO phonetic alphabet

  • @FirstLast-gk6lg
    @FirstLast-gk6lg 3 роки тому +5

    This was good stuff thank you. Also if you are working within a very large file there is a command to collapse all areas of code, and this will save huge time on those 5-10k line files(yes I know they should never get that big but hey, we all inherit tech debt)

  • @darkfllame
    @darkfllame Рік тому +1

    The thing with vscode it that, without any extensions it's praticly useless, but with them it's a masterpiece, it's flexible and has a lot of extensions that mean if you want something to code, you have a high chance that someone else wanted it and so he made an extensions for that.

  • @ProphytDA
    @ProphytDA 2 роки тому

    Man visual studio code is the best and definitely a code/programming app it’s like you can design your own business

  • @abdelfattahhilmi5213
    @abdelfattahhilmi5213 3 роки тому +12

    fireshipe video drops: me likes before watching it.

    • @dalmeow
      @dalmeow 3 роки тому +2

      for some weird reason i read t as 'freshripe' at first glance XD

  • @mysterOrel7924
    @mysterOrel7924 3 роки тому +9

    When you watch the video and already know 90% of it ! I'm on the good path

  • @tmhugin8312
    @tmhugin8312 3 роки тому +6

    bro reached puberty at exactly 5:52 i'm so proud

  • @krapalicious
    @krapalicious Рік тому +1

    My favorite keyboard combo is CTRL+SHIFT+L, which is the select all instances of the current selection. It's super helpful for creating a long SQL insert statement, for example.

  • @Robin_Goodfellow
    @Robin_Goodfellow 2 роки тому

    VSCode's remote SSH feature has saved my butt so hard in the past. There was a project I was working on that only ran on our server (because I designed it all wrong, I'll admit), which only had command line access. With VS Code, I had my full text editor and VCS manager on a GUI-less server. So much pain avoided.

  • @georgehelyar
    @georgehelyar 3 роки тому +4

    The main issue I've had with VS Code is that the default shortcuts are different on different operating systems. For example alt+shift+f to format the document on Windows but ctrl+shift+i to format the document on Linux. These can be changed, it's just annoying if you use multiple operating systems.
    Also it's just too slow to open for use as a git editor (e.g. for interactive rebases).
    Other than that, I like it in general.

  • @DIGGERfromAR
    @DIGGERfromAR 2 роки тому +5

    Several standard shortcuts, many Visual Studio shortcuts, a few VS Code specific shortcuts, and some extensions.

  • @ganeshdeshmukh8020
    @ganeshdeshmukh8020 3 роки тому +5

    oh man, this is gem, vs-code really gives me adrenaline in my brain, so nice to have this Editor

  • @RobinHood70
    @RobinHood70 2 роки тому +1

    To open active projects quickly, I added a new toolbar to the Windows task bar and put shortcuts to my workspace files there. That means active projects are two clicks away without losing too much taskbar real estate. I then cycle projects in and out of there as needed, based on whatever I'm currently working on.

  • @saugstauberr
    @saugstauberr 3 роки тому +1

    The best design extension for VSCode is Vibrancy. In my opinion it's the cleanest and best transparent theme you can find for VSCode. I can only recommend it to everyone.

  • @basdfgwe
    @basdfgwe 3 роки тому +5

    Sometimes I need to find where all the places I'm calling a function, the easiest way I have to do this is to add a character in the name. It highlights all the breakages as problems.

    • @mormatus
      @mormatus 2 роки тому

      Shift + F12 does it better, also across all project files.

  • @edwardserfontein4126
    @edwardserfontein4126 2 роки тому +3

    Great video! Suggestion: use radio-telephony (papa, foxtrot,etc) only if there's a likelihood for confusion. E.g, avoiding spelling errors that have serious consequences. Using RT can even cause more confusion in some cases.

  • @RedStone576
    @RedStone576 3 роки тому +57

    expectation:
    reality: "how to center div class"

    • @gcxs
      @gcxs 3 роки тому +9

      expectation:
      reality: stackoverflow

    • @rahulsriram6295
      @rahulsriram6295 3 роки тому +4

      Answer : a flex with a single child with justify center and align items center

    • @nielfollero5
      @nielfollero5 3 роки тому

      @@rahulsriram6295 It will just horizontally center it even with the alignItems:center, how do you center it in the whole screen?

    • @rahulsriram6295
      @rahulsriram6295 3 роки тому +3

      @@nielfollero5 also add height: 100vh

    • @LarsRyeJeppesen
      @LarsRyeJeppesen 3 роки тому

      Css grid

  • @cyberducc
    @cyberducc 2 роки тому

    Remote SSH is a lifesaver! I can drag and drop files and have them uploaded instantly and edit files with full vscode support. This is awesome :D

  • @andythedishwasher1117
    @andythedishwasher1117 2 роки тому

    Some of this is easier to do in other editors like Android Studio, I've noticed, but VS Code is just too damn integrated into Unity for me to pass it up. This helps me import a lot of the tricks I've used on other editors. Thanks dude.