# Code

The **Code** tab provides direct access to view and edit your auto-generated **Terraform** code. This feature is ideal for users who prefer code-centric workflows or need to make quick adjustments.

### Key Features

* **File Selector:** Switch between different **Terraform** files *<mark style="color:$primary;">(main.tf, variables.tf, outputs.tf, etc.).</mark>*
* **Syntax Highlighting:** Full Terraform HCL syntax support.
* **Code Validation:** Real-time validation with error reporting.
* **Keyboard Shortcuts**:
  * `CMD/CTRL+S` - Save changes.
  * `CMD/CTRL+F` - Search.
  * `CMD/CTRL+H` - Find and replace.
  * `CMD/CTRL+SHIFT+R` - Discard changes.

{% hint style="warning" %}
Changes made in the code editor are bidirectional - they update both the code and the visual diagram. However, some limitations apply to preserve Brainboard's structured approach.
{% endhint %}

{% hint style="info" %}
Learn more about code editing in [Code Edition](https://docs.brainboard.co/cloud-design/code-edition).
{% endhint %}
