Repository navigation
divide 0.12.0 runs in a web browser too: divide --web serves the same divide, with the same menus, keys and windows, to a browser on your own computer, and each tab is its own divide. Underneath, divide is now built on TurboFrame, the framework its editor, explorer, search, Git windows and language servers came from, and that brings safer saving and a few changes you will notice.
Platforms: Linux and Windows are supported; macOS is experimental. This release has no macOS binaries and the Homebrew tap stays at 0.10.0. See Platforms below.
divide in a web browser
divide --web ~/sites/shop # 127.0.0.1:8000; the screen follows the browser window
divide --web 127.0.0.1:9090 --res 120x40 ~/sites/shopdivide prints an address with a secret token. Open it in your browser: the token leaves the address bar at once and a cookie keeps you in.
- This computer only. Only its own addresses are served (
127.0.0.1,localhost,::1). From another computer, forward the port over SSH. - Sizes.
--res 120x40keeps the screen at 120 columns by 40 rows and fits the font to the window;--res auto(the default) follows the window. - Tabs. Each tab is a separate divide, up to 4. Alt+X ends a tab's divide after asking about unsaved changes; closing a tab ends it too. Ctrl+C where you started
divide --webends every tab's divide and anything they started. - Keys and clipboard. The F-keys, Alt+letters, Ctrl+P and the mouse work as in a terminal, and F5 zooms the window instead of reloading the page. A browser keeps Ctrl+W, Ctrl+T and Ctrl+N for itself: use Alt+F3, Run > Data tree and Ctrl+Space. Copying in divide reaches your computer's clipboard.
- Security. The address opens once, within 10 minutes. The cookie lets that browser in for 12 hours; after that new tabs are refused, but open ones keep running until you close them or stop the server. Restarting the server shuts every browser out.
- It works from every way divide is installed: the packages and binaries below,
pipxandpip.--mcpdoes not go with--web.
See Web Mode.
Saving and opening files
- Saves are atomic: divide writes the new file beside the old one, then puts it in its place, so an interrupted save never leaves half a file. The file keeps its permissions.
- A file another program changed since divide read it (a
git checkout, another editor) is not overwritten without asking: Overwrite, or Cancel and keep your changes in the editor. - Save as asks before replacing a file, and refuses a file that is open in another window.
- Files keep their newlines: a file written with
\r\n(Windows) is saved with\r\n, lines you add included. A new file gets\n. - A file that cannot be edited as text is not opened, and divide says why: not a regular file, larger than 5 MB, binary, or not UTF-8.
Other changes you will notice
- Find wraps around: past the last match it goes on from the top, and says so.
- Find in files has limits, so a huge folder never blocks divide: the first 20,000 files, at most 2,000 matches, 20 seconds. It says when it reaches one, and skips compiled Python files.
- Go to file opens at once on a large project, and reads the folder's files meanwhile.
- Enter keeps the line's indentation in the editor.
- PHP: Ctrl+F1 shows what the language server knows in a box under the cursor, not in a dialog; a completion's documentation starts with its detail (a method's return type); Ctrl+Space with no answer from the server says so.
- Window > Tile arranges the windows beside the project window, which keeps its place at the left edge; the project window can now be zoomed.
- The project window hides a few more folders and files (
venv,.svn,.hg, compiled Python, editor swap files). - The debugger's Call stack says (not running) before a session.
- A setting that cannot be saved (a read-only home folder) applies for the session, without an error; Options > Language says when its choice cannot be kept.
Fixed
- Windows: Run > Parameters keeps quoted arguments together and drops the quotes, as the Windows command line does.
- A language server and its own child processes (node, PHP workers) end when divide ends.
- A PHP check that runs out of time is stopped and cleaned up, not left behind.
- The project window watches an empty folder you open, so files created in it from outside appear (#29).
- Diagnostics and marks (a PHP error, a blame line) are drawn as soon as they arrive, not after the next key.
- A menu opened right after a click on the desktop no longer closes at once.
- A key typed right after a dialog opens is no longer lost.
Also
- The help (English and Spanish) has a new Web Mode page and the section Opening and saving files (The Desktop); Installation, Language Servers, Finding Files and Commands, Editing Templates, Project Window and Debugging PHP say what changed.
- CI now also runs divide in a real browser on Linux and Windows, both from the installed
dividecommand and from the packaged binary, and a real PHP language server in a real terminal.
Platforms
- Linux and Windows are supported: every change is tested on them (Linux with Python 3.11 and 3.12, the acceptance journeys, the real terminal and the browser; Windows with Python 3.12 and the browser), and this release has their binaries and packages.
- macOS is experimental, as in 0.11.0: no macOS binaries, and the Homebrew tap stays at 0.10.0. On macOS, divide 0.12.0 runs from the source code (
tools/install.shorpipx, with Python 3.11 or newer).
Install
Ready to run, with nothing else to install:
- Windows:
scoop install https://github.com/divengine/divide/releases/latest/download/divide.json, or the.msibelow - Linux: the
.deb,.rpm,.apkand Arch packages, the AppImage or the binary alone, below - macOS (experimental): from the source code,
pipx install git+https://github.com/divengine/divide.git@v0.12.0
Requirements:
- Rendering and checking includes: PHP 8 and Div (
composer require divengine/div). - Template data providers: PHP 8.
- Runner Flows: Runner (
composer require divengine/runner, 0.3 or newer to simulate a Flow). - Mock Simulation: PHP 8.1 or newer, and Xdebug for the line trace.
- The Git menu: git.
- The web mode: a web browser.
divide is free software under the GPL, version 3 or later. The binaries are not signed yet: see Installation.