@arthony/keybook 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/cli.js +1113 -400
- package/package.json +3 -3
- package/seed/nano.yaml +53 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arthony/keybook",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
"@types/node": "^22.7.0",
|
|
53
53
|
"@types/react": "^18.3.0",
|
|
54
54
|
"ink-testing-library": "^4.0.0",
|
|
55
|
-
"
|
|
55
|
+
"tsdown": "^0.22.1",
|
|
56
56
|
"tsx": "^4.19.0",
|
|
57
57
|
"typescript": "^5.6.0",
|
|
58
58
|
"vitest": "^2.1.0"
|
|
59
59
|
},
|
|
60
60
|
"license": "MIT",
|
|
61
61
|
"scripts": {
|
|
62
|
-
"build": "
|
|
62
|
+
"build": "tsdown",
|
|
63
63
|
"dev": "tsx src/cli.ts",
|
|
64
64
|
"test": "vitest run",
|
|
65
65
|
"test:watch": "vitest",
|
package/seed/nano.yaml
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
app: Nano
|
|
2
2
|
entries:
|
|
3
|
+
- action: "Heads-up: on macOS, `nano` is actually Apple's pico"
|
|
4
|
+
keys: "—"
|
|
5
|
+
notes: >-
|
|
6
|
+
macOS ships /usr/bin/nano as a symlink to Apple's pico (UW PICO 5.09),
|
|
7
|
+
an SIP-protected, Apple-signed system binary — not GNU nano. Pico is
|
|
8
|
+
minimal: no undo/redo, no go-to-line, no search-and-replace, and its
|
|
9
|
+
keys can't be remapped. Entries tagged [gnu-only] below need real GNU
|
|
10
|
+
nano (brew install nano), which also lets you rebind keys via ~/.nanorc.
|
|
11
|
+
tags: [platform, macos, pico, gnu-only, note]
|
|
3
12
|
- action: Save the file (write out)
|
|
4
13
|
keys: "⌃O"
|
|
5
14
|
tags: [save, write]
|
|
@@ -23,24 +32,56 @@ entries:
|
|
|
23
32
|
keys: "⌃W"
|
|
24
33
|
notes: After ⌃W, press ⏎ again to repeat the last search.
|
|
25
34
|
tags: [find, search]
|
|
26
|
-
- action:
|
|
27
|
-
keys: "
|
|
28
|
-
tags: [
|
|
35
|
+
- action: Show the current cursor position
|
|
36
|
+
keys: "⌃C"
|
|
37
|
+
tags: [position, line number]
|
|
38
|
+
- action: Move back / forward one character
|
|
39
|
+
keys: "⌃B, ⌃F"
|
|
40
|
+
notes: Arrow keys ←/→ do the same. Works in both pico and GNU nano.
|
|
41
|
+
tags: [cursor, char, navigate]
|
|
42
|
+
- action: Move up / down one line
|
|
43
|
+
keys: "⌃P, ⌃N"
|
|
44
|
+
notes: Arrow keys ↑/↓ do the same. Works in both pico and GNU nano.
|
|
45
|
+
tags: [cursor, line, navigate]
|
|
46
|
+
- action: Jump to start / end of line
|
|
47
|
+
keys: "⌃A, ⌃E"
|
|
48
|
+
tags: [cursor, beginning, end, navigate]
|
|
49
|
+
- action: Page up / down
|
|
50
|
+
keys: "⌃Y, ⌃V"
|
|
51
|
+
tags: [scroll, page]
|
|
52
|
+
# --- GNU nano only (do NOT work in Apple's built-in pico) ---
|
|
53
|
+
- action: Move back / forward one word
|
|
54
|
+
keys: "⌥Space, ⌃Space"
|
|
55
|
+
notes: >-
|
|
56
|
+
GNU nano only. Heads-up on macOS: ⌥Space switches input source and
|
|
57
|
+
⌃Space opens Spotlight, so they're intercepted before nano sees them.
|
|
58
|
+
Free those in System Settings → Keyboard → Keyboard Shortcuts, or install
|
|
59
|
+
GNU nano and rebind in ~/.nanorc (e.g. bind to ⌥←/⌥→).
|
|
60
|
+
tags: [cursor, word, navigate, gnu-only, macos-conflict]
|
|
29
61
|
- action: Go to line / column
|
|
30
62
|
keys: "⌃_"
|
|
31
|
-
tags: [goto, line]
|
|
63
|
+
tags: [goto, line, gnu-only]
|
|
32
64
|
- action: Go to top / bottom of the file
|
|
33
65
|
keys: "⌥\\, ⌥/"
|
|
34
|
-
tags: [top, bottom]
|
|
35
|
-
- action:
|
|
36
|
-
keys: "
|
|
37
|
-
tags: [
|
|
66
|
+
tags: [top, bottom, gnu-only]
|
|
67
|
+
- action: Search and replace
|
|
68
|
+
keys: "⌃\\"
|
|
69
|
+
tags: [replace, gnu-only]
|
|
38
70
|
- action: Undo / redo
|
|
39
71
|
keys: "⌥U, ⌥E"
|
|
40
|
-
tags: [undo, redo]
|
|
41
|
-
- action:
|
|
42
|
-
keys: "
|
|
43
|
-
|
|
72
|
+
tags: [undo, redo, gnu-only]
|
|
73
|
+
- action: Jump to previous / next block (paragraph)
|
|
74
|
+
keys: "⌥(, ⌥)"
|
|
75
|
+
notes: GNU nano only; written as M-( and M-) in nano's help.
|
|
76
|
+
tags: [cursor, paragraph, block, navigate, gnu-only]
|
|
77
|
+
- action: Jump to the matching bracket
|
|
78
|
+
keys: "⌥]"
|
|
79
|
+
notes: GNU nano only. With the cursor on a bracket, jumps to its match.
|
|
80
|
+
tags: [cursor, bracket, navigate, gnu-only]
|
|
81
|
+
- action: Scroll one line without moving the cursor
|
|
82
|
+
keys: "⌥-, ⌥+"
|
|
83
|
+
notes: GNU nano only; written as M-- and M-+ (also ⌥↑ / ⌥↓).
|
|
84
|
+
tags: [scroll, navigate, gnu-only]
|
|
44
85
|
- action: Notation note (Control and Meta keys)
|
|
45
86
|
steps:
|
|
46
87
|
- nano writes ⌃ as "^" (Control) and ⌥ as "M-" (Meta)
|