Skip to content

jeftegoes/VisualStudioTipsAndTricks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Visual Studio tips and tricks (Windows)

Contents

1. Text navigation - Part I

  • Ctrl to move the cursor one word at a time
  • End to move the cursor to the end of the line
  • Home to move the cursor to the beginning of the line

2. Text navigation - Part II

  • Page Down to scroll down
  • Page Up to scroll up
  • Ctrl + Home to jump to the beginning of the file
  • Ctrl + End to jump to the end of the file

3. Text selection

  • Shift to activate selection
  • Shift + Ctrl + Right/Left to select one word at a time
  • Shift + End to select from where the cursor is to the end of the line
  • Shift + Home to select from the beginning of the line to where the cursor is

4. Deleting text

  • Backspace to delete one character to the left of the cursor
  • Ctrl + Backspace to delete one word to the left of the cursor
  • Del to delete one character to the right of the cursor
  • Ctrl + Del to delete one word to the right of the cursor
  • Ctrl + L to delete the current line

5. Commenting code

  • Ctrl + K, Ctrl + C to mark the selection as a comment
  • Ctrl + K, Ctrl + U to remove the comment

6. Bookmarks

  • Ctrl + K, Ctrl + K to toggle a bookmark
  • Ctrl + W, B to view the Bookmarks window

7. Expanding / Collapsing

  • Ctrl + M, Ctrl + M to expand / collapse a code block

8. Tabs and windows

  • Ctrl + Tab to cycle through the open tabs
  • Ctrl + Shift + Tab to reverse cycle
  • Ctrl + F6 to go to the next tab
  • Ctrl + Shift + F6 to go to the previous tab
  • Ctrl + F4 to close the current tab
  • Alt + W + L to close all the open tabs
  • Ctrl + , to open the navigate dialog
  • Shift + Alt + Enter to toggle the full screen mode

9. Find and replace

  • Ctrl + F to display the Find dialog
  • Ctrl + Shift + F to display the Find in Files dialog
  • F3 to find the next occurrence of the search text
  • Shift + F3 to find the previous occurrence
  • Ctrl + H to display the Replace dialog
  • Alt + R to replace the currently selected occurrence
  • Alt + A to replace all occurrences of the search text

10. Running and debugging

  • Ctrl + F5 to run the application
  • F5 to run the application in the debug mode
  • Shift + F5 to stop the debugging session
  • F9 to insert or remove a breakpoint
  • F10 to step over a method
  • F11 to step into a method
  • Shift + F11 to step out of a method

11. Code snippets

  • class to create a class
  • ctor to create a constructor
  • prop to create an auto-implemented property
  • propfull to create a property with a private field
  • equals to override the Equals method of the base Object class
  • for to create a for loop
  • forr to create a for loop that decrements the loop variable
  • foreach to create a foreach loop
  • while to create a while loop
  • do to create a do loop
  • try to create a try/catch block
  • tryf to create a try/finally block
  • interface to create an interface

12. Formatting code

  • Tab to move the selection one tab stop to the right
  • Shift + Tab to move the selection one tab stop to the left
  • Ctrl + K, Ctrl + F to format the code

13. Compiling the application

  • Ctrl + Shift + B to build the application without running it
  • F8 to cycle through the errors
  • Alt + Tab to switch between the open applications
  • Ctrl + R to refresh the current page in the browser

14. Make Visual Studio (2022) use VsCode shortcut keys / key bindings

  • Tools -> Options -> Environment -> Keyboard VsCode shortcut keys

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published