100+ Visual Studio Code Shortcuts for Mac and Windows

Please Subscribe to our YouTube Channel

visual-studio-logo

Visual Studio is a powerful integrated development environment (IDE) that offers a wide range of features and tools to help developers be more productive and efficient. One of the most important and valuable features of Visual Studio is the vast array of keyboard shortcuts that are available.

Shortcuts can help developers navigate, search, and edit code more quickly and with fewer clicks. They can also help developers reduce the amount of time spent switching between mouse and keyboard, which can lead to a more fluid and efficient workflow. Using shortcuts can also help developers reduce the risk of repetitive stress injuries such as carpal tunnel syndrome. By minimizing the amount of time spent performing repetitive mouse clicks and movements, developers can reduce strain on their wrists and hands, making it less likely that they will develop these types of injuries.

Additionally, it helps developers be more consistent and accurate when performing tasks such as refactoring or navigating through code. By using keyboard shortcuts, developers can ensure that they are performing tasks correctly and consistently, which can lead to a higher quality of code and a more efficient development process. It will help you to become more productive, efficient, and accurate in your coding tasks. By taking the time to learn and use shortcuts, developers can streamline their workflow, improve their coding accuracy, and reduce the risk of repetitive stress injuries.

Here is a list of 100+ Visual Studio Hack to Help You Stay Productive and Save Time

  • Collapse all regions:
    Ctrl + M + O (Windows) / Cmd + Option + [ (Mac)
  • Expand all regions:
    Ctrl + M + P (Windows) / Cmd + Option + ] (Mac)
  • Toggle word wrap:
    Alt + Z (Windows) / Option + Z (Mac)
  • Move selected lines up or down:
    Alt + Up or Down (Windows) / Option + Up or Down (Mac)
  • Highlight matching words:
    Ctrl + Shift + * (Windows) / Cmd + Shift + * (Mac)
  • Navigate to previous bookmark:
    Ctrl + K + P (Windows) / Cmd + K + P (Mac)
  • Rename a symbol:
    F2 (Windows) / Fn + Return (Mac)
  • Expand all regions:
    Ctrl + M + P (Windows) / Cmd + Option + ] (Mac)
  • Navigate to previous bookmark:
    Ctrl + K + P (Windows) / Cmd + K + P (Mac)
  • Duplicate current line:
    Ctrl + D (Windows) / Cmd + D (Mac)
  • Comment or uncomment selected lines:
    Ctrl + K + C (Windows) / Cmd + K + C (Mac)
  • Delete current line:
    Ctrl + Shift + L (Windows) / Cmd + Shift + L (Mac)
  • Navigate to next bookmark:
    Ctrl + K + N (Windows) / Cmd + K + N (Mac)
  • Navigate to previous bookmark:
    Ctrl + K + P (Windows) / Cmd + K + P (Mac)
  • Navigate to definition:
    F12 (Windows) / F12 (Mac)
  • Open code definition in Peek view:
    Alt + F12 (Windows) / Option + F12 (Mac)
  • Organize usings for entire project:
    Ctrl + Shift + O (Windows) / Cmd + Shift + O (Mac)
  • Format selected code:
    Ctrl + K + D (Windows) / Cmd + K + D (Mac)
  • Toggle breakpoint condition:
    Ctrl + Alt + B (Windows) / Cmd + Option + B (Mac)
  • Step into:
    F11 (Windows) / F11 (Mac)
  • Step over:
    F10 (Windows) / F10 (Mac)
  • Step out:
    Shift + F11 (Windows) / Shift + F11 (Mac)
  • Run to cursor:
    Ctrl + F10 (Windows) / Cmd + F10 (Mac)
  • Go to last cursor position:
    Ctrl + Shift + F5 (Windows) / Cmd + Shift + F5 (Mac)
  • Organize usings for entire project:
    Ctrl + Shift + O (Windows) / Cmd + Shift + O (Mac)
  • Surround selected text with parentheses:
    Ctrl + ( (Windows) / Cmd + ( (Mac)
  • Open the Object Browser:
    Ctrl + W + J (Windows) / Cmd + W + J (Mac)
  • Open the Class View:
    Ctrl + W + C (Windows) / Cmd + W + C (Mac)
  • Navigate to previous bookmark:
    Ctrl + K + P (Windows) / Cmd + K + P (Mac)
  • Go to line number:
    Ctrl + G (Windows) / Cmd + G (Mac)
  • Surround selected text with quotes:
    Ctrl + Shift + ' (Windows) / Cmd + Shift + ' (Mac)
  • Move to last edit location:
    Ctrl + Shift + Backspace (Windows) / Cmd + Shift + Backspace (Mac)
  • Move to last cursor position:
    Ctrl + Shift + F5 (Windows) / Cmd + Shift + F5 (Mac)
  • Find all references:
    Shift + F12 (Windows) / Shift + F12 (Mac)
  • Navigate to next/previous method:
    Alt + Up or Down (Windows) / Option + Up or Down (Mac)
  • Go to previous/next error:
    F8 / Shift + F8 (Windows) / F8 / Shift + F8 (Mac)
  • Show call hierarchy:
    Ctrl + K + T (Windows) / Cmd + K + T (Mac)
  • Format document:
    Ctrl + K + Ctrl + D (Windows) / Cmd + K + Cmd + D (Mac)
  • Close all open documents:
    Ctrl + Shift + Alt + W (Windows) / Cmd + Shift + Option + W (Mac)
  • Go to matching brace:
    Ctrl + ] (Windows) / Cmd + ] (Mac)
  • Remove unused references:
    Ctrl + R + G (Windows) / Cmd + R + G (Mac)
  • Find in files:
    Ctrl + Shift + F (Windows) / Cmd + Shift + F (Mac)
  • Find and replace:
    Ctrl + Shift + H (Windows) / Cmd + Shift + H (Mac)
  • Go to previous/next change:
    Ctrl + Shift + F3 / F4 (Windows) / Cmd + Shift + F3 / F4 (Mac)
  • Insert snippet:
    Ctrl + K + X (Windows) / Cmd + K + X (Mac)
  • Indent selected lines:
    Ctrl + ] (Windows) / Cmd + ] (Mac)
  • Unindent selected lines:
    Ctrl + [ (Windows) / Cmd + [ (Mac)
  • Find all in current document:
    Ctrl + F2 (Windows) / Cmd + F2 (Mac)
  • Align selected code:
    Ctrl + K + F (Windows) / Cmd + K + F (Mac)
  • Open command window:
    Ctrl + Alt + A (Windows) / Cmd + Option + A (Mac)
  • Navigate to previous bookmark:
    Ctrl + K + P (Windows) / Cmd + K + P (Mac)
  • Organize usings for entire project:
    Ctrl + Shift + O (Windows) / Cmd + Shift + O (Mac)
  • Add or remove a breakpoint:
    F9 (Windows) / F9 (Mac)
  • Format selected code:
    Ctrl + K + D (Windows) / Cmd + K + D (Mac)
  • Comment or uncomment current line:
    Ctrl + / (Windows) / Cmd + / (Mac)
  • Rename all occurrences of a symbol:
    Ctrl + Shift + Alt + F10 (Windows) / Cmd + Shift + Option + F10 (Mac)
  • Move line up/down:
    Alt + Up/Down (Windows) / Option + Up/Down (Mac)
  • Toggle breakpoint:
    F9 (Windows) / F9 (Mac)
  • Show command palette:
    Ctrl + Shift + P (Windows) / Cmd + Shift + P (Mac)
  • Open terminal:
    Ctrl + ` (Windows) / Cmd + ` (Mac)
  • Rename a symbol:
    F2 (Windows) / Fn + Return (Mac)
  • Navigate to previous bookmark:
    Ctrl + K + P (Windows) / Cmd + K + P (Mac)
  • Find and replace:
    Ctrl + Shift + F (Windows) / Cmd + Shift + F (Mac)
  • Format selected code:
    Ctrl + K + D (Windows) / Cmd + K + D (Mac)
  • Navigate to previous bookmark:
    Ctrl + K + P (Windows) / Cmd + K + P (Mac)
  • Navigate to previous/next method:
    Alt + Up or Down (Windows) / Option + Up or Down (Mac)
  • Open the Quick Fix menu:
    Ctrl + . (Windows) / Cmd + . (Mac)
  • Generate code:
    Ctrl + . (Windows) / Cmd + . (Mac)
  • Move a line up or down:
    Alt + Up or Down (Windows) / Option + Up or Down (Mac)
  • Rename a file:
    F2 (Windows) / Fn + Return (Mac)
  • Delete current word:
    Ctrl + Backspace (Windows) / Option + Delete (Mac)
  • Move the cursor to the beginning or end of a line:
    Home or End (Windows/Mac)
  • Move the cursor to the beginning or end of a file:
    Ctrl + Home or End (Windows) / Cmd + Up or Down (Mac)
  • Show IntelliSense:
    Ctrl + Space (Windows) / Ctrl + Space (Mac)
  • Quick Info:
    Ctrl + K + I (Windows) / Cmd + Option + I (Mac)
  • Find and replace:
    Ctrl + F (Windows) / Cmd + F (Mac)
  • Copy a line:
    Ctrl + C (Windows) / Cmd + C (Mac)
  • Paste a line:
    Ctrl + V (Windows) / Cmd + V (Mac)
  • Open the task list:
    Ctrl + Alt + K (Windows) / Cmd + Alt + K (Mac)
  • Create a new file:
    Ctrl + N (Windows) / Cmd + N (Mac)
  • Close all open documents:
    Ctrl + Shift + F4 (Windows) / Cmd + Shift + W (Mac)