> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flexagon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Working with the Code Editor

> About the Editor The Code Editor used throughout FlexDeploy Next Generation is built from the by Microsoft, the popular editor that also powers VS Cod

## About the Editor

The Code Editor used throughout FlexDeploy Next Generation is built from the [Monoco Editor](https://microsoft.github.io/monaco-editor/) by Microsoft, the popular editor that also powers **VS Code**. This means that the majority of commands and shortcuts you use in VS Code will also work here.

For those unfamiliar a brief description of the layout components is described below:

![Code Editor Layout](https://mintcdn.com/flexagon-llc-ce77a95c/NkeZh5D-Nf8j_WaD/images/fd111/12590922696.png?fit=max\&auto=format\&n=NkeZh5D-Nf8j_WaD\&q=85\&s=98608c99b699a7b52b9fbfcce8f32ebf)

1. **Fullscreen** toggle - Clicking this will take you to a full screen view, clicking while in full screen will restore the editor to its normal dimensions

2. **MiniMap** display - A mini preview of the entire file you are currently editing. This can be useful to quickly navigate around larger code blocks.

3. **The Editor** - …For editing

> [!NOTE]
>
> Depending upon the context of the Code Editor you may find additional buttons and features along the toolbar.

## Saving your Code

Often times you may want to save your work while editing but not actually publish your changes. In this case simply hit **ctrl+s** while in the editor to save the contents locally. After doing so you will see a marker in the toolbar:

![Code Editor Local Saving](https://mintcdn.com/flexagon-llc-ce77a95c/NkeZh5D-Nf8j_WaD/images/fd111/12590922693.png?fit=max\&auto=format\&n=NkeZh5D-Nf8j_WaD\&q=85\&s=02579a50cca477250af0da1d5a721ccd)

Your changes are now saved and you can freely leave the application and your changes will be loaded when you return. If at any point you want to revert your changes simply click the undo button in the local save banner.

> [!WARNING]
>
> To actually publish the code you must **hit the SAVE button** on the page.

## Shortcuts Worth Knowing

<table><colgroup><col /><col /></colgroup><tbody><tr><th>Keyboard Shortcut</th><th>Description</th></tr><tr><td>Ctrl + Space</td><td>Brings up the suggestion menu. **Hitting Ctrl + Space again while the menu is open will toggle suggestion descriptions**![Image](https://mintcdn.com/flexagon-llc-ce77a95c/NkeZh5D-Nf8j_WaD/images/fd111/12590922699.png?fit=max\&auto=format\&n=NkeZh5D-Nf8j_WaD\&q=85\&s=8d75c5fa76a9db233582efdbc7a0eb89)![Image](https://mintcdn.com/flexagon-llc-ce77a95c/NkeZh5D-Nf8j_WaD/images/fd111/12590922702.png?fit=max\&auto=format\&n=NkeZh5D-Nf8j_WaD\&q=85\&s=8b78aeb02a96d770246ad320a21c0b85)\
</td></tr><tr><td>Ctrl + Shift + Space</td><td>Brings up function argument help. Needs to be used while editing function arguments.![Image](https://mintcdn.com/flexagon-llc-ce77a95c/NkeZh5D-Nf8j_WaD/images/fd111/12590922705.png?fit=max\&auto=format\&n=NkeZh5D-Nf8j_WaD\&q=85\&s=233f407554ef5fee260b6c0f13d3a367)</td></tr><tr><td>F1</td><td>Show command palette. The palette shows all available commands and their keyboard shortcuts.Note that not all commands listed may be enabled.</td></tr></tbody></table>

# Script History

For some code editors throughout FlexDeploy, you can view the script history by clicking the clock icon at the top right corner of the editor if it is present.

![image-20250403-202458.png](https://mintcdn.com/flexagon-llc-ce77a95c/NkeZh5D-Nf8j_WaD/images/fd111/12590922708.png?fit=max\&auto=format\&n=NkeZh5D-Nf8j_WaD\&q=85\&s=ddfcc3f0a8f68fc315d731ce206a6b77)

This will open a popup that allows you to view previously saved versions of the current code editor.

![image-20250403-203705.png](https://mintcdn.com/flexagon-llc-ce77a95c/NkeZh5D-Nf8j_WaD/images/fd111/12590922711.png?fit=max\&auto=format\&n=NkeZh5D-Nf8j_WaD\&q=85\&s=55204a8c5fbda641cc40509c7a74d7f0)

By default, the editor compares the current state of the code with the previously saved version. However, you can compare different versions by using the version selectors on the left and right sides of the toolbar.

![image-20251008-174031.png](https://mintcdn.com/flexagon-llc-ce77a95c/NkeZh5D-Nf8j_WaD/images/fd111/12590922717.png?fit=max\&auto=format\&n=NkeZh5D-Nf8j_WaD\&q=85\&s=d46362768ea59f7b1fdc5939d2d6158e)

Clicking either of the Restore buttons will load the selected version's script content into the code editor. You can then make any necessary changes to the code and save it, creating a new version that will be stored in the script history.
