Skip to content

Commit ae09a79

Browse files
authored
release: v0.5.0 (#109)
- Bump version to 0.5.0 - Update README: Commands table, Current Status, Roadmap - Add comprehensive CHANGELOG entry for v0.5.0 with all 7 PRs: - #100: Selection, Search, View commands (25 new) - #102: Typestate input integration - #103: Lesson navigation (next/prev) - #105: Paragraph movement, find repeat - #106: Alt-, fix, page commands - #107: Surround commands (ms/md/mr) - #108: Text objects (ma/mi)
1 parent 20040aa commit ae09a79

4 files changed

Lines changed: 122 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 109 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,113 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.5.0] - 2026-01-07
11+
12+
### Added
13+
14+
**Major Feature: 45+ New Commands with Typestate Input Architecture**
15+
16+
This release significantly expands command coverage with a complete typestate-based input system for handling multi-key sequences.
17+
18+
- **Selection Commands (12 new)** (#100)
19+
- <kbd>s</kbd> select_regex: Select regex matches in selection
20+
- <kbd>S</kbd> split_selection: Split selection on regex
21+
- <kbd>Alt</kbd>-<kbd>s</kbd> split_selection_newlines: Split on newlines
22+
- <kbd>&</kbd> align_selections: Align selections to columns
23+
- <kbd>_</kbd> trim_selections: Trim whitespace from selections
24+
- <kbd>Alt</kbd>-<kbd>-</kbd> merge_selections: Merge all selections
25+
- <kbd>Alt</kbd>-<kbd>_</kbd> merge_consecutive: Merge adjacent selections
26+
- <kbd>C</kbd> copy_selection_next_line: Copy selection down
27+
- <kbd>Alt</kbd>-<kbd>C</kbd> copy_selection_prev_line: Copy selection up
28+
- <kbd>K</kbd> keep_selections_matching: Keep matching selections
29+
- <kbd>Alt</kbd>-<kbd>K</kbd> remove_selections_matching: Remove matching
30+
- <kbd>Ctrl</kbd>-<kbd>c</kbd> toggle_comments: Toggle line comments
31+
32+
- **Search Commands (7 new)** (#100)
33+
- <kbd>/</kbd> search_forward: Search forward with regex
34+
- <kbd>?</kbd> search_backward: Search backward with regex
35+
- <kbd>n</kbd> search_next: Jump to next match
36+
- <kbd>N</kbd> search_prev: Jump to previous match
37+
- <kbd>*</kbd> search_word_under_cursor: Search word forward
38+
- <kbd>#</kbd> search_word_backward: Search word backward (#105)
39+
- <kbd>Alt</kbd>-<kbd>*</kbd> search_selection: Search selection text
40+
41+
- **View Commands (6 new)** (#100)
42+
- <kbd>z</kbd>/<kbd>zz</kbd> view_center: Center view on cursor
43+
- <kbd>zt</kbd> view_top: Scroll cursor to top
44+
- <kbd>zb</kbd> view_bottom: Scroll cursor to bottom
45+
- <kbd>zm</kbd> view_center_horizontal: Center horizontally
46+
- <kbd>zj</kbd> scroll_down: Scroll view down
47+
- <kbd>zk</kbd> scroll_up: Scroll view up
48+
49+
- **Movement Commands (8 new)** (#105, #106)
50+
- <kbd>{</kbd> goto_prev_paragraph: Jump to previous paragraph
51+
- <kbd>}</kbd> goto_next_paragraph: Jump to next paragraph
52+
- <kbd>^</kbd> goto_first_nonblank: Alias for <kbd>gs</kbd>
53+
- <kbd>Ctrl</kbd>-<kbd>b</kbd> page_up: Scroll page up
54+
- <kbd>Ctrl</kbd>-<kbd>f</kbd> page_down: Scroll page down
55+
- <kbd>Ctrl</kbd>-<kbd>u</kbd> half_page_up: Scroll half page up
56+
- <kbd>Ctrl</kbd>-<kbd>d</kbd> half_page_down: Scroll half page down
57+
- <kbd>Alt</kbd>-<kbd>.</kbd> repeat_last_motion: Repeat last f/F/t/T
58+
59+
- **Editing Commands (3 new)** (#106)
60+
- <kbd>Alt</kbd>-<kbd>`</kbd> switch_to_uppercase: Convert to uppercase
61+
- <kbd>R</kbd> replace_with_yanked: Replace selection with yanked text
62+
- <kbd>Alt</kbd>-<kbd>J</kbd> join_selections_space: Join with spaces
63+
64+
- **Selection Management (3 new)** (#106)
65+
- <kbd>,</kbd> keep_primary_selection: Keep only primary selection
66+
- <kbd>Alt</kbd>-<kbd>,</kbd> remove_primary_selection: Remove primary selection
67+
- <kbd>Alt</kbd>-<kbd>x</kbd> shrink_to_line_bounds: Shrink selection to line bounds
68+
69+
- **Surround Commands (Match Mode)** (#107)
70+
- <kbd>ms</kbd> + char: Add surround (wrap selection with brackets/quotes)
71+
- <kbd>md</kbd> + char: Delete surround (remove enclosing pair)
72+
- <kbd>mr</kbd> + char + char: Replace surround (change pair type)
73+
74+
- **Text Object Selection** (#108)
75+
- <kbd>ma</kbd> + object: Select around (includes delimiters)
76+
- <kbd>mi</kbd> + object: Select inside (excludes delimiters)
77+
- Supported objects: `w`, `W`, `(`, `[`, `{`, `<`, `"`, `'`, `` ` ``, `p`
78+
79+
- **Lesson Navigation** (#103)
80+
- Next/Previous scenario navigation after completion
81+
- <kbd>n</kbd> to go to next lesson from Results screen
82+
- <kbd>p</kbd> to go to previous lesson
83+
- <kbd>l</kbd> to return to scenario list
84+
85+
### Changed
86+
87+
- **Typestate Input Architecture** (#100, #102)
88+
- Replaced `command_buffer: String` with `InputStateMachine`
89+
- Added `InputStateAccess` trait for uniform state access
90+
- 8 pending states: `FindCharPending`, `TillCharPending`, `SurroundAddPending`, `SurroundDeletePending`, `SurroundReplacePending`, `TextObjectAroundPending`, `TextObjectInsidePending`, `ViewPending`
91+
- Type-safe state transitions at compile time
92+
- `FindState` module to track last find/till motion for repeat
93+
94+
- **Command System**
95+
- Extended command constants for all new commands
96+
- Extended `cmd_to_key_events()` for multi-key command sequences
97+
- Unified handler pattern across all pending states
98+
99+
### Fixed
100+
101+
- **Alt-, Command** (#106)
102+
- Fixed `Alt-,` to correctly call `remove_primary_selection`
103+
- Was incorrectly mapped to `repeat_last_motion_reverse` (Vim feature, not Helix)
104+
105+
- **Empty Document Handling** (#108)
106+
- Fixed panic in `find_surrounding_pair()` when document is empty
107+
- Fixed panic in `select_around_paragraph()` / `select_inside_paragraph()` for empty documents
108+
- Added early returns with safe defaults for edge cases
109+
110+
### Quality
111+
112+
- **Tests**: 1116 (was 845, +271 new tests)
113+
- **Clippy**: Zero warnings
114+
- **Commands**: 45+ new commands (total ~90 commands supported)
115+
- **Architecture**: Complete typestate input system for all multi-key sequences
116+
10117
## [0.4.8] - 2026-01-06
11118

12119
### Added
@@ -866,7 +973,8 @@ With this release, all Phase 1 components are fully implemented:
866973

867974
---
868975

869-
[Unreleased]: https://github.com/bug-ops/helix-trainer/compare/v0.4.8...HEAD
976+
[Unreleased]: https://github.com/bug-ops/helix-trainer/compare/v0.5.0...HEAD
977+
[0.5.0]: https://github.com/bug-ops/helix-trainer/compare/v0.4.8...v0.5.0
870978
[0.4.8]: https://github.com/bug-ops/helix-trainer/compare/v0.4.7...v0.4.8
871979
[0.4.7]: https://github.com/bug-ops/helix-trainer/compare/v0.4.6...v0.4.7
872980
[0.4.6]: https://github.com/bug-ops/helix-trainer/compare/v0.4.5...v0.4.6

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "helix-trainer"
3-
version = "0.4.8"
3+
version = "0.5.0"
44
edition = "2024"
55
rust-version = "1.89"
66
authors = ["Andrei G <[email protected]>"]

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,15 @@ Main Menu
131131

132132
| Category | Commands |
133133
|----------|----------|
134-
| **Movement** | <kbd>h</kbd> <kbd>j</kbd> <kbd>k</kbd> <kbd>l</kbd> <kbd>w</kbd> <kbd>b</kbd> <kbd>e</kbd> <kbd>0</kbd> <kbd>$</kbd> <kbd>gg</kbd> <kbd>ge</kbd> <kbd>gh</kbd> <kbd>gl</kbd> <kbd>gs</kbd> |
135-
| **Match Mode** | <kbd>mm</kbd> (jump to matching bracket) |
136-
| **Editing** | <kbd>i</kbd> <kbd>a</kbd> <kbd>I</kbd> <kbd>A</kbd> <kbd>o</kbd> <kbd>O</kbd> <kbd>r</kbd> <kbd>c</kbd> <kbd>x</kbd> <kbd>d</kbd> <kbd>J</kbd> <kbd>></kbd> <kbd><</kbd> |
134+
| **Movement** | <kbd>h</kbd> <kbd>j</kbd> <kbd>k</kbd> <kbd>l</kbd> <kbd>w</kbd> <kbd>b</kbd> <kbd>e</kbd> <kbd>0</kbd> <kbd>$</kbd> <kbd>gg</kbd> <kbd>ge</kbd> <kbd>gh</kbd> <kbd>gl</kbd> <kbd>gs</kbd> <kbd>{</kbd> <kbd>}</kbd> <kbd>^</kbd> |
135+
| **Find/Till** | <kbd>f</kbd> <kbd>F</kbd> <kbd>t</kbd> <kbd>T</kbd> <kbd>Alt</kbd>+<kbd>.</kbd> |
136+
| **Match Mode** | <kbd>mm</kbd> (brackets) <kbd>ms</kbd> (surround) <kbd>md</kbd> (delete surround) <kbd>mr</kbd> (replace surround) |
137+
| **Text Objects** | <kbd>ma</kbd>/<kbd>mi</kbd> + <kbd>w</kbd> <kbd>W</kbd> <kbd>(</kbd> <kbd>[</kbd> <kbd>{</kbd> <kbd><</kbd> <kbd>"</kbd> <kbd>'</kbd> <kbd>`</kbd> <kbd>p</kbd> |
138+
| **Selection** | <kbd>x</kbd> <kbd>X</kbd> <kbd>v</kbd> <kbd>;</kbd> <kbd>,</kbd> <kbd>%</kbd> <kbd>s</kbd> <kbd>S</kbd> <kbd>C</kbd> <kbd>K</kbd> |
139+
| **Editing** | <kbd>i</kbd> <kbd>a</kbd> <kbd>I</kbd> <kbd>A</kbd> <kbd>o</kbd> <kbd>O</kbd> <kbd>r</kbd> <kbd>c</kbd> <kbd>d</kbd> <kbd>J</kbd> <kbd>></kbd> <kbd><</kbd> <kbd>~</kbd> <kbd>R</kbd> |
137140
| **Clipboard** | <kbd>y</kbd> <kbd>p</kbd> <kbd>P</kbd> |
141+
| **Search** | <kbd>/</kbd> <kbd>?</kbd> <kbd>n</kbd> <kbd>N</kbd> <kbd>*</kbd> <kbd>#</kbd> |
142+
| **View** | <kbd>z</kbd> <kbd>zz</kbd> <kbd>zt</kbd> <kbd>zb</kbd> <kbd>zm</kbd> <kbd>zj</kbd> <kbd>zk</kbd> |
138143
| **Undo/Redo** | <kbd>u</kbd> <kbd>U</kbd> |
139144
| **Repeat** | <kbd>.</kbd> (repeat last action) |
140145
| **Count Prefix** | <kbd>3h</kbd> <kbd>5j</kbd> <kbd>2w</kbd> (execute N times) |
@@ -198,7 +203,7 @@ Duolingo-proven mechanics:
198203
## Current Status
199204

200205
> [!NOTE]
201-
> **Active Development**: Phase 2.1 (Mini-Games) is complete! 845 passing tests, zero clippy warnings.
206+
> **Active Development**: Typestate input expansion (Phase 4) is complete! 1116 passing tests, zero clippy warnings.
202207
203208
### Completed
204209

@@ -207,6 +212,7 @@ Duolingo-proven mechanics:
207212
| **Phase 1** | v0.1.3 | FSRS spaced repetition, daily quests, XP/mastery system, anti-farming |
208213
| **Phase 1.5** | v0.3.0 | Scenario metadata, filtering/sorting, 78 categorized scenarios |
209214
| **Phase 2.1** | v0.4.1 | Arcade mode (60s sessions, lives, streak multiplier, XP integration) |
215+
| **Phase 4** | v0.5.0 | Typestate input system: surround commands (ms/mr/md), text objects (ma/mi) |
210216

211217
### 🔄 Phase 2.2: Mini-Games Enhancements (Planned)
212218

@@ -315,6 +321,7 @@ Helix-specific. Many commands overlap with Vim, but Helix uses a different selec
315321
| Phase A || Foundation (30+ commands, 78 scenarios, TUI) |
316322
| Phase 1 || Smart learning (FSRS, quests, mastery) |
317323
| Phase 2.1 || Mini-Games mode (arcade, lives, streaks) |
324+
| Typestate || Input expansion (surround ms/mr/md, text objects ma/mi) |
318325
| Phase 2.2 | 📋 | Mini-Games enhancements (sound, adaptive difficulty) |
319326
| Phase 3 | 📋 | Workflow simulator (LSP, git, multi-file) |
320327
| Phase 4 | 💡 | Network effects (multiplayer, scenarios marketplace) |

0 commit comments

Comments
 (0)