Create and Edit Code
In this section:
- Editor Basics
- Coding Assistance
- Code Completion (IntelliSense)
- Typing Assistance
- Complete Statement
- Color Assistance
- Context Actions
- Regular Expressions Assistance
- Language Injections in C#
- Language Injections in Web Languages
- Inlay Hints
- Parameter Information
- Quick Documentation
- Highlight Matching Delimiters
- Rearrange Code Elements
- Duplicate Line or Selection
- Split Lines containing String Literals
- Add and Remove #region Blocks
- Comment and Uncomment Code
- Smart Paste
- CamelHumps
- Code Generation
- Generate Code from Usage
- Generate Null-Checking Routines
- Generate Code with Code Completion
- Generate GUIDs
- Generate Type Members
- Generate Deconstructors
- Generate Delegating Members
- Generate Dispose Pattern
- Generate Equality Comparer
- Generate Equality Members
- Generate Formatting Members
- Generate Partial Methods
- Generate Properties
- Generate Relational Comparer
- Generate Relational Members
- Generate Type Constructors
- Implementing/Overriding Members
- Localization Assistance
- Using Templates to Create Code
- Design Windows Forms
- Comparing files
You can use the following shortcuts for basic editing tasks:
Command | Shortcut |
---|---|
Select All | Ctrl+A |
Move Caret to Previous Word with Selection | Ctrl+Shift+Left |
Move Caret to Next Word with Selection | Ctrl+Shift+Right |
Move Caret to Page Top with Selection | Ctrl+Shift+Page Up |
Move Caret to Page Bottom with Selection | Ctrl+Shift+Page Down |
Extend Selection | Ctrl+Alt+Right |
Shrink Selection | Ctrl+Alt+Left |
Add Selection for Next Occurrence | Alt+J |
Copy | Ctrl+C |
Cut | Ctrl+X |
Paste | Ctrl+V |
Paste without Formatting | Ctrl+Shift+Alt+V |
Paste from History... | Ctrl+Shift+V |
Duplicate Line or Selection | Ctrl+D |
Copy Paths | Ctrl+Shift+C |
Save All | Ctrl+Shift+S |
Undo | Ctrl+Z |
Indent Selection | Tab |
Unindent Line or Selection | Shift+Tab |
Move Line Up | Shift+Alt+Up |
Move Line Down | Shift+Alt+Down |
Start New Line | Shift+Enter |
Start New Line Before Current | Ctrl+Enter |
Delete Line | Ctrl+Shift+L |
Toggle Case | Ctrl+Shift+U |
New Scratch File | Ctrl+Shift+Alt+Insert |
And here are shortcuts for advanced code editing helpers:
Command | Shortcut |
---|---|
Show Action List | Alt+Enter |
Basic Completion | Ctrl+Space |
Smart Completion | Ctrl+Alt+Space |
Second Basic Completion | Shift+Alt+Space |
Complete Current Statement | Ctrl+Shift+Enter |
Parameter Info | Ctrl+Shift+Space |
Quick Documentation | Ctrl+Shift+F1 |
Move Statement Up | Ctrl+Shift+Alt+Up |
Move Statement Down | Ctrl+Shift+Alt+Down |
Move Statement Left | Ctrl+Shift+Alt+Left |
Move Statement Right | Ctrl+Shift+Alt+Right |
Comment/uncomment with Line Comment | Ctrl+Alt+/ |
Comment/uncomment with Block Comment | Ctrl+Shift+/ |
Generate... | Alt+Insert |
Code Cleanup... | Ctrl+E, C |
Silent Code Cleanup | Ctrl+E, F |
Last modified: 16 April 2020