Source Menu actions
| Name | Function | Keyboard Shortcut |
|---|---|---|
| Toggle Comment | Adds or removes single-line, C++-style, comment markers on each line in the selection, or the line containing the cursor, if there is no selection | Ctrl+/ |
| Add Block Comment | Adds a block comment around the selection | Ctrl+Shift+/ |
| Remove Block Comment | Removes the comment markers around any block comments in the selection | Ctrl+Shift+\ |
| Shift Right | Increases indentation on each line in the selection, or the line containing the cursor, if there is no selection | |
| Shift Left | Decreases indentation on each line in the selection, or the line containing the cursor, if there is no selection | Shift+Tab |
| Correct Indentation | Applies simple indentation rules to the current selection, or the line containing the cursor, if there is no selection | Ctrl+I |
| Format | Applies the full
C/C++ > Code Style > Formatter
preferences to the entire contents of the active editor, or to the
selection if there is one
|
Ctrl+Shift+F |
| Add Include | Adds an include statement and, optionally, a "using" declaration for the currently selected name | Ctrl+Shift+N |
| Organize Includes | Adds all the required includes for the selected file | |
| Sort Lines | Sorts the selected lines | Ctrl+Alt+S |
| Implement Method... | Opens the Implement Method dialog | |
| Generate Getters and Setters... | Opens the Generate Getters and Setters dialog that allows you to create Getters and Setters for fields in the current type. Available on fields and types or on a text selection inside a type | |
| Surround With | Surrounds the selected statements with
a code template (as defined in
C/C++ > Editor > Templates
)
|
Alt+Shift+Z |
C/C++ > Code Style > Formatter