# Organize your graph with groups, tidy and find

> Keep large Nodespell graphs readable with nested Groups, Tidy up and Layout mode, node colours, names and comments, and Find in graph to search and replace.

Source: https://docs.nodespell.com/graph/organize/ · Last updated: 2026-11-10

Nodespell gives you several ways to keep a graph readable as it grows. Groups frame related nodes, Tidy up and Layout mode arrange nodes for you, colours, names and comments label them, and Find in graph searches every node by name, comment or parameter. None of these change what the graph produces.

## Group related nodes

A Group is a coloured frame with a title that holds nodes together on the canvas. Moving a Group moves everything inside it.

1. Select the nodes you want to group.
2. Press `Cmd/Ctrl+G`, or right-click one of them and choose **Group Selected Nodes**.
3. Name the Group with **Rename** in the **Group options** menu in its header, and use the colour button in the header to pick a colour.

- Drag a node into a Group to add it; drag it out to remove it.
- Groups can be nested: drag a Group into a larger Group to organise in layers. A Group can only drop into a Group that is bigger than it.
- The **Group options** menu in the header has **Rename**, **Fit to contents** (shrink or grow the frame to its nodes), **Select contents** (select the Group and everything nested in it) and **Ungroup**.
- **Ungroup** removes the frame but keeps its nodes. In a nested Group, the nodes move up into the Group around it.

Groups are visual only; they do not change how nodes run. To hide part of a graph inside a single node, use a [Level or Folder](https://docs.nodespell.com/graph/levels-and-folders/) instead.

## Tidy up a messy graph

Press `L`, or choose **Layout** > **Tidy up** in the top bar. Tidy up arranges the selected nodes, or the whole Level if nothing is selected, with clearer branches and spacing that fits your nodes. Groups keep their contents, and separate clusters of connected nodes (islands) are spaced apart.

A message confirms how many nodes moved, for example **Tidied 9 of 12 nodes**, with **Undo** and **Adjust…**. The whole tidy is one undo step. If nothing needs to move, the message says **Already tidy**.

## Fine-tune layout in Layout mode

Layout mode treats the graph as a shape you can reshape while Nodespell keeps nodes from overlapping. Open it with `Shift+L`, **Layout** > **Layout mode**, or **Adjust…** after a tidy.

| Control                                              | What it does                                                                                             |
| ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| **Auto** dials: **Tidy**, **Islands**                | Tidy gradually, from **None** through **Light** and **Medium** to **Full layout**, and separate islands  |
| **Adjust** dials: **Spacing**, **Tension**, **Size** | Change gaps, straighten chains and scale node sizes; **Axis** limits spacing to along or across the flow |
| **Transform**                                        | Rotate 90° left or right, flip horizontally (`H`) or vertically (`V`)                                    |
| **Select by relationship**                           | **Upstream** (`U`), **Downstream** (`D`), **Island** (`I`)                                               |
| **Behaviour**                                        | **Push others**, **Allow overlap**, **Pack**, **Scale sizes**                                            |
| **Pin** (`P`)                                        | Keeps selected nodes fixed while others move                                                             |
| **Compare** and **Outlines**                         | Hold to compare with where you started; show outlines of the starting positions                          |

Arrow keys nudge the selection (`Shift` for bigger steps). `Cmd/Ctrl+Z` undoes one step inside Layout mode. Press `Enter` or select **Done** to keep the result as one undo step, or **Cancel** to restore the original. `Esc` cancels the current drag first, then clears the selection, then asks **Discard N changes?**.

## Colour, rename and comment nodes

Right-click a node to label it:

| Item             | Effect                                                                                                            |
| ---------------- | ----------------------------------------------------------------------------------------------------------------- |
| **Node Colour**  | Sets the colour of the node, or of every selected node, from common colours, **More colours**, or a custom colour |
| **Rename Node**  | Renames the node. With several selected, enter one base name and Nodespell adds suffixes to keep names unique     |
| **Edit Comment** | Adds a note saved with the node. Comments show on the canvas when **Node Comment** is on in **View Settings**     |

In light mode, node colours are lightened on the canvas so nodes stay readable; your chosen colour is unchanged. Dots can carry short labels too; see [Connect nodes](https://docs.nodespell.com/graph/connections/).

## Find nodes with Find in graph

1. Press `Cmd/Ctrl+F` to open **Find in graph**.
2. Type part of a node name, a comment or a parameter value. Name matching is forgiving, so `hrpr` can find **Hero Prompt**.
3. Use the arrow keys to move through matches and press `Enter`, or click **Go to**, to jump to a node. Nodespell opens the node's Level and frames it.

| Option              | Choices                                                               |
| ------------------- | --------------------------------------------------------------------- |
| Inside the field    | **Match case**, **Whole word**, **Regular expression**                |
| **Where to search** | **Project**, **This level** (and the Levels inside it), **Selection** |
| **What to search**  | **Everything**, **Names**, **Comments**, **Parameters**               |

Up to 400 matches are listed; narrow the search to see the rest. In a large project, project-wide search covers names and folder paths straight away; select **Load full project** to include comments and parameters.

## Replace text across the graph

Press `Cmd/Ctrl+Shift+F`, or select **Replace** in Find in graph. Every match shows the text it will become. Untick any match you want to keep, then press `Enter` in the replace field to replace the highlighted match, or `Cmd/Ctrl+Enter` to replace every ticked match.

A replace-all is a single undo step. Numbers and on/off values are not replaced, and prompts that contain references must be edited in the prompt editor. Expressions are searched and replaced in their expression text.

## Frequently asked questions

### Does grouping nodes change how they run?

No. Groups only frame nodes on the canvas. Use a Level when you want a self-contained piece of graph with its own inputs and outputs.

### Can I undo Tidy up?

Yes. Each tidy is one undo step: press `Cmd/Ctrl+Z` or select **Undo** in the message.

### Does Find in graph search other Levels?

Yes. Set **Where to search** to **Project** to search every Level, or **This level** for the current Level and those inside it.

### What is the difference between Tidy up and Layout mode?

Tidy up arranges the selection or Level in one step at full strength. Layout mode lets you dial the amount, reshape, pin and push nodes by hand, and keeps all of it as one undo step when you select **Done**.

## Related

- [Navigate the Graph Editor](https://docs.nodespell.com/graph/graph-editor/): select, align and frame nodes
- [Levels and Folders](https://docs.nodespell.com/graph/levels-and-folders/): nest parts of the graph
- [Connect nodes](https://docs.nodespell.com/graph/connections/): Dots and tidy connections
- [Keyboard shortcuts](https://docs.nodespell.com/reference/shortcuts/): every layout key
