Skip to content

tomgroenwoldt/helix-shortcut-quiz

Repository files navigation

pages-build-deployment

Helix Shortcut Quiz

A web quiz built with yew for testing your knowledge of helix editor shortcuts. Try it out here!

helix-shortcut-quiz

How to play

Key Action
Esc Clear input
Backspace Pop last char of input
Enter Submit correct input
Left arrow Skip to left GIF
Right arrow Skip to right GIF

Your category progress is stored in the local storage of your browser. You can reset this store via the Reset this category button.

Development

Dependencies

If you don't already have it installed, it's time to install Rust: https://www.rust-lang.org/tools/install.

To compile Rust to WASM, we need to have the wasm32-unknown-unknown target installed. Install it with the following command:

rustup target add wasm32-unknown-unknown

Install trunk:

cargo install trunk

GIF generation

The yew app serves GIFs generated by vhs. The current state of vhs doesn't support the recording of the helix block cursor. The problem lies deeper within the ttyd dependency which uses the xterm.js canvas addon.

If you want to generate the GIFs yourself you should go ahead, clone the custom forks I made and use those binaries instead. After building the two binaries place them in the gif_generation/ directory and execute generate_all_gifs.sh.

Run the application locally

trunk serve

Contributing

Any kinds of contributions are welcome! Feel free to reach out to me via issues or pull requests :)