20 Must-Know Visual Studio Shortcuts for Developers

preview_player
Показать описание
In this video, we're exploring 20 essential shortcuts in Visual Studio that will make you a more efficient coder. Master these shortcuts to speed up your workflow and enhance your productivity.

🔍 Chapters:
0:00 Intro
0:29 CTRL + K C and CTRL + K U - Comment and uncomment code efficiently.
0:35 CTRL + K D - Format your document quickly.
0:56 CTRL + , and CTRL + Q - Navigate your code with ease.
2:00 CTRL + G - Go to a specific line number.
2:10 ALT + / - Quick access to IntelliSense suggestions.
2:23 CTRL + K S - Insert a snippet.
2:43 CTRL + R CTRL + R - Rename variables and more.
3:09 PROP TAB and CTOR TAB - Auto-generate properties and constructors.
3:27 CTRL + L and CTRL + SHIFT + TAB - Advanced navigation.
3:52 ALT + UP and ALT + DOWN - Move lines up or down.
4:02 CTRL + ALT + B - Build your solution.
4:28 CTRL + SHIFT + F9 - Remove breakpoints.
4:48 CTRL + M + O, CTRL + M M, and CTRL + M P - Manage code folding.
5:04 CTRL + R W - Refactor and extract method.
5:18 Conclusion

📘 Learn More:

#microsoft #visualstudio
Рекомендации по теме
Комментарии
Автор

Ctrl+click: go to definition
Ctrl+Shift+Space: show method arguments
Ctrl+dot: refactoring
Ctrl+Shift+V: ring clipboard

Glebka
Автор

Shortcuts for multi caret and column selection are awesome and pushed my productivity.

holzbin
Автор

Using most of them waiting for next one ❤

chandruts.
Автор

Excellent! I use most of them but the CTRL + ALT + B was new. Gonna use that for sure. I use SHIFT + ALT + and then arrows to extend the marker to multiple lines. Use that all the time when populating XAML objects.

BobChevy
Автор

will you ever release a linux version ?

xgui-studios
Автор

Two caveats: You need to declare which keyboard mapping scheme you're using since some shortcuts won't work as you've described; and, not every user can use the Copilot shortcuts (e.g. those without a paid subscription). And, I'm pretty sure that ctrl-space within the rename function dialog is Copilot not IntelliSense.

ddm
Автор

Some more of my favs:

Find/Replace:
Ctrl+F: open Find dialog
Ctrl+H: open Replace dialog
F3: go to next find result
Shift+F3: go to previous find result
Alt+R: replace current find result
Alt+A: replace all

And navigating between errors/warnings:
Ctrl+PgUp/PgDn: navigate up/down between errors/warnings

And multi-caret editing to make you feel like a god:
Alt+Ctrl+Click: add a caret
Shift+Alt+Click: add carets to all lines between last and current, on same column
Shift+Alt+Up/Down: add caret to line above/below

Rabadash
Автор

I use Ctrl+X (left hand only, convenient when right hand is on mouse) to delete a whole line in Visual Studio. Is Ctrl+L (must use right-hand) for left-handled folks?

davidhowell
Автор

Naming things can be hard. Lol... I have encountered times when I take more time to come up with an object name vs actual coding.

lilcaesarman
Автор

Ctrl-/ toggles a line comment (although I may have set that myself)
Ctrl-Shift-/ toggles a block comment - can be part of a line - vey handy...

amertonnz
Автор

I use comment line so much I've made it Ctrl+E, Ctrl+C, same with uncomment. That way I can do the entire hotkey with just 1 hand. I've moved/added several other hotkeys to start with Ctrl+E.

phizc
Автор

Frequent usage the following one's
CTRL + K C and CTRL + K U - Comment and uncomment code efficiently.
CTRL + K D - Format your document quickly.
CTRL + Q - Navigate your code with ease.
CTRL + G - Go to a specific line number.
ALT + / - Quick access to IntelliSense suggestions.
CTRL + K S - Insert a snippet.
PROP TAB and CTOR TAB - Auto-generate properties and constructors.
ALT + UP and ALT + DOWN - Move lines up or down.
CTRL + ALT + B - Build your solution.
CTRL + SHIFT + F9 - Remove breakpoints.
CTRL + R W - Refactor and extract method.

Very rare, I am using the following one's,
CTRL +,
CTRL + R CTRL + R - Rename variables and more.
CTRL + L and CTRL + SHIFT + TAB - Advanced navigation.
CTRL + M + O, CTRL + M M, and CTRL + M P - Manage code folding.

nuthanmurari
Автор

I would also mention CTRL+G - jump to line. The one that is missing but can be brought with CodeMaid extension is CTRL+M+F - it shows current class (file) in solution explorer

pawegruba
Автор

Bookmarks:
Ctrl + K + K - set a bookmark
Ctrl + K + N - go to the next one

TheAlexMistery
Автор

I missed the one-button cut, copy, paste from the old days with the Brief editor so I reassigned:
F1= copy
F2 = paste
F4 = cut

Also:
CTRL+ E + F I use a lot to format selection
CTRL + K + O to open up the corresponding .h or .cpp file (for C++)
I reassigned ALT + < and ALT + > to move a file between two document groups. I always have two vertical document groups open.

jimhewes
Автор

you can just do Ctrl + / instead of Ctrl + K Ctrl + C or Ctrl + K Ctrl + U in newer versions of visual studio (i think from 17.11 onward) to toggle comment

ghaznavipc
Автор

• Shift+Delete — delete the line
• Ctrl+D — duplicate the line
• Shift+Alt+L — go to the file in Solution Explorer

tommaple
Автор

Ctrl+Space after Ctrl+R, Ctrl+R didn’t work for me. Instead the space was inserted.

martinprohn
Автор

Solution explorer search crtl + ; is still my favourite

jamiechura
Автор

my Visual studio not giving me suggestions @ 2:50

StressedProgrammer