go-presentx
Go's present tool but with code syntax highlighting. Highlighted code is editable with some caveats
This is a quick and dirty implementation of flippeeer's reddit post.
Requirements and instructions
- Requires Go installed. Enable modules with
go env -w GO111MODULE="on"
Start presentation on 127.0.0.1:3999 (default) by running:
go run . -base .
About the syntax highlighting changes
-
No auto-rendering while editing
-
Uses the lightweight prism.js for syntax highlighting
-
Change code style by replacing
static/prism.css
with one from prism.js' site and modifying it to fit your needs (see css config section) -
Press CTRL while in editable code block to re-render all syntax
-
Issue with the caret being invisible at times and sometimes appearing to be on the next line
Prism CSS config
- Ligatures off by default. You may enable them in
prism-github-dark.css
by setting"calt"
toon
(see comment).
Non-default settings listed:
pre[class*="language-"] {
caret-color: #ccc;
font-size: 0.95em;
border-radius: 7px;
line-height: 1.2;
}
pre[class*="language-"] {
padding: 0.6em;
}
Contributing, License and authors
PRs welcome. I'll look at issues, I'll try to be nice.
idk, same license as Go I guess. Credit to The Go Authors.