Docs / Editor

Editor customization

Git Treeline can stamp each worktree into your editor: window title, accent color, and optional theme. That reduces mistakes when several branches are open at once.

Why customize per worktree

With multiple worktrees, default window titles and chrome look identical. A distinct title, color, or theme per branch makes the active context obvious at a glance.

Project config

In .treeline.yml, optional keys under editor:

  • editor.title: template string for the window title
  • editor.color: "auto" or a hex color for the title/status bar
  • editor.theme: IDE color theme name (for example Monokai)

Title tokens: {project}, {port}, {branch}, {url} (HTTP URL with the allocated port, for example http://localhost:3010), and {router_url} (HTTPS URL on your configured router domain, derived from project and branch for gtl serve routing).

.treeline.yml
editor:
  title: "{project} @ {branch} ({url})"
  color: auto
  theme: GitHub Dark

Color modes

"auto" picks a stable hex color from the branch name. Alternatively set a literal value such as "#1a5276".

IDE support

VS Code and Cursor: settings are written to .vscode/settings.json, or to a .code-workspace file when one is present.

JetBrains: if .idea/ exists, editor.color updates the project header color in workspace.xml (IDEs 2023.2 and newer).

Zed: gtl init can detect Zed for labels such as “Open in Editor”, but Git Treeline does not write Zed-specific project files for title, color, or theme. The implementation targets VS Code or Cursor (.vscode / workspace) plus JetBrains header color when .idea is present.

Per-branch overrides (user config)

In user config.json, maps editor.themes and editor.colors override project defaults. Keys are project or project/branch. User values win over .treeline.yml.

$ gtl config set editor.themes.myapp "Monokai"

$ gtl config set editor.colors.myapp/staging "#7b241c"

When editor config applies

Editor files are updated during a full gtl start (after setup), gtl env sync with editor refresh, and gtl editor refresh. Editing .treeline.yml alone does not rewrite IDE files until you run one of those commands.

gtl editor refresh

Re-applies editor.* from the current worktree’s .treeline.yml and user overrides without starting the app server. Useful after a branch switch or config edit.

$ gtl editor refresh

See also