20+ AMAZING VS Code Tips I Wish I Knew Earlier

  Рет қаралды 23,750

James Q Quick

James Q Quick

Күн бұрын

Here are the top VS Code tips from Twitter!
Original Tweet - / 1721910833683275986
*Newsletter*
Newsletter 🗞 - www.jamesqquick.com/newsletter
*DISCORD*
Join the Learn Build Teach Discord Server 💬 - / discord
Follow me on Twitter 🐦 - / jamesqquick
Check out the Podcast - compressed.fm/
Courses - jamesqquick.com/courses
*QUESTIONS ABOUT MY SETUP*
Check out my Uses page for my VS Code setup, what recording equipment I use, etc. www.jamesqquick.com/uses
00:00 - Intro
01:00 - Save File
01:10 - Switching Tabs
01:30 - Close Files
01:50 - Add vs code to path
03:10 - Toggle Terminal and Sidebar
04:20 - Zen Mode
04:55 - Auto hide pane extension
05:35 - Opening Files
06:40 - Searching and Replace
07:55 - Working with Markdown Files
09:15 - Selecting Multiple Instance
10:10 - Multiple Cursors
11:10 - Go to Definition
11:35 - Automatic Imports
12:45 - Expand Selection
13:25 - Command Palette
14:20 - Move sidebar to the right

Пікірлер: 96
@cesarfrick5725
@cesarfrick5725 6 ай бұрын
One I use quite often when doing code reviews is Control + G, which allows you to go directly to a specific line, just write the number and the cursor will jump there. Another one quite useful is Cmd + Shift + O, which allows you to navigate the definitions in your file, in the same way that the Command Pallete allows you to navigate the files
@AllAboutThatBase1
@AllAboutThatBase1 6 ай бұрын
Two of my favorites that I'm surprised weren't covered: 1. Option + Up/Down Arrow - This lets you slide code around higher or lower within the file. It operates on the current line with no selection, or on a selected block of code. It also adjusts indentation automatically as the line/block moves in and out of other blocks. 2. Command + / (forward slash): Toggles comment mode for the current line or selected block.
@aidenberzins
@aidenberzins 5 ай бұрын
Literally use both of these constantly.
@quoccuong1733
@quoccuong1733 6 ай бұрын
one comand i find myself using all the time working on a huge file is the ability to Go forward and Go backward. this allows you to jump back to the last line your cursor was on even if the line is in another file. Very usefull
@waleedbinalim
@waleedbinalim 6 ай бұрын
Great tips James. There are two more shortcuts to know as well 1. Command + Option + Left/Right Arrow (Allows you to navigate through tabs in order of direction) 2. Command + Option + T (Closes all other tabs apart from the one opened)
@christopheanfry2425
@christopheanfry2425 6 ай бұрын
So nice!!! It’s been almost a year that I’m using the sidebar on the right and just love it as you said it doesn’t affect the position of the code when toggling the sidebar. Your cmd shift w which closes vs code there is also cmd q which works by the way for any Mac apps. I’ve learnt a few that I will definitely use. Thanks
@rubendacostaesilva8442
@rubendacostaesilva8442 6 ай бұрын
As soon as James mentioned it, I was about to write a comment about people who use it should be hospitalized in a mental institution, but then I remember that before I've started to code, I use to work a lot with Adobe software (still do...), specially Photohop and Illustrator, and their panels is located in the right side, so I decided to give it a try, and now I'm starting to believe that maybe I should check a psychiatrist...
@christopheanfry2425
@christopheanfry2425 6 ай бұрын
@@rubendacostaesilva8442 🤣🤣🤣 I should probably too!!!
@knorkeFutzi
@knorkeFutzi 6 ай бұрын
Very nice, thanks. Additional shortcuts I use often (Windows): Editor: F12 when cursor is on a symbol -> go to definition of symbol Editor: Alt + Up / Down -> move line up / down Editor: Ctrl + Up / Down -> move shown code up / down without moving cursor position Editor: Alt + Shift + Up / Down -> copy current line up / down Editor: Ctrl + G -> go to line no. ... and of course Ctrl + Space to init IntelliSense ... There is so much more 😎
@alpaca_growing_kit
@alpaca_growing_kit 6 ай бұрын
I didn't know init intellisense existed, this saves me so much time.
@JamesQQuick
@JamesQQuick 6 ай бұрын
Yeah there are too many for any individual video. Love all those!
@noelpena4567
@noelpena4567 6 ай бұрын
I have sidebar on the right. I use VS code (sidebar default on the left) and OG Visual Studios (sidebar default on the right) and I realized I like it on the right better.
@bacharsaleh6984
@bacharsaleh6984 6 ай бұрын
you have missed most useful ones: close all open brackets in a file (very useful to know what are the high level objects or functions): CMD + k + 0 close current open brackets (could be a function, object, or any block): CMD + k + ] also to jump to specific line in a file: CMD + P , then add :128 --> this will jump to line 128
@LiveType
@LiveType 6 ай бұрын
100% this. I was a little shocked it wasn't included. This helps a ton with large unwieldy files. But I mean when you start getting to said massive file sizes, I think it's time to refactor. The time you spend scrolling adds up.
@lalvar
@lalvar 6 ай бұрын
You can just press CMD + G and line number, it will save one more keystroke
@JamesQQuick
@JamesQQuick 6 ай бұрын
Thanks for sharing. Those are great!
@igorr4682
@igorr4682 4 ай бұрын
I like the bar on the right as I work with Visual Studio a lot as well. This keeps things the same when hopping between Editors.
@RobData
@RobData 6 ай бұрын
You have a couple of things you might want to tidy up: at 6:48 you mention searching in a file and repeatedly say CMD Shift F but show on the screen Cmd+F; that needs some clarification. Then an error:: you say to open the terminal you press Cmd plus tilde but the actual key you press and show isn't the tilde but the back-tick. The back-tick is the ` character but the tilde is the horizontal wave-like character ~
@2ru2pacFan
@2ru2pacFan 6 ай бұрын
That expand selection one is amazing! Definitely need it!
@JamesQQuick
@JamesQQuick 6 ай бұрын
Yeah I thought so too!
@codewithguillaume
@codewithguillaume 6 ай бұрын
Dude, you are the DUDE !
@JamesQQuick
@JamesQQuick 6 ай бұрын
Merci mon ami!
@saifahmedanik
@saifahmedanik 6 ай бұрын
(I never knew) shortcut for windows Expand Selection shortcut for Windows ---> Shift + Alt + Right
@MegaJohn144
@MegaJohn144 6 ай бұрын
I switched to VS Code from Sublime Text because ST started acting crazy after I installed Python 3.12. I wanted a powerful editor with low overhead and offered debugging of Python code. VS Code is great. I used it to develop a whole website using Flask. I can't wait to try these new tips.
@Lucas2RC
@Lucas2RC 6 ай бұрын
Thanks for these great tips. I am rather new to VSCode and programming, so these do improve efficiency.
@DontFollowZim
@DontFollowZim 6 ай бұрын
I don't move my main sidebar to the right but I do fully utilize the right sidebar (lots of tools like Git and Todo trackers over there) so I can keep some things visible even if I need to keep two (or three with lower/terminal) panes up at a time
@JamesQQuick
@JamesQQuick 6 ай бұрын
Oh interesting. I didn't know you could separate other things to the right that arent't in the main sidebar
@Stoney_Eagle
@Stoney_Eagle 6 ай бұрын
Ever tried to mass replace regular functions to arrow functions with regex replace that works with all the possible ways of type defining (generic, input, return) and multi lined? I think it took me longer to make that regex than it would to go in and change the 100+ functions manually but boy was it ever satisfying when I clicked that button 😂
@everyhandletaken
@everyhandletaken 6 ай бұрын
That definitely sounds like something I would do lol
@likandokayombo
@likandokayombo 6 ай бұрын
Thank you for this
@JamesQQuick
@JamesQQuick 6 ай бұрын
No problem 😊
@lontus-racref
@lontus-racref 6 ай бұрын
Just FYI so you don't jump into pull requests trying to change documents on Windows, the shortcut is ALT+[Number].
@JamesQQuick
@JamesQQuick 6 ай бұрын
Great catch!
@juanmacias5922
@juanmacias5922 6 ай бұрын
Vim keybindings!
@sawzarnilinhtay5551
@sawzarnilinhtay5551 6 ай бұрын
Which font du u use, sir??
@kevinbellock6825
@kevinbellock6825 6 ай бұрын
can't believe I never knew how easy it was to add vs code to path from within vscode
@JamesQQuick
@JamesQQuick 6 ай бұрын
What a nice little feature right?
@nevermindthelabel
@nevermindthelabel 6 ай бұрын
team sidebar on the right, and vim/which key plugins are great
@JamesQQuick
@JamesQQuick 6 ай бұрын
Nice! Have you used VIM for a long time?
@marty2327
@marty2327 6 ай бұрын
So after you command click on a function to see its definition, is there a way to get back to the code you were looking at before you went the the function definition?
@JamesQQuick
@JamesQQuick 6 ай бұрын
Hmm, not sure the best way. I just ctrl+tab back to the previous tab
@Aedaeum
@Aedaeum 6 ай бұрын
You can hit the back button on your mouse
@raybaxter4683
@raybaxter4683 6 ай бұрын
There's "Go previous" in the command palatte that you could bind to something.
@Icemourne_
@Icemourne_ 6 ай бұрын
As an ultra-wide user, I don't have any problems keeping the sidebar and terminal always open Tbh closing the sidebar would make my experience worse because the code would be way to the side also I have browser open on the second monitor
@JamesQQuick
@JamesQQuick 6 ай бұрын
haha I kinda struggle with that a bit. The code being too far away
@jesper.ordrup
@jesper.ordrup 6 ай бұрын
Left / Right - give it days. After that youre ready to the next level - auto hide
@bp-ob8ic
@bp-ob8ic 6 ай бұрын
Is there a shortcut to toggle column selection mode? Multiple cursors looks pretty cool, and might be actually better for most of my use cases. Great content as always, James. Thank you!
@rubendacostaesilva8442
@rubendacostaesilva8442 6 ай бұрын
Not by default, but you can customize it for yourself, if it's something that you use a lot of time.
@JamesQQuick
@JamesQQuick 6 ай бұрын
What do you mean by column selection mode?
@bp-ob8ic
@bp-ob8ic 6 ай бұрын
@@JamesQQuickLast item on the selection menu.
@raybaxter4683
@raybaxter4683 6 ай бұрын
@@JamesQQuick This a something I use frequently. It is similar to multiple cursors, but it is strictly by column. Suppose your cursor is on line 5 column 5 and you have CSM on. If you hold down shift and down/right arrow to line 10 column 10, you've now six cursors. You can delete, or navigate within that selection to change all 6 selected areas simultaneously. This is very handy for columnar data, and sometimes for code. Example of the later would be is you'd aligned the = signs in a block of code and needed to shift multiple rows to the right because a new row had a longer left hand side.
@user-hi9nz6dh5w
@user-hi9nz6dh5w 6 ай бұрын
You should also mention that almost all of these work in Visual Studio also. A few have slightly different keyboard commands.
@JamesQQuick
@JamesQQuick 6 ай бұрын
Nice! I don't use VS Code anymore so I didn't know, but that makes sense
@HoNow222
@HoNow222 6 ай бұрын
Side bar on the right is the best thing ever. Anyway your input curson has a weird animation, is that a plugin?
@everyhandletaken
@everyhandletaken 6 ай бұрын
No, that is standard in VS Code - 'Editor: Custom Blinking' within settings - I think he has this on 'expand' which I use too.
@JamesQQuick
@JamesQQuick 6 ай бұрын
Yep, this!
@DonovanCYoung
@DonovanCYoung 6 ай бұрын
I use Sidebar left, code middle, terminal right
@williammckeever4790
@williammckeever4790 6 ай бұрын
Having the sidebar on the right makes so much more sense, unfortunately I could never get used to it and always go back. Think I'll give it another try as I have not used the editor for a while and that might help me get used to the new location. Just have to stick with it.
@JamesQQuick
@JamesQQuick 6 ай бұрын
Yeah I tried it too and it just never clicked
@janmejaypurohit721
@janmejaypurohit721 6 ай бұрын
How do we setup path suggestions in the terminal?
@JamesQQuick
@JamesQQuick 6 ай бұрын
That's a tool called Fig.io. It's really nice!
@havetrustissue8975
@havetrustissue8975 6 ай бұрын
Command + B for sidebar toggle.
@ronaldpaek
@ronaldpaek 6 ай бұрын
Should we invest in learning vim motion for vs code?
@JLarky
@JLarky 6 ай бұрын
Yes
@JamesQQuick
@JamesQQuick 6 ай бұрын
I think lots of people would say yes. I'd just say it's a big learning curve, but many people find it incredibly productive
@ronaldpaek
@ronaldpaek 6 ай бұрын
@@JamesQQuick did you learn vim motion or attempted to learn it? I knew all the vs shortcuts but I want to be more efficient >.< but I also don’t want to waste too much time either
@JamesQQuick
@JamesQQuick 6 ай бұрын
I haven't learned it myself, so I can's speak from personal experience@@ronaldpaek
@moneyfr
@moneyfr 6 ай бұрын
Could you do video on zellij ❤
@JamesQQuick
@JamesQQuick 6 ай бұрын
What is that?
@moneyfr
@moneyfr 6 ай бұрын
@@JamesQQuick it's like termux but with more function
@MikeNeder
@MikeNeder 6 ай бұрын
I've actuality never seen that intellisense that you got going on in terminal.
@alexanderkomanov4151
@alexanderkomanov4151 6 ай бұрын
🎉🎉🎉
@moneyfr
@moneyfr 6 ай бұрын
00:50 and I am on Linux 😂😂🎉
@kenshinhimura3140
@kenshinhimura3140 6 ай бұрын
Thank you
@chhavimanichoubey9437
@chhavimanichoubey9437 3 ай бұрын
Rage quit, giggling internally, because it might be true to some people, when they are stuck in coding problems.
@raphael_santiago
@raphael_santiago 6 ай бұрын
"shift+ctrl+command" I thought you said "command" should be "ctrl" on windows? So it's shift+ctrl+ctrl??
@JamesQQuick
@JamesQQuick 6 ай бұрын
Yeah that's one that's a bit different.
@Dev-sf3pz
@Dev-sf3pz 5 ай бұрын
I think you discover much off these the more you have the mentality of using the mouse as little as possible, then you are forced to find out what keyboard shortcut exists to accomplish that.
@SquaredbyX
@SquaredbyX 6 ай бұрын
How are you opening that search bar at the top lol. Step zero pls.
@raybaxter4683
@raybaxter4683 6 ай бұрын
Command-Shift-P
@MiguelLopez-mu1ss
@MiguelLopez-mu1ss 6 ай бұрын
Vscode is good for making github pr reviews with their extension... if vim keybindings are installed... it's almost 2024, nvim ftw
@jabthejewboy
@jabthejewboy 6 ай бұрын
Best vs code tip: switch to neovim
@JamesQQuick
@JamesQQuick 6 ай бұрын
Oh yeah? What do you love about it?
@jabthejewboy
@jabthejewboy 6 ай бұрын
@@JamesQQuick the plugin eco system, easy customization, the ability to use a simple scripting language to make any behavior you want, and the way your can flow through a document without even thinking about it once you get good at vim motions. Plus I feel that spending time in the terminal and learning how things in a system work at a lower level just makes you a better developer. Don’t get me wrong vs code is very good for some things, like an easy debugger interface, easy collaborative coding. I keep it installed for those things. But I feel that neovim is just the best tool out there purely for editing text files and the plugins make it just as good for most things as any ide accept for some edge cases.
@shakirparke
@shakirparke 4 ай бұрын
You're so handsome
@Aedaeum
@Aedaeum 6 ай бұрын
The real ones have their sidebar on the right.
@zebapy
@zebapy 6 ай бұрын
These all are like front of the page manual tips. I'd love some less popular ones.
@StephenRayner
@StephenRayner 6 ай бұрын
Stopped watching when you wasted my time with cmd S -.-😊
@JamesQQuick
@JamesQQuick 6 ай бұрын
lol that was just the warm up
@Mysteria9
@Mysteria9 6 ай бұрын
​@@JamesQQuick Do you really consider cmd+s an amazing shortcut you wish you knew earlier? 😉
@JamesQQuick
@JamesQQuick 6 ай бұрын
haha that was basically an accident. It was just listed on the twitter thread so I threw it in. I definitely regret starting with that one haha@@Mysteria9
10 JavaScript Interview Questions You HAVE TO KNOW
13:41
James Q Quick
Рет қаралды 41 М.
If you're not developing with this, you're wasting your time
14:30
Articulated Robotics
Рет қаралды 255 М.
1❤️
00:20
すしらーめん《りく》
Рет қаралды 33 МЛН
Pokey pokey 🤣🥰❤️ #demariki
00:26
Demariki
Рет қаралды 9 МЛН
Cat story: from hate to love! 😻 #cat #cute #kitten
00:40
Stocat
Рет қаралды 15 МЛН
You might not need useEffect() ...
21:45
Academind
Рет қаралды 145 М.
Top 10 CSS One Liners That Will Blow Your Mind
13:34
developedbyed
Рет қаралды 893 М.
25 VS Code Productivity Tips and Speed Hacks
11:35
Fireship
Рет қаралды 2,2 МЛН
12 VS Code Extensions to INCREASE Productivity 2024
27:13
Devression
Рет қаралды 480 М.
20 Essential VS Code Extensions In 2024
14:26
Traversy Media
Рет қаралды 128 М.
Every USEFUL Markdown Syntax That I Use in Obsidian
17:21
FromSergio
Рет қаралды 119 М.
Vim Tips And Tricks Some Of My Favorite Vim Commands
17:05
DistroTube
Рет қаралды 58 М.
So You Think You Know Git - FOSDEM 2024
47:00
GitButler
Рет қаралды 962 М.
VS Code Customization with Profiles
6:19
James Q Quick
Рет қаралды 4,4 М.
Powerful VSCode Tips And Tricks For Python Development And Design
15:50
1❤️
00:20
すしらーめん《りく》
Рет қаралды 33 МЛН