Helix is very good at editing text and this website has examples of how I've refactored some snippets of code using it.
object_into_array.mp4
All examples here:
https://nik-rev.github.io/helix-golf
If you want to suggest a new example, make an issue and I'll add it.
If you want to add a new example yourself: create src/your_example.md
using the following template.
# Title
Made `h` capital and added exclamation mark.
## Before
```
hello world
```
## After
```
Hello world!
```
## Command
```
~A!
```
1. `~` changes case of the selection
1. `A` go to end and enter insert mode
1. `!` write the exclamation mark
If you don't want to install them but still would like to contribute, you can edit the markdown example files in the src/
folder, send a pull request and the GitHub CI will automatically test your PR.
Verify that your example is correctly structured by running the following command in the project root:
cargo validate
The demos for each example are generated and tested by running the following command:
cargo generate-demos
You can specify exactly which demos to generate:
cargo generate-demos export_from_mod
You can run the website locally by running:
mdbook serve
It will be available on http://localhost:3000
.