Another command I use very often is ctrl + alt + '-' (hyphen) which brings you back to previous places your cursor was at, which is useful when you go through multiple lines of code in multiple files either because you're reading the code, debugging or switching between files implementing/modifying multiple things across them. It's a fast way to "go back to where I left that other function/line I was writing before writing this".
@@akin.kilic. They are a bit different it seems but I haven't been digging that deep. But cursor undo is just undo of latest cursor movement. The "Go back" is more going back to where ju previously "jumped from". So F12 to go to a function definition and then moving the cursor with arrow keys would give "Cursor undo" to go back those small steps and "Go back" would jump to where you were before you pressed F12.
Some useful tips here. Spotted a couple of typos: "visual typo" at 2:33 - you say "backtick" but the onscreen icon is the left arrow. 4:28 I think you say "P" but you've transcribed it as "B". On my machine the palette is brought up with Shift-Command-P.
Loved the insightful messages at the end 😅 thanks for all the great content Arjan. Happy holidays. Also the point on switching the settings to its JSON version was cool 😎 I always had to use cmd+shift+P and search for settings (JSON).
It would be nice to have a follow up video specifically about pane/window navigation. How to split pane in two, now to move file to another pane, how to swap buffer, how to close all unsaved editors in a group etc. Surprisingly, those shortcuts are not listed in the "official" pdf cheatsheet and there are too many of them, but I think that not remembering them is the most frequent reason to use mouse in VSCode.
Thank you so much for zooming in on code in your videos... it's one of the things that makes your videos much much better than a lot of what we see on youTube... any opportunity I get to say this in context I will, because it's very very important (other creators please take note). :)
Was on the verge of looking up these shortcuts myself--thanks for sharing! I'm not in touch with my local community yet (still very green in my studies) and I forgot I had lo-fi Xmas playing in another tab, so the two minutes of coffee was actually really nice. Happy holidays to Arjan & co.
Hey Arjan, could you make a video on how to organize the actual files in a package? I find it non trivial to find other files using relative paths, especially once something is converted to a package you can import from elsewhere
Cmd + L selects the current line Cmd + shift + d selects the next value that currently highlighted (multi line cursor) Cmd + shift + L select all the values that are currently highlighted. Added vs code shortcut extension to data grip because they are so useful.
CTRL + K to delete the whole current line. Super useful Also CTRL+click on a variable and if you do that multiple times you can go back with CTRL + page left/right
Imo a better way of interacting with the panel at the bottom is with Ctrl+J. Similar to Ctrl+B for the side panel, Ctrl+J toggles the panel no matter if you are in the terminal, the debug console, output tab or the problems tab. VSCode also memorizes which your last tab was, so if you toggle the panel inside of the terminal and you open it up again, the terminal shows up
Thanks for the video’s. I normally am one of the ‘get in, get data, get out’ type of people. Glad I prolonged my visit this time and got to see your coffee addiction and your acting skills.
This was surprisingly useful! I am very much a keyboard shortcut user, but I've never tried some of these. For some reason I decided to go along and the first new thing I tried was zen-mode. I used to think it was a useless feature, but OMG it felt so nice when I tried it! I also had some trouble with multi-cursor actions so I went digging in the documentation. The command name is really useful because when you press Ctrl+Shift+p and type it you get the shortcut, and you also see some thing that you might want to use - Ctrl+D (Add Selection to Find Next Match) is fine and all, but Ctrl+Shift+L is glorious(Select All Occurences of Find Match) :) There is also settings in the top right corner to toggle case sensitivity and match whole words only.
Hi Arjan, this is very usefull, thanks for posting. I liked especially your combined use of Vim and VSCode shortcuts. I have found in the past that at least some Vim plugin extentions I used in VSC didnt play well with various keyboard shortcuts, for example the alt-up/down ( windows ) in order to reposition text but this clearly must have improved - I will revisit this thanks to your kindly reminder in this video as I have much missed having k-j-h-l navigation and the like from vi and vim when in VSCode. I watched all the way to the end of the video so I also am tenacious. Well worth doing so and made me laugh. We all need something to cheer us up these days. Quality stuff.
Thanks for the video Arjan! Especially for the ☕ end 😂😂 Another useful shortcut I use on Linux is leaving a cursor on a variable and pressing F7 to navigate between its instances in the file. Have a great weekend and go 🥜 😂
Interesting, showing and hiding the terminal for me is Cmd+J on my mac and Ctrl+J on my windows PC. I'm still glad I looked into the setting, regardless if it's the same as what you have.
discovering the alt + up / down shortcut is literally the singular reason I started using IDEs *way back* in 2019... before that I was all in on the insanely stupid "scrappy hacker haxoring with a text editor" thing like an idiot, didn't know about the alt shift one though! thanks as always! PS. the end gags are perfection!
Great video! Thanks I am going to start using some of these right away. Easily getting to the explorer tab, opening a file, and switching tabs is going to be really helpful. Also I have been drinking a lot of coffee as well and probably need to slow down. #tenaciouslyWatchedToTheEnd
You might be interested in staging and unstaging lines / selection (sadly is lines under the hood in vscode), intellij and gittower support ticking / committing individual lines. For cases where you need to git reset and refactor commits, or turn a big blob of experiment into structured and meaningful commits.
How about moving a block of code to the right or left? Can't find a simple answer to this simple question anywhere. I got it... My Column Selection Mode was on
If you use Jetbrains products like me, then look into the intellij keybinding extension. Used this for years, cannot learn 2 sets of shortcuts, already have vim for terminal and Jetbrains keybindings for everything else
PyCharm has a plugin that conditions one to use a keyboard more called Key Promoter X. I have found it helpful, but also annoying. Haven't checked if vscode has one.
There's an extension (Window Colors) which adds a randomised title bar colour to workspaces which I find quite handy, it does save them in the .vscode folder too so they're consistent between sessions and machines. Very useful when you occasionally have to edit the Live environment so you've got both environments open in different VSC windows and don't want to accidentally make changes in the wrong one.
@@arminzaugg1929 The one I'm using is Window Colors by Stuart Robinson, which is a nice simple extension. Peacock which Gijo recommended looks a lot more feature rich, and is still maintained though.
Recently installed neovim+astrovim+neovide and setup rust debugger because I'm currently learning rust. I have the same debugger as vscode, rust-analyzer and astrovim provides a menu with leader key. Vscode extensions are nice but having access to real vim all the old vim extensions and newer nvim extensions feels like a larger ecosphere. Then you aren't pinned down to vscode test runners. Rust has some amazing test libraries like Bacon. Also you can have multiple window options like vertical splits horizontal amd floating. Search in vscode is nice but using regex or fuzzy finding in vim is faster and more flexible. I'm sure there are very similar tools for python. I have a complete bash script to instantly create a new rust setup. If anyone needs help HMU.
Thanks for your shortcuts! I think it's just me, but since I used Notepad++ and PyCharm mainly before starting to use VSCode, and I still use Notepad++ and PyCharm sometimes, I think the shortcuts in VSCode are not as intuitive...
@@heroe1486 and still relevant with current state… in my opinion, coding environment is much personal for developers why not customize and create it for our own purposes and finally it’s so open source no one would need to pay (pycharge)
It looks like someone edits a video for you, and they misheard a few shortcuts. When you say "Ctrl+backtick", "Ctrl+backspace" is shown instead. Same with e.g. "Ctrl+Shift+P" shown as "Ctrl+Shift+B". And I'm only 4.5 minutes through the video so far!
Hands down my most used shortcuts are shift + alt + right arrow to select the entire variables. shift + alt + up or down arrow to copy the code up or down. alt + up or down to move the code up or down. Then i made my own shift + alt + a to select a parent div and all its child elements instead of looking for where the parent ends.
I've been using JOE editor for years and been trying to acclimate to VS Code. It's hard retraining those muscles! My first editor was a Notepad back in the early 90s for all of my HTML, sh, and Perl needs. Now it's mostly just bash, python, and C++ and VS Code offers some really nice features, especially for being freemium. Just wish I could use it on my console.
It treats folders as workspaces, and it's as simple as that. If you put config files in there under another folder called .vscode e.g. settings.json, tasks.json, and launch.json, it will also pick those files up and use them.
@@trenwar Notepad++ has the PythonScript add-in which allows you to do all kinds of tricks with your files. I use it to reformat log files all the time!
👷 Join the FREE Code Diagnosis Workshop to help you review code more effectively using my 3-Factor Diagnosis Framework: www.arjancodes.com/diagnosis
Another command I use very often is ctrl + alt + '-' (hyphen) which brings you back to previous places your cursor was at, which is useful when you go through multiple lines of code in multiple files either because you're reading the code, debugging or switching between files implementing/modifying multiple things across them. It's a fast way to "go back to where I left that other function/line I was writing before writing this".
Is this different to using alt+right/left arrow?
@@gijovarughesemathew5479 I noticed my windows VS code used alt+arrow and in Linux vm it uses ctrl +alt+hyphen.
Isn't this just CMD + U called 'Cursor Undo' ?
@@akin.kilic. They are a bit different it seems but I haven't been digging that deep. But cursor undo is just undo of latest cursor movement. The "Go back" is more going back to where ju previously "jumped from".
So F12 to go to a function definition and then moving the cursor with arrow keys would give "Cursor undo" to go back those small steps and "Go back" would jump to where you were before you pressed F12.
does anyone know how to do this in mac?
Some useful tips here. Spotted a couple of typos:
"visual typo" at 2:33 - you say "backtick" but the onscreen icon is the left arrow.
4:28 I think you say "P" but you've transcribed it as "B". On my machine the palette is brought up with Shift-Command-P.
Bless you for showing both Windows and Mac methods!
Alt + Shift + I to put cursor on all the lines. I use it quite a lot when I am writing SQL queries and I have to prepare comma seperated values.
Loved the insightful messages at the end 😅 thanks for all the great content Arjan. Happy holidays.
Also the point on switching the settings to its JSON version was cool 😎 I always had to use cmd+shift+P and search for settings (JSON).
Thank you Babak, glad is was helpful!
really enjoy the last part of the video! :D The human touch of a coder. Thanks Arjan
Glad you liked it!
It would be nice to have a follow up video specifically about pane/window navigation. How to split pane in two, now to move file to another pane, how to swap buffer, how to close all unsaved editors in a group etc. Surprisingly, those shortcuts are not listed in the "official" pdf cheatsheet and there are too many of them, but I think that not remembering them is the most frequent reason to use mouse in VSCode.
Thank you so much for zooming in on code in your videos... it's one of the things that makes your videos much much better than a lot of what we see on youTube... any opportunity I get to say this in context I will, because it's very very important (other creators please take note). :)
Thank you so much!
Was on the verge of looking up these shortcuts myself--thanks for sharing! I'm not in touch with my local community yet (still very green in my studies) and I forgot I had lo-fi Xmas playing in another tab, so the two minutes of coffee was actually really nice. Happy holidays to Arjan & co.
This video is really great!! My life is extended for ten years!!
Hey Arjen, could you perhaps make a video on debugging Python modules with VS Code? How do you debug programs with complex functions?
+1
Unit tests and print statements. Proper type hints help.
Thanks for the suggestions, Aaron, I've put it on the list.
😂 Top ending Arjen!! Merry Christmas!
Thank you - happy holidays!
The end of the video is awesome.
Thanks!
This has been one of the best coding channels I’ve found. Thank you 🙏
Thank you!
I loved the last few minutes of the video, after most everyone had gone. haha, made my day!
Thank you, haha! I'm glad you enjoyed the content :)
Hey Arjan, could you make a video on how to organize the actual files in a package? I find it non trivial to find other files using relative paths, especially once something is converted to a package you can import from elsewhere
Cmd + L selects the current line
Cmd + shift + d selects the next value that currently highlighted (multi line cursor)
Cmd + shift + L select all the values that are currently highlighted.
Added vs code shortcut extension to data grip because they are so useful.
Loved the "Christmas Break" shortcut at the end of video.
Thanks so much Arslan, glad you liked it!
CTRL + K to delete the whole current line. Super useful
Also CTRL+click on a variable and if you do that multiple times you can go back with CTRL + page left/right
Bedankt
Graag gedaan!
thanks for the hardwork you are putting together.
I appreciate that!
That useless extras captivated my heart! lol
take my like Anjan!
Thank you so much 😊
For the last tip on colourizing windows, there's an extension called Peacock which also does this very nicely too
Nice, thanks for the tip!
Love u man for that extras!
I was just looking these shortcuts up recently so nice to have a video for them too :)
Thanks so much, glad the content is helpful!
Imo a better way of interacting with the panel at the bottom is with Ctrl+J. Similar to Ctrl+B for the side panel, Ctrl+J toggles the panel no matter if you are in the terminal, the debug console, output tab or the problems tab. VSCode also memorizes which your last tab was, so if you toggle the panel inside of the terminal and you open it up again, the terminal shows up
I stayed 😅 hope you had a good weekend!
Great tips that would have saved me hours by now if I knew them! Grabbing the cheat sheets. Also, love your post-content commentary!
Thank you Rufus!
I loved the blooper reel on this one :)
Thanks, happy you’re enjoying the content!
Merry X-Mas! 🧑🎄Thanks for this Christmas Tree with VSC shortcuts 🎄
Thanks you so much Jarek, glad you liked the video!
Merry Christmas 🎄🎅
Thanks for the video’s. I normally am one of the ‘get in, get data, get out’ type of people. Glad I prolonged my visit this time and got to see your coffee addiction and your acting skills.
Thanks Paul, happy you’re enjoying the content!
This was surprisingly useful! I am very much a keyboard shortcut user, but I've never tried some of these. For some reason I decided to go along and the first new thing I tried was zen-mode. I used to think it was a useless feature, but OMG it felt so nice when I tried it!
I also had some trouble with multi-cursor actions so I went digging in the documentation. The command name is really useful because when you press Ctrl+Shift+p and type it you get the shortcut, and you also see some thing that you might want to use - Ctrl+D (Add Selection to Find Next Match) is fine and all, but Ctrl+Shift+L is glorious(Select All Occurences of Find Match) :)
There is also settings in the top right corner to toggle case sensitivity and match whole words only.
Glad that it was helpful!
Thank you Arjan 👍
Thanks so much Aashay, glad the content is helpful!
Great video! I like the Pycharm (Jetbrains) shortcuts. Especially the refactoring shortcuts. Makes me feel like a 10x developer 🤣
Thanks Adjay, happy you’re enjoying the content!
Very dense and useful tutorial
Glad you liked it!
I have two more useful:)
- F7 when on object name takes you to the next occurence of this object in current file
- Shift Del deletes current row
Thanks for all those tips, you look a nice guy. Thank you!
So nice of you!
love your hardwork sir ❤
Great! Thank you.
You are welcome!
Hi Arjan, this is very usefull, thanks for posting.
I liked especially your combined use of Vim and VSCode shortcuts. I have found in the past that at least some Vim plugin extentions I used in VSC didnt play well with various keyboard shortcuts, for example the alt-up/down ( windows ) in order to reposition text but this clearly must have improved - I will revisit this thanks to your kindly reminder in this video as I have much missed having k-j-h-l navigation and the like from vi and vim when in VSCode.
I watched all the way to the end of the video so I also am tenacious. Well worth doing so and made me laugh. We all need something to cheer us up these days. Quality stuff.
Thanks so much Jon, glad the content is helpful!
Thanks for the video Arjan!
Especially for the ☕ end 😂😂
Another useful shortcut I use on Linux is leaving a cursor on a variable and pressing F7 to navigate between its instances in the file.
Have a great weekend and go 🥜 😂
Thanks so much Ioannis, glad the content is helpful!
Interesting, showing and hiding the terminal for me is Cmd+J on my mac and Ctrl+J on my windows PC. I'm still glad I looked into the setting, regardless if it's the same as what you have.
The Vim plugin has been serving me very well so far.
discovering the alt + up / down shortcut is literally the singular reason I started using IDEs *way back* in 2019... before that I was all in on the insanely stupid "scrappy hacker haxoring with a text editor" thing like an idiot, didn't know about the alt shift one though! thanks as always!
PS. the end gags are perfection!
Thanks a lot!
Could you make a similar video to Pycharm IDE?
Hello, you may like the "Code Ace Jumper" VSCode extention to move quickly your cursor without mouse.
2:34 what is backtech? (Backspace?) What key is that
It's the backtick: `
@@ArjanCodes Thanks, I think the image is wrong there
Great video! Thanks I am going to start using some of these right away. Easily getting to the explorer tab, opening a file, and switching tabs is going to be really helpful. Also I have been drinking a lot of coffee as well and probably need to slow down. #tenaciouslyWatchedToTheEnd
I was hoping at the end you would mention ctrl-z haha
awesome final )
Glad you liked it 😊
You might be interested in staging and unstaging lines / selection (sadly is lines under the hood in vscode), intellij and gittower support ticking / committing individual lines. For cases where you need to git reset and refactor commits, or turn a big blob of experiment into structured and meaningful commits.
Lol a software engineer, AND comedian merry xmas!
Merry Christmas!
Very Helpful Video. Can you make another one for VIM shortcuts?
Great suggestion, thank you!
Like for you, great job. Three videos, WOW. Thanks for your content, is helpful
What a timing. Just downloaded a vscode shortcuts cheatsheet yesterday evening 😂
Share cheatsheet link please
Kindly share friend
How did you delete the entire line? And how to delete the entire line after current cursor?
How about moving a block of code to the right or left? Can't find a simple answer to this simple question anywhere. I got it... My Column Selection Mode was on
Thanks
You’re welcome!
If you use Jetbrains products like me, then look into the intellij keybinding extension.
Used this for years, cannot learn 2 sets of shortcuts, already have vim for terminal and Jetbrains keybindings for everything else
PyCharm has a plugin that conditions one to use a keyboard more called Key Promoter X. I have found it helpful, but also annoying. Haven't checked if vscode has one.
There's an extension (Window Colors) which adds a randomised title bar colour to workspaces which I find quite handy, it does save them in the .vscode folder too so they're consistent between sessions and machines.
Very useful when you occasionally have to edit the Live environment so you've got both environments open in different VSC windows and don't want to accidentally make changes in the wrong one.
The extension is called Peacock, for those wondering
sounds great. Can you share a link to the extension?
@@arminzaugg1929 The one I'm using is Window Colors by Stuart Robinson, which is a nice simple extension.
Peacock which Gijo recommended looks a lot more feature rich, and is still maintained though.
Thanks for the tip!
Love the end. 😂
I really feel you in the last 2 min. Cracking coffee and to much bones... or was it the other way round?
Any shortcuts for fetching them branching from main, so painful!!!
Recently installed neovim+astrovim+neovide and setup rust debugger because I'm currently learning rust. I have the same debugger as vscode, rust-analyzer and astrovim provides a menu with leader key. Vscode extensions are nice but having access to real vim all the old vim extensions and newer nvim extensions feels like a larger ecosphere. Then you aren't pinned down to vscode test runners. Rust has some amazing test libraries like Bacon. Also you can have multiple window options like vertical splits horizontal amd floating. Search in vscode is nice but using regex or fuzzy finding in vim is faster and more flexible. I'm sure there are very similar tools for python. I have a complete bash script to instantly create a new rust setup. If anyone needs help HMU.
Thanks for your shortcuts!
I think it's just me, but since I used Notepad++ and PyCharm mainly before starting to use VSCode, and I still use Notepad++ and PyCharm sometimes, I think the shortcuts in VSCode are not as intuitive...
Thank you Nicolas, glad you liked the video!
Does anyone know if there are keyboard covers for VS code, similar to those for Adobe?
This is fantastic! Thank you so much for this! :) (and I am tenacious. Thank you.^_^)
Thanks so much Mike, glad you liked it! :)
Love the useless extras segment 🤣👍
Glad you liked it 😊
Which keyboard brand model is this?
Looks like a Launch Lite by System76 to me, but I’m not fully sure.
control + k + z wasn't in the windows as much as I tried.
heyyyy Have you ever tried Colombian coffee? Juan Valdez the best one :) and yeah useful video :)
Thanks Luis, I will definitely try it one day. :) glad you liked the video!
Stil not convinced to ditch my old vim edior. ;-)
ctrl-/
That is going to save me so much time.
smallest coffee cup ever, lol
Do you even vim ?
why not vim/neovim
Because people like to make their life harder, vim keybindings are 1 more efficient and 2 reproducibles pretty much everywhere
@@heroe1486 and still relevant with current state… in my opinion, coding environment is much personal for developers why not customize and create it for our own purposes and finally it’s so open source no one would need to pay (pycharge)
alt + right arrow, ctrl + shft + L, easy quick find & replace
Command palette is Ctrl+Shift+P, not B ! Did anybody readproof on-screen text ?
It looks like someone edits a video for you, and they misheard a few shortcuts. When you say "Ctrl+backtick", "Ctrl+backspace" is shown instead. Same with e.g. "Ctrl+Shift+P" shown as "Ctrl+Shift+B". And I'm only 4.5 minutes through the video so far!
Is that coffee mug really small, or are you just that big? 0.o
that extras :D
Hands down my most used shortcuts are
shift + alt + right arrow to select the entire variables.
shift + alt + up or down arrow to copy the code up or down.
alt + up or down to move the code up or down.
Then i made my own
shift + alt + a to select a parent div and all its child elements instead of looking for where the parent ends.
Zooming Shortcut is Ctr + +/=, Zooming Out is Ctr + -
There is no such thing as a “vim noob”, opening vim automatically makes you a bad ass
I've been using JOE editor for years and been trying to acclimate to VS Code. It's hard retraining those muscles!
My first editor was a Notepad back in the early 90s for all of my HTML, sh, and Perl needs. Now it's mostly just bash, python, and C++ and VS Code offers some really nice features, especially for being freemium. Just wish I could use it on my console.
Idea. Explain workspace in VS Code. Still very confusing.
It treats folders as workspaces, and it's as simple as that. If you put config files in there under another folder called .vscode e.g. settings.json, tasks.json, and launch.json, it will also pick those files up and use them.
Meh, you should've added Linux, because I noticed that some of these are different from windows (ie. Command Palette is ctrl+shift+p)
command terminal is CTRL + SHIFT + P not B
because I have fat fingers. I needed to remove Ctrl + W... So many annoying moments because of that shortcut.
you should add useless extras to more of your videos :)
furst
itd be actually really cool if you didnt use your mouse for this video esp when youre on vscode
The content to sponsor ratio trends in a disappointing direction
What do you mean? This video is not sponsored.
Or a completist
Stopped watching at the mention of VIM. That is hell on earth
No vim!?! Just lost all credibility. :)
Pycharm is better 😀
Oh, someone whats to start a war :D emacs vs vim, iPhone vs Android, Windows vs Linux and now this... Let's goooo !!
Notepad++ is better
But need to pay
Real programmers use a magnetized needle and a steady hand.
@@trenwar Notepad++ has the PythonScript add-in which allows you to do all kinds of tricks with your files. I use it to reformat log files all the time!