Merge template-live-editor
get _some_ error message out on stack overflow
bugfix: show error message on infinite recursion
Use all available width to read (no editing).
This repo is an example of a Freewheeling App, designed above all to be easy to run, easy to modify and easy to share.
Install LÖVE. It's just a 5MB download, open-source and extremely well-behaved.
To run from the terminal, pass this directory to LÖVE, optionally with a file path to edit.
$ path/to/love path/to/broadsheet.love path/to/file
Alternatively, turn it into a .love file you can double-click on:
$ zip -r /tmp/broadsheet.love *.lua
To load a file, drop it on the broadsheet.love window.
When restarting, broadsheet.love will load the file from the previous session by default.
To modify it live without restarting the app each time, download the driver app. Here's an example session with a different freewheeling app:
Some reference documentation on how to create your own apps.
If the app being modified by the driver lives in a .love file, your changes will go into the save directory. If it lives in a directory (like this repo), your changes will go straight into the same directory.
pgUp
/pgDn
to scrollctrl+f
to find patterns within a filectrl+=
to zoom in, ctrl+-
to zoom out, ctrl+0
to reset zoomshift
+ movement to select text, ctrl+a
to select all,
ctrl+c
to copy selection to clipboardThis approach puts one top-level definition per file, and so obscures the order in which definitions are loaded. In particular, initializing a global table to contain other global definitions will fail if you originally authored the other global definitions after the table.
I never initialize global tables with other definitions. That kind of thing
happens in on.initialize
(akin to love.load
; see reference.md) or
on.code_change
.
Don't start the driver app while multiple freewheeling apps are running. If you have a driver app running with one app, shut it down before you switch apps.
No support yet for Unicode graphemes spanning multiple codepoints.
No support yet for right-to-left languages.
Can't scroll while selecting text with mouse.
No scrollbars yet. That stuff is hard.
This repo is a fork of lines.love, an editor for plain text where you can also seamlessly insert line drawings. Its immediate upstream is the template repo for freewheeling apps. Updates to it can be downloaded from:
Further forks are encouraged. If you show me your fork, I'll link to it here.
Most appreciated. Messages, PRs, patches, forks, it's all good.