VSCode Keyboard Shortcuts For Productivity

Sdílet
Vložit

Komentáře • 319

  • @vincentandrieu5429
    @vincentandrieu5429 Před 4 lety +231

    2 shortcuts that I use at least 10 times a day:
    - Cmd+Shift+L selects all occurrences of the highlighted text, very handy to rename a method, a variable or refactor a duplicated bit of code at all places at once
    - Cmd+Shift+F to search some text in the whole workspace

    • @MarkEdwardTan
      @MarkEdwardTan Před 4 lety

      Thanks. Both are life savers :)

    • @tyuiogtyuio8539
      @tyuiogtyuio8539 Před 4 lety +12

      On Windows: Ctrl+Shift+L and Ctrl+F respectively

    • @AjayKumar-ts5jd
      @AjayKumar-ts5jd Před 4 lety

      where can i refer for shortcuts like core css codes directly. i am beginer !

    • @minh_tran
      @minh_tran Před 4 lety +3

      ​@Jonathan Agree. I use f2 frequently and it'll change the name in all files that reference that variable. Super handy

    • @vincentandrieu5429
      @vincentandrieu5429 Před 3 lety +1

      @Jonathan agreed, but I work a lot on data files (such as .csv or crappy .txt files) and whenever I want to change some text to another in the whole file, it's useful to use Ctrl-Shift-L 🙂

  • @vishnyo
    @vishnyo Před 4 lety +157

    Select variable and hit F2 to rename the variable in every places where it was used

    • @gvcallen
      @gvcallen Před 4 lety +2

      @@c1dk1n I'm using C++ and was just messing around with it - had a function named "func" and wanted to rename it with F2. It was wanting to also name symbols called "func" in the actual files inside my compiler. Quickly discarded that feature and decided to stick with normal find and replace haha. But for other interpreted languages it might be okay - just make sure you have a look at the refactor window quickly first

    • @tvguideondemand
      @tvguideondemand Před 4 lety +2

      @@c1dk1n Never. Not even once. I use it every day.

    • @anroiduser1222
      @anroiduser1222 Před 3 lety

      Wow that is so powerful

  • @khgriffi
    @khgriffi Před 4 lety +60

    1) Control +J will merge lines. I find it very helpful when editing HTML and even JavaScript sometimes.
    2) there’s a shortcut to wrap HTML in another pair of HTML tags. you have to create a shortcut for it though. Search ‘Emmet: wrap with abbreviation’
    3) you can easily wrap a set of characters in () or {} or ‘’ or “” by highlighting the text and pressing the left version of the wrapper character. So if you highlight the word hello, then press (, the result will be (hello)

    • @khgriffi
      @khgriffi Před 4 lety +3

      Roshan Jafri I’m on Mac. Cmd + J opens the command line for me. Control + J merges lines. Search “Emmet: merge lines” - you might have to manual set a key binding for it if you’re on pc.

    • @tvguideondemand
      @tvguideondemand Před 4 lety

      Oh I love these HTML ones! Update tag is really useful also.

    • @kxnyshk
      @kxnyshk Před 3 lety

      omg idk but *Ctrl+L* opens the terminal win below the ide for me n vsCode for some reasons.. 🤷🏾‍♀️

  • @szitastamas
    @szitastamas Před 4 lety +4

    I started using most of these shortcuts a while ago and the difference is really noticable, not only in speed but also the flow of coding feels much more natural and smooth :) thank you for the summary!

  • @scottdunbar5155
    @scottdunbar5155 Před 3 lety +4

    Hi Brad, I don't comment on videos much but I will here for a couple of reasons. First of all this was exactly what I was looking for when I did my search, I am so glad I chose your video. Second, I have watched a lot of your content and you have one of the best youtube channels for coders out there, if not hands down THE best. Last but most certainly not least, our life stories/experiences/hardships (as far as you've mentioned, anyway) have a creepy lot in common and you are very inspirational to me so I just wanted to thank you so, so, so very much. You might know, and I hope you do, that just showing people like me what is possible means so much more than I can say in a short comment. You have made a huge difference and I just thought you should know that. THANK YOU!!!
    -JD

  • @Parthsean
    @Parthsean Před 4 lety +3

    Thank you so much for the video, I was looking to learn VS Code too. As a dev a lot of the time we do not focus on learning our tools, learning our IDEs. Learning all these shortcuts has really helped me to be productive as a Software Eng. This was also one of the tips Tech lead has mentioned in his video.

  • @ivanskubko9177
    @ivanskubko9177 Před 4 lety +51

    also try to hit ctrl+D while cursor stays in the middle of the word - it will highlight the whole word
    (cmd+D for Mac)

    • @voidmind
      @voidmind Před 4 lety +8

      Not only that, but once a word is selected that way, every time you hit Ctrl+D after that will select the next instance of that word in your file, which you can then do multi-line editing on or just paste over the selections.

    • @zephyrrmahesh3109
      @zephyrrmahesh3109 Před 4 lety +3

      @@voidmind and if you want to select all instances of that word, Ctrl+F2 will do.

  • @TonoNamnum
    @TonoNamnum Před 4 lety +4

    Alt+arrowUp or Alt+arrowDown will shift the current line of code up or down. This is better than cutting and pasting. If you hold shift down with the same command you will place cursor down or up in multiple lines.

    • @hvitserklothbro8298
      @hvitserklothbro8298 Před 2 lety

      how to move line of code to the right and to the left? i spend lot of time to move my line of code one by one

    • @mateusz2099
      @mateusz2099 Před rokem

      @@hvitserklothbro8298 you can select lines and move them right with Tab and left with Shift+Tab

  • @bawad
    @bawad Před 4 lety +3

    Holy crap Go to Entity is super dope, I'm stealing that one ;)
    One my favorite shortcuts is Go to Definition: Cmd+Click on a function/variable and it will take you to where it was created. It's great for navigating.

    • @bibibobs
      @bibibobs Před 4 lety +1

      Or have your cursor on the instance and press F12

  • @Lambdaphile
    @Lambdaphile Před 4 lety +2

    Move by word should be Alt + Left/Right on Mac.
    My favourite is go back/forward with Ctrl + -/Ctrl + Shift + -.
    "Go to Entity" was one which I was not aware of and which I'm definitely going to use! Thanks :)

  • @chineduknight6426
    @chineduknight6426 Před 4 lety +7

    Brad is a shortcut expert, the React course changed my life for good, in the end it's the little things that matters the most.
    Thanks 😊

  • @dancehalllyrics1303
    @dancehalllyrics1303 Před 4 lety +3

    Be aware: Some of the standard settings of VSCode's shortcuts may depend on where in the world you are. Example given, I live in Denmark, so the standard keyboard shortcut for opening up the terminal for is by pressing CTRL + æ (a Danish letter).
    And then a little shortcut I found by accident but turns out being helpful. Instead of pressing CTRL + D to highlight the next coming appearance of a word, class or anything that appears multiple times on your screen, try pressing CTRL + SHIFT + L. This shortcuts highlight every single appearance of that word, class or anything that appears multiple times on your screen. And what's even more cool about it is that you do not have to go to the top to find the first one. You can simply highlight it wherever you find it first, press the shortcut buttons and you're good to go.

  • @kirillvoloshin2065
    @kirillvoloshin2065 Před 4 lety

    what a coincidence - I have written down some shortcuts on Monday!
    F2 to rename the variable in a whole document is nuts!
    ALT+L ALT+O to start a live server (you need to install Live server extension before).
    Also installing ES7 snippets to quickly create promises, forEach etc!
    Alt+Down/Up to move lines.
    Ctrl+Shift+K to delete a line.
    Alt+Shift+Down/Up to duplicate a line.
    Ctrl+Enter to add a line below.
    Ctrl+Shift+Enter to add a line above.

  • @LardBucket_
    @LardBucket_ Před 4 lety +1

    If you're the type of user that wants to minimize the time you spend moving your hand to and from the mouse, I recommend the VSCode extension VsVim. It emulates basic Vim operations, which have a learning curve for sure, but are super efficient once you get them down. You can also configure whether VSCode or Vim should handle each keybinding so you get the best of both worlds.

  • @jijojoseph2041
    @jijojoseph2041 Před 4 lety +44

    Type ctrl + shift + p
    And type keyboard shortcuts. This would open a pdf with all shortcuts

  • @tannercampbell
    @tannercampbell Před 4 lety +1

    Thanks Brad this is nice!
    Not sure if helpful to anyone else but you can map your own shortcut to collapse all folders in explorer. I find this to be one of the most used shortcuts for myself, especially when working with large frameworks and libraries like Laravel and Angular.

  • @eddiejaoude
    @eddiejaoude Před 4 lety +2

    Thanks for the tips 👍. CMD + j, to open the terminal panel at the bottom also

  • @drum-computer
    @drum-computer Před 4 lety +2

    Nice fact that you can use command+shift+t the same way in chrome browser too. Also I love to navigate through tabs in vscode with cmd+page up/page down it simply selects next/prev tab -also works the same in chrome :)

  • @maria-lm8ze
    @maria-lm8ze Před 4 lety +1

    i like to use the multiple cursor editing, it's like the one you showed but without having to click, you just ctrl + shift + up/down.
    But it needs to add "editor.multiCursorModifier": "ctrlCmd" to the settings

  • @daniel71626
    @daniel71626 Před 4 lety +2

    I gotta wach this when i have time. Im using vscode almost every day, and it is good to know more shortcuts.

  • @kartikeyjangir6003
    @kartikeyjangir6003 Před 2 lety

    Man you added meaning in my life by telling about ctrl+enter and CTRL+Tab 🔥🔥🔥🔥 thank alot

  • @LeoPacheco87
    @LeoPacheco87 Před 4 lety +5

    Great video! I usually use alt for tab travel too, u can go alt+1, alt+2, etc for quicker tab change!

  • @donniewhite6120
    @donniewhite6120 Před 2 lety

    This IMMEDIATELY made my life easier. I just DL'd the PDF and it's on my desktop

  • @ablanchi
    @ablanchi Před 4 lety +2

    You should try the Vim plugin for VScode.
    You're basically already there with all these shortcuts, but using a modal editor allows for sensical shortcuts.
    y for copy, p for paste, w to move word by word.

  • @Pulpdood
    @Pulpdood Před 4 lety

    Cmd+D has helped me a lot when refactoring code by selecting each instance of a word and I can change all instances at once

  • @arezkimezrag4742
    @arezkimezrag4742 Před 4 lety

    i used sublime text for years before and now i'm using VSC with Sublime text Keymap and Settings importer extension . It helps me a lot. Thanks Brad great video

  • @somnvm37
    @somnvm37 Před 3 lety

    1)ctrl+w works in browsers too. Also, ctrl+t makes a new tab
    2)ctrl+shift+t also works in browser
    3)if you want to switch between windows, use alt-tab (works in win7, not sure about other systems)
    4)if you want to refresh page with deleting all cashe, use ctrl+shift+r
    5)alt+z use it all the time, if you want to wrap text
    6)ctrl+shift+n makes folder (works in win7, not sure about other systems)
    7)F11 opens any window at fullscreen mode. F opens youtube video at fullscreen
    8)alt-F4 - closes window
    9)Not a shortcut, but you can press win button, then write "code" (or any other word from Visual Studio Code) and press enter. It will open vscode. This is a quick way to open any programm

  • @dwaynegenx72
    @dwaynegenx72 Před 4 lety +2

    Brad is a mind reader! I was just looking for a tutorial like this the other day.

  • @kjn5991
    @kjn5991 Před 4 lety +3

    There's just one thing, on Windows (and probably Mac too) there are different layouts in different countries.
    for example, on my keyboard I can't do Ctrl+` to toggle terminal because the " ` " is behind Shift+Alt Gr+´ combination.
    On my Finnish multilingual layout I had to configure the settings to toggle terminal with Ctrl+ö

  • @abdullahseba4375
    @abdullahseba4375 Před 4 lety +3

    These are great! F2 is also useful for renaming variables.

  • @LukeLoves
    @LukeLoves Před 3 lety

    One I have recently found and started using every now and then, To retract all functions = Ctrl + K + 0 and to open them all back up = Ctrl + K + J

  • @igorskyflyer
    @igorskyflyer Před 4 lety +44

    Press F1 for even easier Command Palette invocation. 😉

  • @DevInsideYou
    @DevInsideYou Před 4 lety +7

    Ctrl+K, Enter promotes a "preview" to a "tab".

  • @amkj96
    @amkj96 Před 4 lety +1

    On Windows, you can scroll up or down in a file using Ctrl + Arrow key Up/Down 😀

  • @mayank_upadhyay_19
    @mayank_upadhyay_19 Před 4 lety +6

    Today my friends, I have taken the responsibility and decided to not play with mouse anymore.
    Thankyou Brad ♥️

  • @tahwnikcufos
    @tahwnikcufos Před 4 lety

    I don't even own a Mac or memorize a ton of shortcuts, but I'll watch a Traversy video, while I program my Stream Deck for VS Code ;-)

  • @erik....
    @erik.... Před 4 lety

    Alt+Shift+right/left was new to me.. Very nice!

  • @TheDvand7
    @TheDvand7 Před 4 lety +6

    Love the videos! Could you do a tutorial on hosting a node application on web server? Either way, thank you!

    • @TraversyMedia
      @TraversyMedia  Před 4 lety +4

      Daniel van den Akker i have one showing you how to deploy to digital ocean with ssl. Look back about a month ago. I have one with heroku as well

  • @abnerssouza
    @abnerssouza Před 3 lety

    Command + D or Control + D to actually select an entire word where the cursor is. Instead of doing Cmd + Shift + left or right arrow. :) Amazing Video

  • @2242824
    @2242824 Před 4 lety +2

    Brad, in which video do you talk about the reason you've switched from Windows to MacOS?

  • @prabhakarmishra2182
    @prabhakarmishra2182 Před 2 lety

    Brad I am not bragging but you are a gift from god

  • @Speedy4you10
    @Speedy4you10 Před 4 lety

    @Traversy Media. Thank your for sharing us all your tutorials. They have been really helpful to me. You offer the best html, css and Javascript videos out there.

  • @aloudia
    @aloudia Před 4 lety +3

    Thanks Brad, made my weekend. A very useful content.

  • @MakeAppswithDanny
    @MakeAppswithDanny Před 4 lety

    Thanks Brad! I use Sublime, but you just made me realise I could control the sidebar with the keyboard for the first time!
    11:34 - R.E. the comment shortcuts - it's worth mentioning that you can also *un*comment a comment with the same shortcuts

  • @TheCodeRank
    @TheCodeRank Před 4 lety +1

    I really love coding after inspire from brad traversy i create my first youtube channel

  • @unclefreddy2009
    @unclefreddy2009 Před 4 lety

    Thanks so much for this, I’ve been trying to use Atom just because another channel I like uses it a lot (EngineerMan) but I see how productive you are with vsCode that I’m going back to it. Love the channel and content, have bought several courses.

  • @realchrishawkes
    @realchrishawkes Před 4 lety +17

    Nice

  • @Strasbourgeois
    @Strasbourgeois Před 2 lety

    7:00 when you create a new file, you can select a language with Ctrl+K M

  • @rosselliot8971
    @rosselliot8971 Před 4 lety +1

    Thing I recently discovered is when you select multiple occurrences of a string with ctrl+d, it highlights the whole word/s, and when you start typing the entire word/s is replaced. That's often what you want, but you can actually move your cursor left/right within the word and edit individual characters which is also often what you want.

  • @DanteS7
    @DanteS7 Před 4 lety

    Pressing F2 will rename a variable/function/tag without having to select all occurrences with Ctrl+D (if it's different search for "Rename Symbol")

  • @Kanol77
    @Kanol77 Před 2 lety

    Thanks! Very helpful video mate! 😎

  • @its_magnetic
    @its_magnetic Před 4 lety +1

    Thank you Brad, love ❤️ and respect 🙏 from Sikkim India 🇮🇳

  • @joshuaenoch1675
    @joshuaenoch1675 Před 4 lety +4

    Could you do a tutorial on Payment using React.JS

  • @ridl27
    @ridl27 Před 4 lety

    900k for now, congrats, Brad =) hopefully you and your channel will keep growing.

  • @falilou_io
    @falilou_io Před 4 lety

    Thanks Brad, you really help us a lot.
    Now, can you make a video about that code and explain it, please. I just finished you Modern JavaScript course on Udemy and I need more practice.

  •  Před 4 lety

    How to configure keyboard shortcuts example in Dreamweaver I made the combination CTRL + B = or CTRL + P and in VSCODE you can configure keyboard shortcuts both in html files and in php?

  • @AbhishekVerma-kj9hd
    @AbhishekVerma-kj9hd Před rokem

    Awesome man just the thing I wanted to know

  • @subham-raj
    @subham-raj Před 4 lety +11

    Some of these can be used in Chrome too

  • @__jake.m
    @__jake.m Před 2 lety

    Thank you for the useful tips! ☺

  • @MarouaneKassraoui
    @MarouaneKassraoui Před 4 lety

    Hello
    I want to help
    How to return the vscode interface first
    Because I pressed the ctrl +} button and the interface became very large

  • @sycoraxgriotsstudio5505

    - Select a word and Cmd+shift+F find this word in the entire workspace, very useful when you want to know where this word is used.

  • @Neerajkumar-xl9kx
    @Neerajkumar-xl9kx Před 3 lety

    helped me a lot . thanks

  • @m3hdim3hdi
    @m3hdim3hdi Před 4 lety +1

    Alt + F4 is my favorite

  • @balancemode2228
    @balancemode2228 Před 4 lety

    Thanks so much for the indispensable tutorial.

  • @herman751
    @herman751 Před 4 lety +2

    This is just deep fried Vim. Learning Vim will pay off, VSCode also has good Vim extensions.

  • @Corei7100
    @Corei7100 Před 4 lety

    Thanks Brad. I needed this one. I am also new to web development.

  • @georgestatefield
    @georgestatefield Před 4 lety +2

    Thank you for sharing, Brad!
    Nice and helpful video!

  • @ProgrammingwithPeter
    @ProgrammingwithPeter Před 4 lety

    I'm a phpstorm user but I used all of the editors(almost), VSCode is good for an editor but i find that productivity is better with an IDE(since php storm is fully customizable too, i'm using less mouse than keyboard)! Great video Brad!

    • @ilyesmilyesm2576
      @ilyesmilyesm2576 Před 4 lety

      but it's expensive x))

    • @ProgrammingwithPeter
      @ProgrammingwithPeter Před 4 lety

      @@ilyesmilyesm2576 Usually companies give licences to their developers, if you are a student, you can use it for free and let's talk about things that makes you productive, if you are productive with it to get another project in a year, from which you get 200-300$ would you pay 160$ for it? Not sure how much is the license today, but it's worth it!

    • @ilyesmilyesm2576
      @ilyesmilyesm2576 Před 4 lety

      @@ProgrammingwithPeter I am student, how can I use it for free?

    • @ProgrammingwithPeter
      @ProgrammingwithPeter Před 4 lety

      @@ilyesmilyesm2576 search jetbrains student pack

    • @ilyesmilyesm2576
      @ilyesmilyesm2576 Před 4 lety

      @@ProgrammingwithPeter ok thank you, I'll try it

  • @ayecab
    @ayecab Před 4 lety

    Holding down command/control and clicking on function calls takes you to the definition or import location.

  • @MrKarma4ya
    @MrKarma4ya Před 4 lety

    The one I'm constantly using is selecting a bunch of code then Ctrl+K + C (hold crtl then press K then C, not together) to comment out the selected code.

  • @cleophasomwenga1833
    @cleophasomwenga1833 Před 4 lety

    I cannot forget where you have brought me from, I will keep on supporting you where I can. I knew you this year May, so far have benefited a lot. Be blessed

  • @oakleyorbit
    @oakleyorbit Před 4 lety

    Dude yes I’ve been waiting for this!
    Thank you!!!

  • @RealSlaz
    @RealSlaz Před 4 lety

    Thanks dude, holy shit this helped me, the amount of times I had to change or find shit is annoying

  • @jonathanmessina4715
    @jonathanmessina4715 Před 3 lety +1

    Your logo is identical to the logo of an spanish phone company from my childhood, its called telefonica.

  • @mlshenhua1
    @mlshenhua1 Před 4 lety

    Thank you for your Gist With Shortcuts, it is helpful to review.

  • @XxMrBryanxX
    @XxMrBryanxX Před 4 lety

    Thanks so much for this video! It helped immensely

  • @heroe1486
    @heroe1486 Před 4 lety

    Best advice : Arch wiki + install a twm if you want an efficient keyboard centric workflow. Unless you live inside emacs there is no way macos/windows can be as efficient as a twm

  • @maheshhbhat
    @maheshhbhat Před 3 lety

    Thanks so much. This was super useful!

  • @7s9n
    @7s9n Před 2 lety

    Very helpful video 💛

  • @alwaysgrowww
    @alwaysgrowww Před 4 lety +2

    Hi Brad,
    Thank you for presenting this video!
    One suggestion (not relevant to this video):
    see scrimba.com and say something about that website because it's an extraordinary platform.

  • @diproy9363
    @diproy9363 Před 4 lety

    awesome shortcuts! thanks

  • @f3-faithfitnessfinance
    @f3-faithfitnessfinance Před 4 lety +3

    Thank you for this❤

  • @canerdemircigm
    @canerdemircigm Před 4 lety +1

    My mostly used shortcuts are k, f and Alt + Tab for youtube for your tutorials :)

  • @aestheticallyamazing2003
    @aestheticallyamazing2003 Před 4 lety +7

    Thanks Brad
    Guess no more clicking at the end and pressing enter lmao

  • @samuellucas7049
    @samuellucas7049 Před 4 lety

    Thanks bro. 😍 happy new month!

  • @lilianaramonaparaschiv8497

    in sidebar, u can open and close folders w enter

  • @dambooseriere1143
    @dambooseriere1143 Před 4 lety

    You are the best... Thanks..

  • @howardrkennedy
    @howardrkennedy Před rokem

    This really helps🥰

  • @hsumyat1265
    @hsumyat1265 Před 2 lety

    very useful ! Thank u

  • @SirusStarTV
    @SirusStarTV Před 4 lety

    After CTRL + SHIFT + E you can open/close folders with enter key and open files with enter key not CTRL + DOWN/UP.

  • @baroiall9968
    @baroiall9968 Před 4 lety

    Brad, can you make a video or a series on making web apps using Azure or AWS..thank you, love your videos

  • @SteveVillardiTV
    @SteveVillardiTV Před 4 lety

    Just an FYI for Windows to go to the beginning of a line its just home and end not ctrl+left or right

  • @frederic_millenial
    @frederic_millenial Před rokem

    What ?! On Mac you need to use cmd+(up/dn) to close/open a folder in explorer ? On Windows, you just need to use left/right arrow key.

  • @duckyeah896
    @duckyeah896 Před 4 lety

    you can use F1 as well to open command Pallete.

  • @habiburdev
    @habiburdev Před 4 lety

    Dear bro can you make tutorial for us about git and github basic to advanced. It will help us a lot, cause we love your video most.

  • @UsmanGhani-wk6hq
    @UsmanGhani-wk6hq Před 4 lety

    Thank you. Very beneficial. In which language they created VS code?

  • @Ozeki_Negima
    @Ozeki_Negima Před 4 lety

    Great video, helped out!

  • @devmanage6464
    @devmanage6464 Před 3 lety

    Thank you @brad sir..
    Very helpful. :)

  • @algumnomeaihehe
    @algumnomeaihehe Před 3 lety

    my man really did record himself reading documentation

  • @FernandaMilagres
    @FernandaMilagres Před 3 lety

    Little correction: To add commentaries " cmd + / " (screen description).