# VS hotkeys

{% embed url="<https://learn.microsoft.com/en-us/visualstudio/ide/default-keyboard-shortcuts-in-visual-studio?view=vs-2022>" %}

## Configure Keyboard Shortcuts

&#x20;`Tools → Options; Environment → Keyboard`

## Navigation

<table><thead><tr><th width="366">Description</th><th>Hotkey</th></tr></thead><tbody><tr><td>Feature search</td><td>Ctrl + Q</td></tr><tr><td>Go to declaration / definition</td><td>F12</td></tr><tr><td>Peek declaration / definition</td><td>Alt + F12</td></tr><tr><td>Navigate backward / forward</td><td>Ctrl + - / Ctrl + Shift + -</td></tr><tr><td>Back to beginning</td><td>Ctrl + Shift + Backspace</td></tr><tr><td>Toggle header code file</td><td>Ctrl + K,  Ctrl + O</td></tr><tr><td>Go to line</td><td>Ctrl + G</td></tr><tr><td>Search</td><td>Ctr + F / Ctrl + Shift + F</td></tr><tr><td>Replace</td><td>Ctr + H / Ctrl + Shift + H</td></tr><tr><td>Code search</td><td>Ctrl + Shift + T</td></tr><tr><td>Find all references</td><td>Shift + F12</td></tr><tr><td>Toggle bookmark</td><td>Ctrl + K,  Ctrl + K</td></tr><tr><td>Next bookmark</td><td>Ctrl + K, Ctrl + N</td></tr><tr><td>Previous bookmark</td><td>Ctrl + K, Ctrl + P</td></tr><tr><td>Show solution explorer</td><td>Ctr + Alt + L</td></tr><tr><td>Focus file in solution explorer</td><td>Ctrl + [, S</td></tr><tr><td>Next document window nav</td><td>Ctrl + Tab</td></tr></tbody></table>

## Code editing and refactoring

| Description                      | Hotkey                              |
| -------------------------------- | ----------------------------------- |
| Auto complete                    | Tab                                 |
| Quick actions                    | Ctrl + .                            |
| Format document                  | Ctrl + K, Ctrl + D                  |
| Duplicate line                   | Ctrl + D                            |
| Cut line                         | Ctrl + X                            |
| Delete line (without copying it) | Ctrl + Shift + L                    |
| Comment / uncomment              | Ctrl + K, Ctrl + C / U              |
| Move line or selection up (down) | Alt + Arrow Up (Arrow Down)         |
| Add line above (below)           | Ctrl + Enter / Ctrl + Shift + Enter |
| Make uppercase                   | Ctrl + Shift + U                    |
| Make lowercase                   | Ctrl + U                            |
| Paste from keyboard buffer ring  | Ctrl + Shift + V                    |
| Surround with snippet            | Ctrl + K, S                         |
| Multiply cursors                 | Alt + Ctrl + mouse click            |
| Vertical selection               | Alt + mouse move                    |
| Create constructor               | ctor                                |
| Create for loop body             | for, forr, rfor                     |
| Create class                     | class, classi                       |
| Refactoring suggestions          | Alt + Enter                         |
| Extract method                   | Ctrl + R, M                         |
| Rename symbol                    | Ctrl + R, R                         |

## Debugging

| Description            | Hotkey                   |
| ---------------------- | ------------------------ |
| Build                  | Ctrl + B                 |
| Debug                  | F5                       |
| Run without debugging  | Ctrl + F5                |
| Stop                   | Shift + F5, Ctrl + Break |
| Step over              | F10                      |
| Step into              | F11                      |
| Step out               | Shift + F11              |
| Attach to process      | Ctrl + Alt + P           |
| Call stack             | Ctrl + Alt + C           |
| Delete all breakpoints | Ctrl + Shift + F9        |
| Watch 1                | Ctrl + Alt + W, 1        |
| Show output explorer   | Ctrl + Alt + O           |

## Editor

| Description             | Hotkey             |
| ----------------------- | ------------------ |
| Show whitespaces        | Ctrl + R, Ctrl + W |
| Open powershell menu    | Ctrl + \~          |
| Zoom in, zoom out       | Ctrl + mouse wheel |
| Collapse to definitions | Ctrl + M, O        |
| Expand / collapse block | Ctr + M, M         |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lifeexe-art.gitbook.io/lifeexe/software/ide/vs-hotkeys.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
