diff options
| author | user <user@clank> | 2026-08-30 17:01:45 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-08-30 17:01:45 +0200 |
| commit | 1c63cb6aabb181a71ef56df75ccd7f4cd3a1d392 (patch) | |
| tree | 516caa7684a990043bf8cbb6e465a5124c316c9f /web/recordings/demos/config.py | |
| parent | web: the casts play at 1.75x -- the owner has watched them enough (diff) | |
| download | slosh-1c63cb6aabb181a71ef56df75ccd7f4cd3a1d392.tar.gz slosh-1c63cb6aabb181a71ef56df75ccd7f4cd3a1d392.tar.xz slosh-1c63cb6aabb181a71ef56df75ccd7f4cd3a1d392.zip | |
web: the config cast edits in colour
vim -u NONE kept the render machine's dotfiles out of the cast, but
NONE also switches off filetype detection and syntax -- so the config
demo was editing kdl in monochrome, underselling vim and the file both.
The demo now authors its own six-line vimrc instead: syntax on,
habamax (the webdemo's own look), shortmess for the column. The cast
depends on vim's runtime and nothing personal, which is what NONE was
protecting in the first place.
Diffstat (limited to '')
| -rw-r--r-- | web/recordings/demos/config.py | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/web/recordings/demos/config.py b/web/recordings/demos/config.py index 2f9081f..7200d63 100644 --- a/web/recordings/demos/config.py +++ b/web/recordings/demos/config.py @@ -15,18 +15,30 @@ import tempfile sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from castgen import THEME, Recorder, out_path -# shortmess: the rotated editor pane is a column, and vim's file-info -# message wraps there into a hit-enter prompt mid-demo. F drops it. +work = tempfile.mkdtemp(prefix="slosh-demo-") +cfg = os.path.join(work, "config.kdl") +shutil.copyfile(THEME, cfg) + +# The editor's vimrc, authored here rather than -u NONE: NONE keeps the +# render machine's dotfiles out of the cast, but it also turns off filetype +# detection and syntax -- and a config demo whose config is monochrome +# undersells both vim and the file. This is the whole rc, so the cast +# depends on vim's own runtime and nothing personal. shortmess because the +# rotated editor pane is a column, and the file-info message would wrap +# there into a hit-enter prompt mid-demo. +vimrc = os.path.join(work, "vimrc") +with open(vimrc, "w") as f: + f.write( + "set nocompatible\nfiletype on\nsyntax on\ncolorscheme habamax\n" + "set noswapfile\nset shortmess+=atoOF\n" + ) + ENV = { "PS1": "$ ", "ENV": "/dev/null", - "EDITOR": 'vim -u NONE -i NONE -c "set shortmess+=atoOF"', + "EDITOR": "vim -u %s -i NONE" % vimrc, } -work = tempfile.mkdtemp(prefix="slosh-demo-") -cfg = os.path.join(work, "config.kdl") -shutil.copyfile(THEME, cfg) - r = Recorder(["/bin/sh"], cols=100, rows=28, title="make it yours", config=cfg, env=ENV) # Something on the one pane, so geometry changes have a witness. No neighbour |
