Skip to content

Commit 2337b33

Browse files
committed
docs: update progress.txt and PRD for US-005
1 parent 3a61d69 commit 2337b33

2 files changed

Lines changed: 27 additions & 1 deletion

File tree

prd.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
"Typecheck passes"
110110
],
111111
"priority": 5,
112-
"passes": false,
112+
"passes": true,
113113
"notes": ""
114114
},
115115
{

progress.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- Pre-existing lint errors in page.tsx and components exist; ignore them
77
- Operator functions live in src/lib/simulator/vim/operators.ts
88
- When spreading state with null assignments, always add explicit `: VimState` type annotation to avoid TypeScript inference narrowing
9+
- Text objects live in src/lib/simulator/vim/textObjects.ts; use executeTextObject(state, type, objectKey) as main entry point
910

1011
---
1112

@@ -109,3 +110,28 @@ Thread: http://localhost:8317/threads/T-019bbbaf-e594-7431-bfd1-469e62504d88
109110
- getRegisterContent() retrieves from any register type (named, numbered, special)
110111
- deleteRange handles both linewise and charwise deletions with proper cursor positioning
111112
---
113+
114+
## 2026-01-14 - US-005
115+
Thread: http://localhost:8317/threads/T-019bbbb7-f910-7378-88d8-49d010166129
116+
- Implemented complete vim text objects in src/lib/simulator/vim/textObjects.ts:
117+
- iw/aw: inner/a word (aw includes trailing/leading space)
118+
- iW/aW: inner/a WORD (whitespace-delimited)
119+
- is/as: inner/a sentence (ends at .!?)
120+
- ip/ap: inner/a paragraph (blank line separated)
121+
- i"/a": inner/a double-quoted string
122+
- i'/a': inner/a single-quoted string
123+
- i`/a`: inner/a backtick string
124+
- i(/a( or ib/ab: inner/a parentheses block
125+
- i[/a[: inner/a bracket block
126+
- i{/a{ or iB/aB: inner/a brace block
127+
- i</a<: inner/a angle bracket block
128+
- it/at: inner/a tag block (HTML/XML)
129+
- Updated src/lib/simulator/vim/index.ts to export textObjects
130+
- Files changed: 2 files (textObjects.ts new, index.ts updated)
131+
- **Learnings for future iterations:**
132+
- Text objects return TextObjectResult with startLine/startCol/endLine/endCol/linewise
133+
- executeTextObject(state, type, objectKey) is the main entry point with type "i" or "a"
134+
- textObjectToMotionResult() converts TextObjectResult to MotionResult for operator integration
135+
- Bracket matching uses depth tracking to handle nested brackets
136+
- Tag matching handles nested tags with same name using depth counter
137+
---

0 commit comments

Comments
 (0)