# Source

## Overview

This menu item is available only when a script editor is active.\
It provides various options related to code commenting, formatting, and navigation within the source code. It includes functions to toggle, add, and remove line and block comments, generate element comments, and correct indentation. Additionally, it offers options for formatting code and shifting lines left or right.

## Commands Summary

A summary of commands available via clicking on this menu item:

| Command                                               | Summary                                                            |
| ----------------------------------------------------- | ------------------------------------------------------------------ |
| [Toggle Line Comment](#toggle-line-comment)           | Comments / uncommnets the selected line                            |
| [Add Block Comment](#add-block-comment)               | Adds a block comment                                               |
| [Remove Block Comment](#remove-block-comment)         | Removes a block comment                                            |
| [Generate Element Comment](#generate-element-comment) | Generates the JSDoc comments for the selected variable or function |
| [Toggle Comment](#toggle-comment)                     | Comments / uncommnets the selected line / block                    |
| [Comment](#comment)                                   | Comments the selected line(s)                                      |
| [Uncomment](#uncomment)                               | Uncomments the selected line(s)                                    |
| [Correct Indentation](#correct-indentation)           | Corrects indentation for the selected lines                        |
| [Format](#format)                                     | Formats the script's content                                       |
| [Format Element](#format-element)                     | Formats the element                                                |
| [Shift Right](#shift-right)                           | Shifts the selected line(s) to the right                           |
| [Shift Left](#shift-left)                             | Shifts the selected line(s) to the left                            |

## Commands Details

The details for each command available via clicking on this menu item:

### Toggle Line Comment

keybinding: `Ctrl+Shift+C`\
Comments / uncommnets the selected line.

### Add Block Comment

keybinding: `Ctrl+Shift+/`\
Adds a block comment `/**/`.

### Remove Block Comment

keybinding: `Ctrl+Shift+\`\
Removes a block comment `/**/`.

### Generate Element Comment

keybinding: `Alt+Shift+J`\
When working with existing variables and functions, the SCript Editor has a function to automatically generate the JSDoc comments for the selected variable or function.

### Toggle Comment

keybinding: `Ctrl+7`\
Comments / uncommnets the selected line / block.

### Comment

Comments the selected line(s).

### Uncomment

Uncomments the selected line(s).

### Correct Indentation

keybinding: `Ctrl+I`\
Corrects indentation for the selected lines, for example the content of a method.

### Format

keybinding: `Ctrl+Shift+F`\
Formats the entire script content (line breaks, indentations, etc.).

### Format Element

Formats the element (line breaks, indentations, etc.).

### Shift Right

Shifts the selected line(s) to the right.

### Shift Left

Shifts the selected line(s) to the left.
