These shortcuts will change how you write code forever
Summary
TLDRThis video script urges viewers to master VS Code shortcuts to enhance productivity, emphasizing the importance of learning keyboard shortcuts over relying on the mouse. It provides a list of essential shortcuts for tasks like opening the terminal, renaming variables, selecting lines, and navigating files. The script also includes browser shortcuts for developers, such as opening dev tools and managing tabs. The call to action is to try these shortcuts for two weeks and observe the improvement in efficiency.
Takeaways
- 😀 Learning VS Code shortcuts can significantly enhance productivity for programmers.
- 🔍 Pressing Ctrl+J opens or toggles the terminal in VS Code, a fundamental shortcut for project management.
- 🗑️ Ctrl+L clears the terminal screen, helping to declutter the workspace.
- 🔄 Ctrl+D is used to select and rename variables across all occurrences, a powerful feature for code refactoring.
- 🔑 Ctrl+Shift+L selects all occurrences of the current word, streamlining the editing process.
- ⏏️ End and Home keys, or their Fn key combinations, are essential for navigating to the beginning or end of a line.
- 🔄 Alt+Up/Down keys allow for moving lines up and down, simplifying code organization.
- 📄 Ctrl+Backspace and Ctrl+Delete delete words instead of single characters, improving text editing efficiency.
- 🗂️ Ctrl+Shift+K deletes the current line, a quick way to remove unwanted code.
- 🔑 Ctrl+Alt+Up/Down and Alt+Click are methods for inserting cursors at different positions, useful for multi-cursor editing.
- 🔍 Ctrl+P is a shortcut for searching and opening files quickly, saving time in large projects.
- 🔄 Ctrl+Shift+F searches within a large file, aiding in navigation and finding specific code snippets.
- 💾 Ctrl+S and Ctrl+K+S are for saving individual and all files, respectively, ensuring work is preserved.
- 🚫 Ctrl+W and Ctrl+K+W close individual and all files, respectively, keeping the workspace tidy.
- ↩️ Ctrl+Shift+T reopens the last closed file, a handy shortcut for recovering work.
- 🛠️ The Command Palette (Ctrl+Shift+P) is a powerful tool for executing almost any command in VS Code.
- 📚 Ctrl+B toggles the sidebar, providing quick access to different panels and views.
- 📈 Ctrl+Shift+V previews Markdown files, enhancing the workflow for documentation and README files.
- 🛠️ Browser shortcuts like Ctrl+Shift+J for DevTools and Ctrl+T for new tabs are crucial for web development and debugging.
Q & A
Why is it important for programmers to learn VS Code shortcuts?
-Learning VS Code shortcuts can significantly increase productivity by reducing the time spent on repetitive tasks, allowing programmers to focus more on coding rather than navigating the interface.
What is the shortcut to open a new terminal in VS Code?
-The shortcut to open a new terminal in VS Code is Ctrl+J, which allows for quick access to the terminal without using the mouse.
How can you clean up a messy terminal in VS Code?
-You can clean up a messy terminal in VS Code by pressing Ctrl+L, which clears the terminal screen.
What is the shortcut to rename a variable and update all its occurrences in VS Code?
-To rename a variable and update all its occurrences in VS Code, first select the variable, then press F2 to rename it. To update all occurrences, press Ctrl+D until all instances are selected.
How can you select all occurrences of a variable at once in VS Code?
-To select all occurrences of a variable at once in VS Code, press Ctrl+Shift+L after selecting the first instance of the variable.
What is a faster way to select a line in VS Code instead of using the mouse?
-Instead of using the mouse, you can select a line in VS Code by pressing Ctrl+L, which highlights the current line of code.
How can you move a line of code up or down in VS Code?
-To move a line of code up in VS Code, select the line and press Alt+Up Arrow. To move it down, press Alt+Down Arrow.
What is the shortcut to delete a word at a time instead of a letter in VS Code?
-To delete a word at a time in VS Code, press Ctrl+Backspace. To delete from the right, press Ctrl+Delete.
How can you quickly save a file or all files in VS Code?
-To save a file in VS Code, press Ctrl+S. To save all open files at once, press Ctrl+K followed by S.
What is the shortcut to close a file or all files in VS Code?
-To close a file in VS Code, press Ctrl+W. To close all open files, press Ctrl+K followed by W.
How can you reopen the last closed file in VS Code?
-To reopen the last closed file in VS Code, press Ctrl+Shift+T, which functions like a stack with the last closed file being the first to reopen.
What is the shortcut to open the command palette in VS Code?
-The shortcut to open the command palette in VS Code is Ctrl+P, which allows you to execute commands and actions within the editor.
How can you toggle the sidebar in VS Code?
-To toggle the sidebar in VS Code, press Ctrl+B, which hides or shows the sidebar containing the file explorer and other panels.
What is the shortcut to preview a markdown file in VS Code?
-To preview a markdown file in VS Code, press Ctrl+Shift+V, which opens the preview in a new tab. For side-by-side preview, press Ctrl+K followed by V.
Outlines
💻 Essential VS Code Shortcuts for Programmers
This paragraph introduces the importance of learning VS Code shortcuts to enhance productivity in coding. It provides a step-by-step guide to various shortcuts, starting from opening a terminal with 'Ctrl + J', to renaming variables using 'Ctrl + D', and selecting all occurrences with 'Ctrl + Shift + L'. The speaker emphasizes the transformational impact of these shortcuts on a programmer's workflow, encouraging the audience to adopt them for a more efficient coding experience. It also covers navigation shortcuts, line manipulation techniques, and file management commands, concluding with the powerful 'Ctrl + Shift + P' for accessing the command palette.
🔍 Browser Shortcuts for Enhanced Web Navigation
The second paragraph focuses on browser shortcuts that are crucial for programmers during web development and debugging. It starts with opening the developer tools using 'Ctrl + Shift + J' and includes shortcuts for managing tabs, such as opening a new tab with 'Ctrl + T' and closing the current tab with 'Ctrl + W'. The summary also covers navigation shortcuts like 'Alt + Left/Right' for browsing history, and 'Ctrl + L' for URL selection. Additionally, it mentions shortcuts for bookmarking, accessing history, and viewing downloads. The paragraph concludes with tips on page reloading, including cache management, and toggling the bookmark bar, all aimed at streamlining a programmer's web interaction.
Mindmap
Keywords
💡coding
💡VS Code shortcuts
💡productivity
💡terminal
💡multi-cursor
💡variable renaming
💡command palette
💡file navigation
💡markdown
💡browser shortcuts
💡developer tools
Highlights
Encouragement to learn VS Code shortcuts for increased productivity in coding
Opening a terminal in VS Code with Ctrl+J for quick project start
Cleaning up the terminal with Ctrl+L
Renaming variables efficiently with Ctrl+D for multiple occurrences
Using Ctrl+Shift+L to select all occurrences of a variable at once
Selecting the current line with Ctrl+L for faster editing
Navigating to the end/start of a line with End/Home keys or Fn+Right/Left
Moving lines up and down with Alt+Up/Down Arrow keys
Duplicating lines with Alt+Shift+Up/Down Arrow keys
Deleting words efficiently with Ctrl+Backspace or Ctrl+Delete
Deleting an entire line with Ctrl+Shift+K
Inserting cursors above or below the current line with Ctrl+Alt+Up/Down Arrow keys
Quick file search in VS Code with Ctrl+P
Navigating within a file using Ctrl+F
Saving files with Ctrl+S and all files with Ctrl+K, S
Closing files with Ctrl+W and all files with Ctrl+K, W
Reopening the last closed file with Ctrl+Shift+T
Accessing the command palette and executing commands with Ctrl+Shift+P
Folding and unfolding code blocks in VS Code
Reloading the VS Code window for fixing autocomplete issues
Toggling the sidebar with Ctrl+B and opening various sidebar tabs with specific shortcuts
Previewing markdown files in VS Code with Ctrl+Shift+V
Sharing browser shortcuts for developers, including opening dev tools with Ctrl+Shift+J
Navigating tabs in the browser with Ctrl+Tab and Ctrl+Shift+Tab
Using browser shortcuts for history, downloads, and bookmarking pages
Reloading pages and clearing cache with browser shortcuts
Toggling the bookmark bar in the browser with Ctrl+B
Challenge to use these shortcuts for two weeks to improve efficiency
Transcripts
Juniors be like dude I love coding and
I'll be spending my next 25 years as a
programmer but I'll not spend 15 minutes
to learn vs code shortcuts that will
make me productive hey don't be that guy
listen to me for the next 5 minutes and
you will let go with your mouse and feel
like a tenic engineer for the rest of
your life at first you might think I am
happy with my mouse and don't need any
shortcuts but once you learn these your
life will change forever well that
sounds too serious but that's really the
case and I want to prove that to you so
let's open up a vs code and go through
the list one by one the very first thing
you would need is to open up a terminal
to start your project and instead of
going all the way up clicking to the
terminal and new terminal simply just
press contrl J and you can toggle it as
well then let's say your terminal got a
bit messy you can clean it with crl L
when you decide to rename a variable
you'll want to update all occurrences
you can either update all of them one by
one which is kind of boring or you can
select the first one and press contrl D
until all selected and with this now you
have a multic cursor and it feels like
magic and there is even a grandfather of
contrl D which is contrl shift L which
selects all occurrences at once
selecting a line with mouse feels
terrible and slow instead you can press
contrl L to select the current line and
here is a bonus tip once you select a
line you can press shift down to keep
selecting downwards or shift up to keep
selecting upwards you can go to the end
of the line by pressing End Key and you
can go to the start of the line with
home key but if you don't have the end
or home keys on your keyboard you can
press FN right and FN left and as you
can imagine FN up and FN down will take
you to the start of the file and the end
of the file and sometimes you'll need to
move a line upwards or downwards press
alt and up key to move upwards and ALT
and down to downwards but wait how do
you duplicate the current line down um I
guess with alt shift and down and to
duplicate upwards alt shift and up and
when it comes to deleting with only
backspace you can delete a letter at a
time but if you press control in
backspace you will delete word by word
and if you want to delete from the right
then you can use the delete key but
again it'll delete a letter at a time so
you can press control and delete to
delete word by word and when you want to
delete a line completely you can select
it with contrl L and press backspace or
simply just press control shift and K
and it'll delete the current line you
can insert the cursor below the next
line by pressing control alt and down
and you can insert the cursor to the
previous line by pressing contrl alt and
up and as an alternative you can use alt
and click and insert as much cursor as
you want in a large project it can take
a long time to find a file from the
sitebar so instead you can press contrl
p and search for a file and in a large
file it can be hard to navigate so you
can press crlf and search for anything
when you want to save a file you can use
crl S and if you want to save all files
at once then you press contrl K and S
and you might want to close a file so go
ahead with contrl and W or you can press
crl K and W to close all of the them at
once but how do you reopen the last
closed file um I guess by pressing
control shift and T which works like a
stack the last in first out we learned
that if we press contrl P we will see
the command pallet and if we press
control shift p it'll put a right angle
bracket into it which allows us to do
almost anything that we can imagine
let's say in this file you want to fold
all the functions you can simply type it
and execute it and you can unfold them
as well another really useful command is
to reload the window sometimes vs code
doesn't give you Auto completes for some
reason and to fix it you would reload
the window from the command pallet and
then the auto completes should work now
and when it comes to the sidebar
shortcuts you can toggle it with contrl
b and you can open up the extensions tab
with contrl shift and x file explorer
tab with control shift and E and Source
control tab with control shift and G and
when you are working with markdown files
you can preview them directly in vs code
by pressing control shift and V and if
you want to preview them on the side
then you can press crl K and V which
wraps up the VS code shortcuts and if
you have made it up until here then
congratulations and now to even make you
faster I'll share some browser shortcuts
as a programmer the very first thing you
would do is to open up the dev tools
which can be done by control shift and J
to open up a new tab use contrl T and to
close the current tab use contrl W just
like vs code you can reopen the last
Clos tab with control shift and T with
contrl tab you can go to the next Tab
and with control shift tab you can go to
the previous one alt left will help you
go back in time and ALT right will help
you go forward in time use crln for a
fresh window and contrl shift n for an
incognito window control L will select
the URL contrl D will bookmark the
current page contrl H will take you to
the history and contrl J will show you
the downloads if you want to reload the
page you can do contrl R but if you want
to reload without using the cache then
you can use control shift R and the very
last shortcut is to toggle The Bookmark
tab with contrl B so that's going to be
the ultimate shortcuts that you need as
a programmer give it a try for the next
two weeks and let me know if you feel
any better I'm sure you do and if you
want to see more content like this give
me a sub and thumbs up thanks for
watching and I'll see you in the next
one
Ver Más Videos Relacionados
Don't Use a Mouse Anymore! VSCode Shortcuts Tips and Tricks
Master VS Code's keyboard shortcuts in 13 minutes
25 VS Code Productivity Tips and Speed Hacks
Top 10 Amazing Keyboard Shortcuts You Must Know ⚡ बन जाइये प्रो | August 2021
Sublime Text Goto Anything (Tutorial #3)
Linux Essentials For Hackers - #2 - Useful keyboard Shortcuts
5.0 / 5 (0 votes)