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

# Code editor

> A full-featured, browser-based code editor built into the RBS platform — with LSP, Git, terminal, AI, and real-time collaboration

# Code editor

RBS includes a complete web-based code editor that runs in your browser, connected directly to your RBS Server. No desktop app to install, no extensions to configure — open a browser, connect to your branch server, and start coding with full IDE features.

<Note>
  **API for building your own integrations and a standalone code editor are coming soon.** We're working on a public API and SDK so you can build custom editor integrations, plugins, and workflows on top of the RBS platform. Stay tuned.
</Note>

## What's included

<CardGroup cols={3}>
  <Card title="Code editor" icon="code">
    ReasonOS editor with syntax highlighting, autocomplete, split view, and multi-tab support.
  </Card>

  <Card title="Language servers" icon="wand-magic-sparkles">
    Full LSP support — autocomplete, hover, diagnostics, go-to-definition, rename, formatting, and more.
  </Card>

  <Card title="Integrated terminal" icon="terminal">
    Multi-tab terminal connected to your RBS Server with port detection and auto-proxy.
  </Card>

  <Card title="Git integration" icon="code-branch">
    Stage, unstage, diff, blame, branch management, and inline gutter decorations — all built in.
  </Card>

  <Card title="AI assistant" icon="robot">
    AI coding agent with tool calling, streaming responses, reasoning display, and multi-agent teams.
  </Card>

  <Card title="Collaboration" icon="users">
    Real-time co-editing, video meetings, screen sharing, team chat, and presence tracking.
  </Card>
</CardGroup>

***

## Editor

The code editor is built on [CodeMirror](https://codemirror.net/) and supports editing files across your entire workspace.

### Syntax highlighting

Syntax highlighting is supported for a wide range of languages:

| Language                    | Extensions                                                                           |
| --------------------------- | ------------------------------------------------------------------------------------ |
| **JavaScript / TypeScript** | `.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`, `.cjs`                                         |
| **Python**                  | `.py`                                                                                |
| **HTML**                    | `.html`, `.htm`                                                                      |
| **CSS / SCSS / LESS**       | `.css`, `.scss`, `.less`                                                             |
| **JSON**                    | `.json`                                                                              |
| **Markdown**                | `.md`, `.markdown`                                                                   |
| **SQL**                     | `.sql`                                                                               |
| **C / C++**                 | `.c`, `.cpp`, `.h`, `.hpp`                                                           |
| **RBS**                     | `.rbs`                                                                               |
| **And more**                | `.go`, `.rs`, `.java`, `.kt`, `.rb`, `.php`, `.yaml`, `.xml`, `.sh`, `.tf`, `.proto` |

### Editor features

| Feature                 | Description                                                                             |
| ----------------------- | --------------------------------------------------------------------------------------- |
| **Multi-tab editing**   | Open multiple files in tabs. Drag-and-drop to reorder. Middle-click to close.           |
| **Split view**          | Split the editor into two panes (`Cmd+\`) to view and edit files side by side.          |
| **Quick open**          | Fuzzy file finder (`Cmd+P`) — type a filename to open it instantly.                     |
| **Find in file**        | `Cmd+F` to search within the current file with regex support.                           |
| **Global search**       | `Cmd+Shift+F` for workspace-wide search with regex, case sensitivity, and glob filters. |
| **Word wrap**           | Toggle word wrap in settings.                                                           |
| **Code folding**        | Collapse and expand code blocks.                                                        |
| **Bracket matching**    | Auto-close brackets, parentheses, and quotes.                                           |
| **Multiple selections** | Rectangular selection and multiple cursor support.                                      |

### Keyboard shortcuts

| Shortcut      | Action                          |
| ------------- | ------------------------------- |
| `Cmd+S`       | Save the current file.          |
| `Cmd+P`       | Quick open (fuzzy file finder). |
| `Cmd+F`       | Find in current file.           |
| `Cmd+Shift+F` | Global search across workspace. |
| `Cmd+Shift+G` | Toggle Git panel.               |
| `Cmd+B`       | Toggle file explorer sidebar.   |
| `Cmd+\`       | Toggle split editor.            |
| `` Cmd+` ``   | Toggle integrated terminal.     |

***

## Language Server Protocol (LSP)

The editor connects to language servers running on the RBS Server for full IDE-grade intelligence. LSP servers are started automatically when you open a file in a supported language.

### LSP features

| Feature                   | Description                                                           |
| ------------------------- | --------------------------------------------------------------------- |
| **Autocomplete**          | Context-aware completions with documentation and snippets.            |
| **Hover information**     | Hover over any symbol to see its type, documentation, and signature.  |
| **Diagnostics**           | Real-time errors and warnings displayed inline and in the status bar. |
| **Go to definition**      | Jump to the definition of any symbol.                                 |
| **Go to type definition** | Jump to the type definition of a symbol.                              |
| **Find references**       | Find all usages of a symbol across the workspace.                     |
| **Document symbols**      | Browse the symbol outline of the current file.                        |
| **Rename**                | Rename a symbol across all files in the workspace.                    |
| **Code formatting**       | Format the entire document or a selection.                            |
| **Signature help**        | See function parameter information as you type.                       |
| **Code actions**          | Quick fixes and refactoring suggestions.                              |

### LSP status

The editor status bar shows the current LSP connection state:

* **LSP** (green) — connected and working.
* **LSP** (spinner) — connecting to the language server.
* **LSP (sync needed)** — run `rbs sync` to install the language server.
* **LSP** (red) — connection error.

***

## Integrated terminal

The editor includes a multi-tab terminal connected directly to your RBS Server. All commands run on the server, not your local machine.

### Terminal features

| Feature            | Description                                                                                                |
| ------------------ | ---------------------------------------------------------------------------------------------------------- |
| **Multi-tab**      | Open multiple terminal sessions in separate tabs.                                                          |
| **Full PTY**       | A real pseudo-terminal — run interactive commands, vim, htop, etc.                                         |
| **Port detection** | When a process starts listening on a port, the terminal detects it and can auto-open the built-in browser. |
| **Resize**         | Drag the terminal border to resize. The PTY adjusts automatically.                                         |
| **Signals**        | Send `Ctrl+C` (SIGINT), SIGTERM, or SIGKILL to running processes.                                          |

***

## Git integration

The editor has built-in Git support — no terminal commands needed for common workflows.

### Git panel

Open the Git panel with `Cmd+Shift+G` to see:

* **Changed files** — modified, added, deleted, untracked, and renamed files.
* **Inline diffs** — expand any file to see a hunk-by-hunk diff.
* **Stage / unstage** — click to stage or unstage individual files.
* **Stage all / unstage all** — batch operations.
* **Discard changes** — revert a file to its last committed state.

### Git gutter

The editor gutter shows inline change indicators:

* **Green bar** — added lines.
* **Blue bar** — modified lines.
* **Red triangle** — deleted lines.

Click a gutter indicator to see the original content and revert individual hunks.

### Additional Git features

| Feature         | Description                                                     |
| --------------- | --------------------------------------------------------------- |
| **Blame**       | See who last changed each line and when.                        |
| **History**     | View the commit history for a file or the entire repo.          |
| **Branches**    | View and switch between branches.                               |
| **Hunk revert** | Revert individual hunks within a file, not just the whole file. |

***

## AI coding assistant

The editor includes an AI-powered coding agent that can read files, write code, run terminal commands, and reason through complex tasks.

### Features

| Feature                  | Description                                                                                                |
| ------------------------ | ---------------------------------------------------------------------------------------------------------- |
| **Streaming chat**       | Chat with the AI agent. Responses stream in real-time.                                                     |
| **Tool calling**         | The agent can read and write files, run terminal commands, and search the codebase.                        |
| **Thinking / reasoning** | See the agent's chain-of-thought reasoning as it works through your request.                               |
| **Context files**        | Attach specific files to your prompt so the agent has full context.                                        |
| **Multi-agent teams**    | Spawn a team of specialized agents (frontend, backend, reviewer, tester, etc.) that collaborate on a task. |
| **Configurable**         | Set your own API key and choose your preferred model.                                                      |

### Opening the AI assistant

Click the **AI** tool in the top navigation bar, or it can be opened via the tools menu. The AI panel opens on the right side of the editor.

***

## Built-in web browser

The editor includes a built-in web browser for testing web applications without leaving the editor.

### Features

| Feature        | Description                                                                                          |
| -------------- | ---------------------------------------------------------------------------------------------------- |
| **Port proxy** | The RBS Server proxies local ports so you can preview your app in the embedded browser.              |
| **Auto-open**  | When the terminal detects a new port (e.g., a dev server starting), the browser opens automatically. |
| **Navigation** | Full browser controls — back, forward, refresh, URL bar.                                             |

***

## Collaboration

When multiple developers connect to the same branch server, the editor provides real-time collaboration features — no third-party tools required.

<CardGroup cols={2}>
  <Card title="Real-time editing" icon="pen-to-square">
    Edit the same file simultaneously with teammates. OT-based conflict resolution, remote cursors, and selection highlighting.
  </Card>

  <Card title="Video meetings" icon="video">
    Peer-to-peer video calls with camera and screen sharing directly inside the editor. WebRTC — no third-party servers.
  </Card>

  <Card title="Team chat" icon="comments">
    Chat rooms with code snippet sharing, file references, typing indicators, and message history.
  </Card>

  <Card title="Presence" icon="users">
    See who's online, what file they're viewing, who's in a meeting, and who's in a chat session.
  </Card>
</CardGroup>

### Collaborative editing details

* **Operational Transformation (OT)** — the same technique used by Google Docs. One op in flight at a time, with server-side transformation for consistency.
* **Remote cursors and selections** — each user gets a distinct color. Cursor positions are updated automatically when remote edits shift content.
* **Editing region awareness** — visual indicators show which lines each user is actively editing.
* **Conflict warnings** — the system warns when two users edit overlapping regions.
* **Split-view support** — each split pane is an independent collaboration participant.

### Status bar

The editor status bar shows:

* **Collab** button — toggle collaborative editing on/off. Shows the number of connected peers.
* **LSP status** — current language server connection state.
* **File encoding** — UTF-8 by default.
* **Git changes count** — number of uncommitted changes.

<Card title="Learn more about collaboration" icon="arrow-right" href="/platform/collaboration" horizontal>
  See the full collaboration feature set: real-time editing, video, screen sharing, chat, and presence tracking.
</Card>

***

## File explorer

The left sidebar provides a file explorer with:

| Feature             | Description                                                                      |
| ------------------- | -------------------------------------------------------------------------------- |
| **Lazy loading**    | Directories are loaded on demand for fast initial load.                          |
| **Streaming**       | Large repos use SSE-based streaming so the explorer populates incrementally.     |
| **File operations** | Create, rename, delete, copy, and move files and folders.                        |
| **Presence dots**   | Colored dots next to files indicate which teammates are viewing or editing them. |

Toggle the file explorer with `Cmd+B` or from the status bar.

***

## Tool pane

The right side of the editor hosts a tool pane for AI, browser, meetings, and chat. Tools are opened from the **Tools** menu in the top navigation bar and can be opened/closed independently.

| Tool        | Description                                                |
| ----------- | ---------------------------------------------------------- |
| **AI**      | AI coding assistant with streaming chat and tool calling.  |
| **Browser** | Built-in web browser for previewing web apps.              |
| **Meeting** | Video meeting with camera, mic, and screen share controls. |
| **Chat**    | Team chat rooms with code sharing and typing indicators.   |

***

## Coming soon

<Info>
  We're building a public API and SDK for custom integrations. This will allow you to:

  * Build custom editor plugins and extensions.
  * Connect external tools to the RBS Server programmatically.
  * Automate workflows using the RBS API.
  * Integrate with your own internal development tools.

  If you're interested in early access, reach out to [support@reasonos.dev](mailto:support@reasonos.dev).
</Info>
