All manual sections

DocumentationCode editor

Code editor

The file manager has a full code editor, made for touching up PHP, HTML, CSS, JavaScript and configuration files without downloading them.

Opening it

Open the site, Files tab, and click a text file, or press Code editor in the file manager bar. The editor opens full screen: on the left the site's files, at the top the tabs of the open files (a dot marks unsaved changes), at the bottom the status bar with line and column, language, encoding (UTF-8), line endings (LF/CRLF) and indentation.

What it does

  • syntax highlighting for PHP, HTML, CSS/SCSS, JavaScript/TypeScript, JSON, YAML, Markdown, SQL, XML, nginx configuration, INI/.env files, .htaccess and shell scripts;
  • line numbers, bracket matching, auto-indent, block folding (the arrows next to the line numbers);
  • search and replace (Ctrl/⌘+F, or Ctrl/⌘+H), regular expressions included;
  • multiple cursors: Alt+click adds a cursor, Ctrl/⌘+D selects the next occurrence;
  • word wrap, text size, light or dark theme (or like the panel).

Ctrl/⌘+S saves the open file.

PHP syntax check

When you save a .php file the panel checks it with php -l, as the site user and with the site's PHP version, without running it. If it finds an error it marks it on the line (red underline) and asks whether to fix it first or save anyway. You can also press Check syntax at any time.

If someone changed the file in the meantime

If after you opened a file someone else changes it (a colleague, a plugin, an update), on save the panel notices and does not overwrite: you can compare the two versions side by side (yours on the right, editable, to save), overwrite with yours or reload the one on the server.

Files that do not open

Binary files (images, archives) and files larger than 2 MB are not edited in the editor: you can download them. On phones the simple editor is used, because the full one needs a keyboard and a large screen.