update docs

This commit is contained in:
2026-01-29 14:50:27 -05:00
parent 89207e8271
commit 90c655e8e4
+44 -13
View File
@@ -52,20 +52,20 @@ Instead of editing text character-by-character, Lisp programmers edit **structur
**Example - Slurping:** **Example - Slurping:**
```clojure ```clojure
;; Before: cursor on the (+ 1 2) form ;; Before: cursor inside the (+ 1 2) form
(let [x (+ 1 2)] 3) (foo (+ 1 2) 3 4)
;; After pressing >) (slurp forward) ;; After pressing >) (slurp forward) - pulls 3 into the form
(let [x (+ 1 2) 3]) (foo (+ 1 2 3) 4)
``` ```
**Example - Barfing:** **Example - Barfing:**
```clojure ```clojure
;; Before ;; Before: cursor inside the (+ 1 2 3) form
(let [x (+ 1 2 3)]) (foo (+ 1 2 3) 4)
;; After pressing <) (barf forward) on the + form ;; After pressing <) (barf forward) - pushes 3 out of the form
(let [x (+ 1 2) 3]) (foo (+ 1 2) 3 4)
``` ```
### Interactive Development (REPL) ### Interactive Development (REPL)
@@ -174,7 +174,6 @@ Results appear in a floating HUD window. To interact with the full log:
| Key | Action | | Key | Action |
|-----|--------| |-----|--------|
| `K` | Show documentation for symbol under cursor | | `K` | Show documentation for symbol under cursor |
| `Space e d` | Describe form under cursor |
### Tip: Learn Interactively ### Tip: Learn Interactively
@@ -212,9 +211,9 @@ Move by **elements** (atoms or forms) rather than words:
| `<)` | Barf forward (push last element out) | | `<)` | Barf forward (push last element out) |
| `>(` | Barf backward (push first element out) | | `>(` | Barf backward (push first element out) |
**Visual example:** **Visual example - forward operations:**
```clojure ```clojure
;; Cursor on inner form: (+ 1 2) ;; Cursor inside: (+ 1 2)
(foo (+ 1 2) 3 4) (foo (+ 1 2) 3 4)
;; >) slurp forward - pull 3 into the form ;; >) slurp forward - pull 3 into the form
@@ -227,6 +226,18 @@ Move by **elements** (atoms or forms) rather than words:
(foo (+ 1 2 3) 4) (foo (+ 1 2 3) 4)
``` ```
**Visual example - backward operations:**
```clojure
;; Cursor inside: (+ 1 2)
(a b (+ 1 2))
;; <( slurp backward - pull b into the form
(a (b + 1 2))
;; >( barf backward - push b back out
(a b (+ 1 2))
```
### Dragging Elements ### Dragging Elements
Move elements/forms left and right within their parent: Move elements/forms left and right within their parent:
@@ -238,6 +249,15 @@ Move elements/forms left and right within their parent:
| `>f` | Drag form right | | `>f` | Drag form right |
| `<f` | Drag form left | | `<f` | Drag form left |
**Example:**
```clojure
;; Cursor on 'a'
(foo a b c)
;; >e drag element right - swap a and b
(foo b a c)
```
### Wrapping ### Wrapping
Wrap an element in delimiters: Wrap an element in delimiters:
@@ -259,17 +279,28 @@ Wrap an element in delimiters:
;; Before (cursor inside the when form) ;; Before (cursor inside the when form)
(when true (println "hello")) (when true (println "hello"))
;; dsf - splice, removing the when form ;; dsf - splice, removing the surrounding parens
true (println "hello") when true (println "hello")
``` ```
### Raise ### Raise
Replace the parent form with the current form/element:
| Key | Action | | Key | Action |
|-----|--------| |-----|--------|
| `Space o` | Raise form (replace parent with current form) | | `Space o` | Raise form (replace parent with current form) |
| `Space O` | Raise element (replace parent with current element) | | `Space O` | Raise element (replace parent with current element) |
**Example:**
```clojure
;; Before: cursor on (inner value)
(outer (inner value))
;; Space o - raise form, replacing parent with current form
(inner value)
```
### Text Objects ### Text Objects
Use with operators like `d`, `c`, `y`, `v`: Use with operators like `d`, `c`, `y`, `v`: