riched 0.4.0__tar.gz → 0.4.2__tar.gz
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.
- {riched-0.4.0 → riched-0.4.2}/PKG-INFO +5 -16
- {riched-0.4.0 → riched-0.4.2}/README.md +3 -14
- {riched-0.4.0 → riched-0.4.2}/pyproject.toml +2 -2
- {riched-0.4.0 → riched-0.4.2}/src/riched/app.py +1 -1
- {riched-0.4.0 → riched-0.4.2}/src/riched/bindings.yaml +0 -3
- {riched-0.4.0 → riched-0.4.2}/tests/runner.py +2 -2
- {riched-0.4.0 → riched-0.4.2}/tests/test_dirty_buffers.py +12 -5
- {riched-0.4.0 → riched-0.4.2}/tests/test_footer.py +1 -0
- {riched-0.4.0 → riched-0.4.2}/uv.lock +1 -1
- {riched-0.4.0 → riched-0.4.2}/.gitignore +0 -0
- {riched-0.4.0 → riched-0.4.2}/.python-version +0 -0
- {riched-0.4.0 → riched-0.4.2}/AGENTS.md +0 -0
- {riched-0.4.0 → riched-0.4.2}/src/riched/__init__.py +0 -0
- {riched-0.4.0 → riched-0.4.2}/src/riched/cli.py +0 -0
- {riched-0.4.0 → riched-0.4.2}/src/riched/editor.py +0 -0
- {riched-0.4.0 → riched-0.4.2}/src/riched/keybindings.py +0 -0
- {riched-0.4.0 → riched-0.4.2}/src/riched/quick_open.py +0 -0
- {riched-0.4.0 → riched-0.4.2}/src/riched/screens.py +0 -0
- {riched-0.4.0 → riched-0.4.2}/src/riched/settings.py +0 -0
- {riched-0.4.0 → riched-0.4.2}/src/riched/syntax.py +0 -0
- {riched-0.4.0 → riched-0.4.2}/tests/__init__.py +0 -0
- {riched-0.4.0 → riched-0.4.2}/tests/helpers.py +0 -0
- {riched-0.4.0 → riched-0.4.2}/tests/test_cli.py +0 -0
- {riched-0.4.0 → riched-0.4.2}/tests/test_command_palette.py +0 -0
- {riched-0.4.0 → riched-0.4.2}/tests/test_editor_shortcuts.py +0 -0
- {riched-0.4.0 → riched-0.4.2}/tests/test_file_io.py +0 -0
- {riched-0.4.0 → riched-0.4.2}/tests/test_file_tree.py +0 -0
- {riched-0.4.0 → riched-0.4.2}/tests/test_quick_open.py +0 -0
- {riched-0.4.0 → riched-0.4.2}/tests/test_syntax.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: riched
|
|
3
|
-
Version: 0.4.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 0.4.2
|
|
4
|
+
Summary: A Rich library powered editor(hence the name riched) that implements VS Code keybindings in TUI
|
|
5
5
|
Project-URL: Repository, https://github.com/hoishing/riched
|
|
6
6
|
Requires-Python: >=3.12
|
|
7
7
|
Requires-Dist: pyyaml>=6.0.3
|
|
@@ -11,7 +11,7 @@ Description-Content-Type: text/markdown
|
|
|
11
11
|
|
|
12
12
|
# Riched
|
|
13
13
|
|
|
14
|
-
[
|
|
14
|
+
A [rich](https://github.com/Textualize/rich) library powered editor(hence the name `riched`) that implements VS Code keybindings in TUI
|
|
15
15
|
|
|
16
16
|
> [!NOTE]
|
|
17
17
|
> `riched` is designed to work with [ghostty](https://ghostty.org) in macOS only
|
|
@@ -49,7 +49,6 @@ App shortcuts:
|
|
|
49
49
|
| Shortcut | Action |
|
|
50
50
|
| --- | --- |
|
|
51
51
|
| `⌘S` | Save |
|
|
52
|
-
| `⌃Q` | Quit |
|
|
53
52
|
| `F1` | Command palette |
|
|
54
53
|
| `⌘B` | Toggle file tree |
|
|
55
54
|
| `⌘P` | Quick open |
|
|
@@ -78,24 +77,14 @@ Editor shortcuts:
|
|
|
78
77
|
|
|
79
78
|
## Settings
|
|
80
79
|
|
|
81
|
-
`riched` persists the selected Textual theme in `settings.yaml` under the user
|
|
82
|
-
config directory: `~/Library/Application Support/riched/settings.yaml`
|
|
83
|
-
|
|
84
|
-
## Release Notes
|
|
85
|
-
|
|
86
|
-
### 0.2.0
|
|
87
|
-
|
|
88
|
-
- Quick open now opens immediately while indexing in the background.
|
|
89
|
-
- File search prefers git-indexed files when available, follows symlinked files and directories, skips cache/build dependency folders, and caps indexing at 10,000 files.
|
|
90
|
-
- Fuzzy ranking now prioritizes exact path and filename matches such as `.zshrc`.
|
|
80
|
+
`riched` persists the selected Textual theme in `settings.yaml` under the user config directory: `~/Library/Application Support/riched/settings.yaml`
|
|
91
81
|
|
|
92
82
|
## Limitations
|
|
93
83
|
|
|
94
84
|
- `riched` does not support multi-cursor editing because Textual `TextArea`
|
|
95
85
|
currently models one active cursor/selection.
|
|
96
86
|
- Some Command-key shortcuts can conflict with Ghostty or terminal-level
|
|
97
|
-
bindings, for example `⌘
|
|
98
|
-
`⌘Z`, `⌘⇧Z`, `⌘⇧P`, `⌘W`, and `⌘Q`.
|
|
87
|
+
bindings, for example `⌘Enter`, `⌘⇧Enter`, `⌘[`, `⌘]`, `⌘⇧P`, `⌘W`, `⌘Q`...etc
|
|
99
88
|
- `riched` will not implement key bindings that require users to modify the
|
|
100
89
|
Ghostty terminal configuration, since terminal-specific configuration makes
|
|
101
90
|
shortcuts harder to document, test, and support consistently across
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Riched
|
|
2
2
|
|
|
3
|
-
[
|
|
3
|
+
A [rich](https://github.com/Textualize/rich) library powered editor(hence the name `riched`) that implements VS Code keybindings in TUI
|
|
4
4
|
|
|
5
5
|
> [!NOTE]
|
|
6
6
|
> `riched` is designed to work with [ghostty](https://ghostty.org) in macOS only
|
|
@@ -38,7 +38,6 @@ App shortcuts:
|
|
|
38
38
|
| Shortcut | Action |
|
|
39
39
|
| --- | --- |
|
|
40
40
|
| `⌘S` | Save |
|
|
41
|
-
| `⌃Q` | Quit |
|
|
42
41
|
| `F1` | Command palette |
|
|
43
42
|
| `⌘B` | Toggle file tree |
|
|
44
43
|
| `⌘P` | Quick open |
|
|
@@ -67,24 +66,14 @@ Editor shortcuts:
|
|
|
67
66
|
|
|
68
67
|
## Settings
|
|
69
68
|
|
|
70
|
-
`riched` persists the selected Textual theme in `settings.yaml` under the user
|
|
71
|
-
config directory: `~/Library/Application Support/riched/settings.yaml`
|
|
72
|
-
|
|
73
|
-
## Release Notes
|
|
74
|
-
|
|
75
|
-
### 0.2.0
|
|
76
|
-
|
|
77
|
-
- Quick open now opens immediately while indexing in the background.
|
|
78
|
-
- File search prefers git-indexed files when available, follows symlinked files and directories, skips cache/build dependency folders, and caps indexing at 10,000 files.
|
|
79
|
-
- Fuzzy ranking now prioritizes exact path and filename matches such as `.zshrc`.
|
|
69
|
+
`riched` persists the selected Textual theme in `settings.yaml` under the user config directory: `~/Library/Application Support/riched/settings.yaml`
|
|
80
70
|
|
|
81
71
|
## Limitations
|
|
82
72
|
|
|
83
73
|
- `riched` does not support multi-cursor editing because Textual `TextArea`
|
|
84
74
|
currently models one active cursor/selection.
|
|
85
75
|
- Some Command-key shortcuts can conflict with Ghostty or terminal-level
|
|
86
|
-
bindings, for example `⌘
|
|
87
|
-
`⌘Z`, `⌘⇧Z`, `⌘⇧P`, `⌘W`, and `⌘Q`.
|
|
76
|
+
bindings, for example `⌘Enter`, `⌘⇧Enter`, `⌘[`, `⌘]`, `⌘⇧P`, `⌘W`, `⌘Q`...etc
|
|
88
77
|
- `riched` will not implement key bindings that require users to modify the
|
|
89
78
|
Ghostty terminal configuration, since terminal-specific configuration makes
|
|
90
79
|
shortcuts harder to document, test, and support consistently across
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "riched"
|
|
3
|
-
version = "0.4.
|
|
4
|
-
description = "
|
|
3
|
+
version = "0.4.2"
|
|
4
|
+
description = "A Rich library powered editor(hence the name riched) that implements VS Code keybindings in TUI"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.12"
|
|
7
7
|
dependencies = [
|
|
@@ -235,7 +235,7 @@ class RichedApp(App):
|
|
|
235
235
|
yield RichedDirectoryTree(str(self.root), id="file-tree")
|
|
236
236
|
yield FileTreeResizeHandle()
|
|
237
237
|
yield Container(id="editor-slot")
|
|
238
|
-
yield Footer()
|
|
238
|
+
yield Footer(show_command_palette=False)
|
|
239
239
|
|
|
240
240
|
def on_mount(self) -> None:
|
|
241
241
|
self.title = "riched"
|
|
@@ -19,7 +19,7 @@ from .test_dirty_buffers import (
|
|
|
19
19
|
test_file_tree_escape_clean_quit_exits,
|
|
20
20
|
test_file_tree_escape_clean_shows_quit_confirmation_then_cancel,
|
|
21
21
|
test_file_tree_escape_dirty_shows_unsaved_changes,
|
|
22
|
-
|
|
22
|
+
test_ctrl_q_does_not_quit,
|
|
23
23
|
test_quit_dirty_discard_keeps_file,
|
|
24
24
|
test_quit_dirty_save_writes_and_exits,
|
|
25
25
|
test_quit_dirty_shows_modal_then_cancel,
|
|
@@ -107,7 +107,7 @@ TESTS: list[tuple[str, Callable[[], Awaitable[None]]]] = [
|
|
|
107
107
|
"command palette: Ctrl+P does not open palette",
|
|
108
108
|
test_ctrl_p_does_not_open_command_palette,
|
|
109
109
|
),
|
|
110
|
-
("
|
|
110
|
+
("Ctrl+Q does not quit", test_ctrl_q_does_not_quit),
|
|
111
111
|
("quit dirty: modal + cancel", test_quit_dirty_shows_modal_then_cancel),
|
|
112
112
|
("quit dirty: save writes & exits", test_quit_dirty_save_writes_and_exits),
|
|
113
113
|
("quit dirty: discard keeps file", test_quit_dirty_discard_keeps_file),
|
|
@@ -7,7 +7,7 @@ from .helpers import _fresh_env, _make_app, mod
|
|
|
7
7
|
# ----------------------------------------------------------- quit + dirty ---
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
async def
|
|
10
|
+
async def test_ctrl_q_does_not_quit() -> None:
|
|
11
11
|
tmp, _ = _fresh_env()
|
|
12
12
|
f = tmp / "clean.txt"
|
|
13
13
|
f.write_text("foo")
|
|
@@ -16,7 +16,8 @@ async def test_quit_clean_exits() -> None:
|
|
|
16
16
|
await pilot.pause()
|
|
17
17
|
await pilot.press("ctrl+q")
|
|
18
18
|
await pilot.pause()
|
|
19
|
-
|
|
19
|
+
assert app.path == f, app.path
|
|
20
|
+
assert list(app.query("#editor"))
|
|
20
21
|
|
|
21
22
|
|
|
22
23
|
async def test_quit_dirty_shows_modal_then_cancel() -> None:
|
|
@@ -28,7 +29,9 @@ async def test_quit_dirty_shows_modal_then_cancel() -> None:
|
|
|
28
29
|
await pilot.pause()
|
|
29
30
|
app.query_one("#editor", TextArea).load_text("changed")
|
|
30
31
|
await pilot.pause()
|
|
31
|
-
|
|
32
|
+
app.query_one("#file-tree", DirectoryTree).focus()
|
|
33
|
+
await pilot.pause()
|
|
34
|
+
await pilot.press("escape")
|
|
32
35
|
await pilot.pause()
|
|
33
36
|
assert isinstance(app.screen, mod.UnsavedChangesScreen)
|
|
34
37
|
await pilot.click("#cancel")
|
|
@@ -46,7 +49,9 @@ async def test_quit_dirty_save_writes_and_exits() -> None:
|
|
|
46
49
|
await pilot.pause()
|
|
47
50
|
app.query_one("#editor", TextArea).load_text("new content")
|
|
48
51
|
await pilot.pause()
|
|
49
|
-
|
|
52
|
+
app.query_one("#file-tree", DirectoryTree).focus()
|
|
53
|
+
await pilot.pause()
|
|
54
|
+
await pilot.press("escape")
|
|
50
55
|
await pilot.pause()
|
|
51
56
|
assert isinstance(app.screen, mod.UnsavedChangesScreen)
|
|
52
57
|
await pilot.click("#save")
|
|
@@ -63,7 +68,9 @@ async def test_quit_dirty_discard_keeps_file() -> None:
|
|
|
63
68
|
await pilot.pause()
|
|
64
69
|
app.query_one("#editor", TextArea).load_text("changed")
|
|
65
70
|
await pilot.pause()
|
|
66
|
-
|
|
71
|
+
app.query_one("#file-tree", DirectoryTree).focus()
|
|
72
|
+
await pilot.pause()
|
|
73
|
+
await pilot.press("escape")
|
|
67
74
|
await pilot.pause()
|
|
68
75
|
await pilot.click("#discard")
|
|
69
76
|
await pilot.pause()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|