Midio docs
  • Getting Started
    • Welcome
    • Quick Start Guide
  • Your First Midio App
  • Guides
    • HTTP
      • Making HTTP Requests
      • Responding to HTTP Requests
      • How to reach your own endpoints
      • CORS
      • Server-Sent Events (SSE)
    • Branching
    • Loops
    • Map, filter, reduce
    • Working with Data
    • Expressions
    • Building Agents
      • Streaming Agent API (experimental)
    • Debugging
    • Secrets and Environment variables
    • Convert JSON to data nodes
    • Writing tests
    • Cleaning up your flows
  • Package Manager
  • Integrating with third party services
  • Troubleshooting
  • Tutorials
    • Connecting LLMs to MCP-servers using the MCP-client package
    • Making Your Own MCP Server in Midio
    • A Fast Path to Functional RAG Agents
    • How to build a streaming agent using Server-Sent Events (SSE)
  • Reference
    • The Midio Editor
      • The Node Editor
      • User Traces
      • Traces (execution)
      • Processes
      • Log
      • Services
      • Problems
      • Function Signature
      • Data
      • Settings
    • The Midio Language
      • Nodes and execution
      • Functions and Events
        • Anonymous functions
      • Modules
      • Contexts
      • Data type
      • Local variables
      • Portals
      • Waypoint node
      • Partial function application
  • The Midio Engine
  • Built in Nodes
    • Core (std)
    • HTTP
    • LLM
Powered by GitBook
On this page
  • Aligning nodes
  • Distribute nodes
  • Aligning arrows
  • Group nodes by converting them to a function

Was this helpful?

Edit on GitHub
  1. Guides

Cleaning up your flows

Midio contains a bunch of commands for aligning and distributing nodes and arrows that help with making your node graphs tidier.

PreviousWriting testsNextPackage Manager

Last updated 2 months ago

Was this helpful?

Aligning nodes

The selected nodes can be aligned to the top, bottom, right or left by using the using shift-w/a/s/d

  • shift-w - align top

  • shift-s - align bottom

  • shift-a - align left

  • shift-d - align right

Distribute nodes

The selected nodes can be distributed vertically or horizontally using shift-q/e.

  • shift-q - distribute horizontally

  • shift-e - distribute vertically

Aligning arrows

You can also align on arrows, which means moving the nodes it connects to so that the line becomes level. To do this, select a node and use either shift-w to move the bottommost node up, or shift-s to move the topmost node down.

Group nodes by converting them to a function

Selected nodes can be converted to a reusable function by right clicking one of the selected nodes and clicking 'Convert to function'. The nodes will then be moved to a function (which you can give a custom name) and replaced by an instance of that function. Any arrows to and from those nodes will be automatically hooked up, and the behavior of your application stays intact.