riched 1.2.0__tar.gz → 1.3.0__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-1.2.0 → riched-1.3.0}/.gitignore +1 -0
- {riched-1.2.0 → riched-1.3.0}/PKG-INFO +5 -3
- {riched-1.2.0 → riched-1.3.0}/README.md +4 -2
- {riched-1.2.0 → riched-1.3.0}/pyproject.toml +1 -1
- {riched-1.2.0 → riched-1.3.0}/src/rich_editor/syntax.py +40 -3
- {riched-1.2.0 → riched-1.3.0}/tests/test_syntax.py +10 -0
- {riched-1.2.0 → riched-1.3.0}/uv.lock +1 -1
- {riched-1.2.0 → riched-1.3.0}/.python-version +0 -0
- {riched-1.2.0 → riched-1.3.0}/AGENTS.md +0 -0
- {riched-1.2.0 → riched-1.3.0}/docs/command-palette.svg +0 -0
- {riched-1.2.0 → riched-1.3.0}/docs/markdown-preview.svg +0 -0
- {riched-1.2.0 → riched-1.3.0}/docs/python-buffer.svg +0 -0
- {riched-1.2.0 → riched-1.3.0}/docs/search-replace.svg +0 -0
- {riched-1.2.0 → riched-1.3.0}/src/rich_editor/__init__.py +0 -0
- {riched-1.2.0 → riched-1.3.0}/src/rich_editor/app.py +0 -0
- {riched-1.2.0 → riched-1.3.0}/src/rich_editor/bindings.yaml +0 -0
- {riched-1.2.0 → riched-1.3.0}/src/rich_editor/cli.py +0 -0
- {riched-1.2.0 → riched-1.3.0}/src/rich_editor/editor.py +0 -0
- {riched-1.2.0 → riched-1.3.0}/src/rich_editor/formatting.py +0 -0
- {riched-1.2.0 → riched-1.3.0}/src/rich_editor/keybindings.py +0 -0
- {riched-1.2.0 → riched-1.3.0}/src/rich_editor/quick_open.py +0 -0
- {riched-1.2.0 → riched-1.3.0}/src/rich_editor/screens.py +0 -0
- {riched-1.2.0 → riched-1.3.0}/src/rich_editor/settings.py +0 -0
- {riched-1.2.0 → riched-1.3.0}/tests/__init__.py +0 -0
- {riched-1.2.0 → riched-1.3.0}/tests/helpers.py +0 -0
- {riched-1.2.0 → riched-1.3.0}/tests/runner.py +0 -0
- {riched-1.2.0 → riched-1.3.0}/tests/test_cli.py +0 -0
- {riched-1.2.0 → riched-1.3.0}/tests/test_command_palette.py +0 -0
- {riched-1.2.0 → riched-1.3.0}/tests/test_create_file.py +0 -0
- {riched-1.2.0 → riched-1.3.0}/tests/test_dirty_buffers.py +0 -0
- {riched-1.2.0 → riched-1.3.0}/tests/test_editor_shortcuts.py +0 -0
- {riched-1.2.0 → riched-1.3.0}/tests/test_file_io.py +0 -0
- {riched-1.2.0 → riched-1.3.0}/tests/test_file_tree.py +0 -0
- {riched-1.2.0 → riched-1.3.0}/tests/test_footer.py +0 -0
- {riched-1.2.0 → riched-1.3.0}/tests/test_formatting.py +0 -0
- {riched-1.2.0 → riched-1.3.0}/tests/test_markdown_preview.py +0 -0
- {riched-1.2.0 → riched-1.3.0}/tests/test_quick_open.py +0 -0
- {riched-1.2.0 → riched-1.3.0}/tests/test_refresh.py +0 -0
- {riched-1.2.0 → riched-1.3.0}/tests/test_replace.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: riched
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.0
|
|
4
4
|
Summary: A Rich library powered editor that implements VS Code keybindings in TUI
|
|
5
5
|
Project-URL: Repository, https://github.com/hoishing/riched
|
|
6
6
|
Requires-Python: >=3.12
|
|
@@ -14,10 +14,12 @@ Description-Content-Type: text/markdown
|
|
|
14
14
|
|
|
15
15
|
# Riched
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Terminal Editor with VS Code Keybindings Powered by [Rich](https://github.com/Textualize/rich)
|
|
18
18
|
|
|
19
19
|
> [!NOTE]
|
|
20
|
-
> Riched is designed to work with [ghostty](https://ghostty.org)
|
|
20
|
+
> Riched is designed to work with Ghostty based terminal, eg. [ghostty](https://ghostty.org), [cmux](https://cmux.com/) on macOS only.
|
|
21
|
+
>
|
|
22
|
+
> Other terminal / OS are not planned.
|
|
21
23
|
|
|
22
24
|
<table>
|
|
23
25
|
<tr>
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# Riched
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Terminal Editor with VS Code Keybindings Powered by [Rich](https://github.com/Textualize/rich)
|
|
4
4
|
|
|
5
5
|
> [!NOTE]
|
|
6
|
-
> Riched is designed to work with [ghostty](https://ghostty.org)
|
|
6
|
+
> Riched is designed to work with Ghostty based terminal, eg. [ghostty](https://ghostty.org), [cmux](https://cmux.com/) on macOS only.
|
|
7
|
+
>
|
|
8
|
+
> Other terminal / OS are not planned.
|
|
7
9
|
|
|
8
10
|
<table>
|
|
9
11
|
<tr>
|
|
@@ -28,8 +28,45 @@ FILE_TYPES = (
|
|
|
28
28
|
FileType("javascript", "JavaScript", "javascript", suffixes=(".js", ".mjs", ".cjs")),
|
|
29
29
|
FileType("typescript", "TypeScript", "typescript", suffixes=(".ts",)),
|
|
30
30
|
FileType("tsx", "TSX", "tsx", suffixes=(".tsx",)),
|
|
31
|
-
FileType(
|
|
31
|
+
FileType(
|
|
32
|
+
"bash",
|
|
33
|
+
"Bash",
|
|
34
|
+
"bash",
|
|
35
|
+
suffixes=(".sh", ".bash", ".zsh"),
|
|
36
|
+
names=(
|
|
37
|
+
".bashrc",
|
|
38
|
+
".bash_profile",
|
|
39
|
+
".bash_aliases",
|
|
40
|
+
".bash_login",
|
|
41
|
+
".bash_logout",
|
|
42
|
+
".profile",
|
|
43
|
+
".zshrc",
|
|
44
|
+
".zprofile",
|
|
45
|
+
".zshenv",
|
|
46
|
+
".zlogin",
|
|
47
|
+
".zlogout",
|
|
48
|
+
".inputrc",
|
|
49
|
+
".cshrc",
|
|
50
|
+
".kshrc",
|
|
51
|
+
),
|
|
52
|
+
),
|
|
32
53
|
FileType("environment", "Environment", "bash", names=(".env",), patterns=(".env.*",)),
|
|
54
|
+
FileType(
|
|
55
|
+
"ignore",
|
|
56
|
+
"Ignore",
|
|
57
|
+
"bash",
|
|
58
|
+
names=(
|
|
59
|
+
".gitignore",
|
|
60
|
+
".gitattributes",
|
|
61
|
+
".dockerignore",
|
|
62
|
+
".npmignore",
|
|
63
|
+
".hgignore",
|
|
64
|
+
".eslintignore",
|
|
65
|
+
".prettierignore",
|
|
66
|
+
".stylelintignore",
|
|
67
|
+
".rgignore",
|
|
68
|
+
),
|
|
69
|
+
),
|
|
33
70
|
FileType("html", "HTML", "html", suffixes=(".html", ".htm")),
|
|
34
71
|
FileType("css", "CSS", "css", suffixes=(".css",)),
|
|
35
72
|
FileType("json", "JSON", "json", suffixes=(".json",)),
|
|
@@ -38,13 +75,13 @@ FILE_TYPES = (
|
|
|
38
75
|
FileType("markdown", "Markdown", "markdown", suffixes=(".md", ".markdown")),
|
|
39
76
|
FileType("regex", "Regex", "regex"),
|
|
40
77
|
FileType("yaml", "YAML", "yaml", suffixes=(".yaml", ".yml")),
|
|
41
|
-
FileType("toml", "TOML", "toml", suffixes=(".toml",)),
|
|
78
|
+
FileType("toml", "TOML", "toml", suffixes=(".toml",), names=("pipfile",)),
|
|
42
79
|
FileType(
|
|
43
80
|
"ini",
|
|
44
81
|
"INI",
|
|
45
82
|
"toml",
|
|
46
83
|
suffixes=(".ini", ".cfg", ".conf"),
|
|
47
|
-
names=(".editorconfig",),
|
|
84
|
+
names=(".editorconfig", ".npmrc", ".yarnrc", ".curlrc", ".wgetrc", ".gitconfig", ".hgrc"),
|
|
48
85
|
),
|
|
49
86
|
FileType("xml", "XML", "xml", suffixes=(".xml",)),
|
|
50
87
|
FileType("sql", "SQL", "sql", suffixes=(".sql",)),
|
|
@@ -42,6 +42,13 @@ async def test_extension_language_detection() -> None:
|
|
|
42
42
|
("app.log", "2026-05-14 INFO started\n", None, "Log"),
|
|
43
43
|
("Dockerfile", "FROM python:3.12\n", "dockerfile", "Dockerfile"),
|
|
44
44
|
("Makefile", "run:\n\tuv run rich\n", "makefile", "Makefile"),
|
|
45
|
+
(".zshrc", "alias ll='ls -la'\n", "bash", "Bash"),
|
|
46
|
+
(".bashrc", "export PATH=$PATH:/bin\n", "bash", "Bash"),
|
|
47
|
+
(".profile", "export EDITOR=vim\n", "bash", "Bash"),
|
|
48
|
+
(".gitignore", "node_modules/\n*.log\n", "bash", "Ignore"),
|
|
49
|
+
(".dockerignore", "**/*.log\n", "bash", "Ignore"),
|
|
50
|
+
(".npmrc", "registry=https://registry.npmjs.org\n", "toml", "INI"),
|
|
51
|
+
("Pipfile", "[packages]\nrequests = '*'\n", "toml", "TOML"),
|
|
45
52
|
("notes.xyz", "plain text", None, "Plain text"),
|
|
46
53
|
)
|
|
47
54
|
for name, content, expected_language, expected_label in cases:
|
|
@@ -140,6 +147,9 @@ async def test_added_file_types_comment_behavior() -> None:
|
|
|
140
147
|
("app.jsonc", '"debug": true', '// "debug": true'),
|
|
141
148
|
("Dockerfile", "FROM python:3.12", "# FROM python:3.12"),
|
|
142
149
|
("Makefile", "run:", "# run:"),
|
|
150
|
+
(".zshrc", "alias ll='ls -la'", "# alias ll='ls -la'"),
|
|
151
|
+
(".gitignore", "node_modules/", "# node_modules/"),
|
|
152
|
+
(".npmrc", "registry=foo", "; registry=foo"),
|
|
143
153
|
)
|
|
144
154
|
for name, content, expected in cases:
|
|
145
155
|
_, _, app = _file_app(name, content)
|
|
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
|
|
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
|