https://github.com/nik-rev/helix-golf
Powerful text refactoring with the Helix Editor
https://github.com/nik-rev/helix-golf
helix helix-editor neovim vim vimgolf
Last synced: 13 days ago
JSON representation
Powerful text refactoring with the Helix Editor
- Host: GitHub
- URL: https://github.com/nik-rev/helix-golf
- Owner: nik-rev
- License: mit
- Created: 2024-12-10T23:28:19.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-01-11T16:34:21.000Z (9 months ago)
- Last Synced: 2025-01-18T22:52:45.888Z (9 months ago)
- Topics: helix, helix-editor, neovim, vim, vimgolf
- Language: MDX
- Homepage: https://nik-rev.github.io/helix-golf/
- Size: 260 KB
- Stars: 26
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Helix Golf
Helix is _very_ good at editing text and this website has examples of how I've refactored some snippets of code using it.
https://github.com/user-attachments/assets/d79d583e-f79b-40ce-add7-e60a8307156a
All examples here:
[https://nik-rev.github.io/helix-golf](https://nik-rev.github.io/helix-golf/)
## Contributing
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.
````md
# TitleMade `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
````### Dependencies
- [Helix](https://docs.helix-editor.com/install.html)
- [Rust](https://www.rust-lang.org/tools/install)
- [mdbook](https://rust-lang.github.io/mdBook/guide/installation.html)
- [VHS](https://github.com/charmbracelet/vhs?tab=readme-ov-file#installation) to generate the demo files and test examples for correctnessIf you don't want to install them but still would like to contribute, you can edit the markdown example files in the [`src/`](src/) folder, send a pull request and the GitHub CI will automatically test your PR.
### Validate
Verify that your example is correctly structured by running the following command in the project root:
```sh
cargo validate
```### Generate Demos
The demos for each example are generated and tested by running the following command:
```sh
cargo generate-demos
```You can specify exactly which demos to generate:
```sh
cargo generate-demos export_from_mod
```### Running locally
You can run the website locally by running:
```sh
mdbook serve
```It will be available on `http://localhost:3000`.