winzik/docs/ide/editor.md
David Nurdin 7de153fc14 IDE documentation: one page per feature (docs/ide/, French in docs/ide/fr/) and a Doc browser inside the IDE
- docs/ide/: 49 user pages grouped in toc.json (editing, languages, run / test / debug, Git, web sites and Symfony, databases,
  Docker and SSH, games, AI, team, settings); pages of features still being built are "coming soon" stubs with a TODO list;
  15 pages translated into French; docs/ide.md and docs/ide.fr.md link to them.
- The Doc button at the top right of the IDE, Help > Documentation, Search Everywhere "Documentation" and a "?" in each tool
  window's header open the Doc browser (ide/ui/js/docs-browser.js): table of contents, rendered pages (pictures, code, tables,
  links between pages and to headings), full-text search, back / forward, the IDE's language with English as the fallback.
- ide/src/Docs/DocsLibrary.php (docs.index, docs.image): reads only the documentation folder (strict names, real path checked);
  the packaged copy ui/docs first, else the repository's docs/ide.
- Packaging: tools/stage-game.sh copies docs/ide into the exported IDE (its *.md exclusion would drop them), overlay-build.php
  puts them in code updates, bin/jumphp ide syncs them.
- Tests: docs-model.test.mjs (TOC, links, anchors, pictures, search; every page and picture of docs/ide exists), DocsLibraryTest
  (path traversal refused), the i18n test covers the new texts in 14 languages.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01JkYTqsvYu6AYr9yQ3Q4Nt6
2026-11-16 00:08:42 +01:00

2.6 KiB

Editor

The code editor is Monaco, the editor of VS Code: tabs, preview tabs, split right, sticky scroll, multi-cursor, minimap (option), folding, diff, autosave, dark and light themes.

Tabs

  • A single click in the Project view opens a preview tab (replaced by the next one) when the option is on; a double click or an edit keeps it.
  • Right click a tab: close, close others, split, Show Diff with HEAD, Show Local History, copy the path.
  • Split Right shows two editors side by side; Back / Forward (Ctrl+Alt+← / →, or the mouse's side buttons).
  • Ctrl+S saves every file; with Save files automatically (Settings) files are saved as you type.

Kinds of files

File Opens as
code, text Monaco, coloured by its language (a file without extension by its #! line: bin/console is PHP)
.md rendered, with View / Edit / Edit + View
.html, .twig Code / Split / Design / Preview (HTML editor, Twig preview)
.css, .scss Code / Split / Design / Preview (CSS editor)
.env* the .env editor
*.form.yaml the form designer
pictures, sounds, films, PDF a viewer; sprites, tunes, sound effects, tilesets and levels in the resource editors
binary View as Hexadecimal (any file, also from the status bar): offset, 16 bytes, their characters; a 100 MB file scrolls fast; go to an offset

The file-type button of the status bar opens a file as another language, in hexadecimal, as a picture, a PDF, a film or a sound; the choice is kept per file.

Writing code

  • Completion (Ctrl+Space), parameter hints (Ctrl+P), quick documentation (Ctrl+Q), Reformat Code (Ctrl+Alt+L), Comment Line (Ctrl+/), Rename (Shift+F6), Find (Ctrl+F), Replace (Ctrl+R), Go to Line (Ctrl+G).
  • Paths in strings are completed (JS imports, CSS url(), HTML src / href, Twig templates, PHP strings) and are links: Ctrl+click opens the file; a picture shows a thumbnail on hover.
  • Colours in CSS show a swatch; a click opens a colour picker.
  • Problems are underlined as you type; the Problems window (Alt+6) lists them.

Live preview

Preview HTML (the eye of the tab bar) shows an HTML or CSS file in a sandboxed frame next to the code, updated as you type; the project's stylesheets, pictures and fonts are put in; scripts only run when you tick Scripts.

PHP code intelligence, Navigation, Local history, Encodings.