Skip to content

Commit db215dc

Browse files
authored
feat: add docs/yazi.md (#919)
* add yazi * update yazi.md * update yazi.md
1 parent 7f4fd32 commit db215dc

File tree

2 files changed

+269
-0
lines changed

2 files changed

+269
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ Quick Reference
181181
[Tmux](./docs/tmux.md)<!--rehype:style=background: rgb(99 99 99);-->
182182
[Taskset](./docs/taskset.md)<!--rehype:style=background: rgb(99 99 99);-->
183183
[tar](./docs/tar.md)<!--rehype:style=background: rgb(215 89 62);&class=tag&data-lang=解压缩-->
184+
[Yazi](./docs/yazi.md)<!--rehype:style=background: rgb(255 165 0);&class=tag&data-lang=文件管理器;&class=contributing-->
184185
[Zip](./docs/zip.md)<!--rehype:style=background: rgb(99 99 99);&class=tag&data-lang=解压缩-->
185186
[FTP](./docs/ftp.md)<!--rehype:style=background: rgb(99 99 99);-->
186187
<!--rehype:class=home-card-->

docs/yazi.md

Lines changed: 268 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,268 @@
1+
Yazi 备忘清单
2+
===
3+
4+
这份快速参考备忘单提供了Yazi 快速的终端文件管理的简要概述,以及 Yazi的基本操作
5+
6+
入门
7+
----
8+
<!--rehype:body-class=cols-2-->
9+
### 功能特点
10+
<!--rehype:wrap-class=row-span-2-->
11+
- 跨平台支持
12+
13+
`Yazi` 支持多种操作系统,包括 Linux、macOS 和 Windows。这使得用户可以在不同的平台上获得一致的体验。
14+
15+
- 轻量级和快速
16+
17+
Yazi 是一个设计简洁、执行效率高的终端文件管理器。它的轻量级特性确保了在启动和操作过程中都能保持高速度和低资源消耗。
18+
19+
- 插件支持
20+
21+
Yazi 支持插件,用户可以根据需要安装和配置插件,以扩展文件管理器的功能
22+
23+
- 丰富的文件操作
24+
25+
Yazi 提供了一系列丰富的文件操作功能,包括复制、剪切、粘贴、删除、重命名等。此外,还支持批量操作和多选功能,极大提高了文件管理的效率。
26+
27+
### 安装
28+
29+
| 系统 | 安装方法 |
30+
| ----- | ----- |
31+
| **使用 Cargo 安装** | cargo install yazi |
32+
| **Arch Linux** | yay -S yazi |
33+
| **Debian/Ubuntu** | 可以使用 Cargo 进行安装 |
34+
| **macOS (使用 Homebrew)** | brew install yazi |
35+
| **Windows (使用 Carg)** | cargo install yazi |
36+
| **Windows (使用 Scoop)** | scoop install yazi |
37+
38+
### 使用方法
39+
40+
#### 启动
41+
42+
你可以在终端中通过以下命令启动 Yazi
43+
44+
```sh
45+
yazi
46+
```
47+
48+
#### 帮助
49+
50+
你可以通过以下命令查看 Yazi 的帮助文档
51+
52+
```sh
53+
yazi --help
54+
```
55+
56+
## 基本操作
57+
58+
Yazi 文件管理器主要通过键盘快捷键进行操作。以下是一些常用的快捷键:
59+
60+
### 导航
61+
62+
:- | :-
63+
:- | :-
64+
| `h` | 返回上一级目录 |
65+
| `j` | 向下移动选中项 |
66+
| `k` | 向上移动选中项 |
67+
| `l` | 进入选中的目录或打开文件 |
68+
<!--rehype:className=shortcuts-->
69+
70+
### 文件操作
71+
72+
:- | :-
73+
:- | :-
74+
| `y` | 复制选中的文件或目录 |
75+
| `d` | 剪切选中的文件或目录 |
76+
| `p` | 粘贴文件或目录 |
77+
| `x` | 删除选中的文件或目录 |
78+
| `r` | 重命名选中的文件或目录 |
79+
<!--rehype:className=shortcuts-->
80+
81+
### 搜索与过滤
82+
83+
:- | :-
84+
:- | :-
85+
| `/` | 开始搜索模式 |
86+
| `n` | 在搜索模式中跳到下一个匹配项 |
87+
| `N` | 在搜索模式中跳到上一个匹配项 |
88+
<!--rehype:className=shortcuts-->
89+
90+
### 视图操作
91+
92+
:- | :-
93+
:- | :-
94+
| `gg` | 跳到列表的顶部 |
95+
| `G` | 跳到列表的底部 |
96+
| `Ctrl+f` | 向下滚动一页 |
97+
| `Ctrl+b` | 向上滚动一页 |
98+
<!--rehype:className=shortcuts-->
99+
100+
## 自定义配置
101+
102+
### 自定义配置
103+
<!--rehype:wrap-class=col-span-3-->
104+
你可以通过编辑配置文件来自定义 Yazi。配置文件通常位于 `$HOME/.config/yazi/xxx.toml`
105+
你可以在该文件中修改一些默认设置,例如快捷键绑定、主题颜色等。
106+
107+
- yazi.toml - 常规配置。
108+
- keymap.toml - 按键绑定配置。
109+
- theme.toml - 配色方案配置。
110+
111+
### 配置文件示例:yazi.toml
112+
113+
```toml
114+
[general]
115+
# 设置主界面主题为 dark 或 light
116+
theme = "dark"
117+
118+
# 启动时的默认路径
119+
default_path = "~"
120+
121+
# 是否启用自动保存配置
122+
auto_save_config = true
123+
124+
[keybindings]
125+
# 自定义快捷键绑定
126+
quit = "q" # 退出
127+
copy = "y" # 复制文件
128+
paste = "p" # 粘贴文件
129+
delete = "d" # 删除文件
130+
131+
[ui]
132+
# 界面相关配置
133+
preview_enabled = true # 是否启用文件预览
134+
show_hidden_files = true # 显示隐藏文件
135+
columns = 2 # 文件列表列数
136+
137+
[search]
138+
# 搜索行为配置
139+
case_sensitive = false # 搜索是否区分大小写
140+
search_timeout = 30 # 搜索超时时间(秒)
141+
142+
[sorting]
143+
# 排序规则配置
144+
sort_by = "name" # 排序方式: name, size, date
145+
reverse_sort = false # 是否反向排序
146+
147+
[plugins]
148+
# 插件加载配置
149+
enabled_plugins = ["git", "archive"]
150+
```
151+
152+
### keymap.toml 配置示例
153+
154+
```toml
155+
# 全局快捷键配置
156+
[global]
157+
# 全局退出应用程序
158+
quit = "Ctrl+Q"
159+
# 打开文件或目录
160+
open = "Enter"
161+
# 返回上级目录
162+
back = "Backspace"
163+
# 搜索功能触发
164+
search = "/"
165+
# 复制路径
166+
copy_path = "Ctrl+C"
167+
168+
# 窗口控制快捷键
169+
[window]
170+
# 切换窗口
171+
switch_window = "Tab"
172+
# 新建窗口
173+
new_window = "Ctrl+N"
174+
# 关闭窗口
175+
close_window = "Ctrl+W"
176+
177+
# 文件操作快捷键
178+
[file]
179+
# 删除文件
180+
delete_file = "D"
181+
# 重命名文件
182+
rename_file = "R"
183+
# 复制文件
184+
copy_file = "Y"
185+
# 粘贴文件
186+
paste_file = "P"
187+
# 移动文件
188+
move_file = "M"
189+
190+
# 文件选择快捷键
191+
[selection]
192+
# 全选
193+
select_all = "Ctrl+A"
194+
# 取消所有选择
195+
deselect_all = "Ctrl+D"
196+
# 反选
197+
invert_selection = "Ctrl+I"
198+
# 选择当前文件/目录
199+
select_item = "Space"
200+
201+
# 页面导航快捷键
202+
[navigation]
203+
# 向上移动光标
204+
move_up = "K"
205+
# 向下移动光标
206+
move_down = "J"
207+
# 向左切换标签
208+
move_left = "H"
209+
# 向右切换标签
210+
move_right = "L"
211+
212+
# 自定义命令触发键
213+
[custom]
214+
# 触发自定义功能
215+
custom_action_1 = "Ctrl+1"
216+
custom_action_2 = "Ctrl+2"
217+
custom_action_3 = "Ctrl+3"
218+
```
219+
220+
### theme.toml 配置示例
221+
222+
```toml
223+
[general]
224+
# 设置主界面配色方案
225+
background_color = "#1e1e2e" # 背景颜色
226+
foreground_color = "#cdd6f4" # 文本颜色
227+
cursor_color = "#89dceb" # 光标颜色
228+
selection_color = "#585b70" # 选中项背景颜色
229+
highlight_color = "#fab387" # 高亮颜色
230+
231+
# 字体设置
232+
font_family = "FiraCode" # 字体名称
233+
font_size = 14 # 字体大小
234+
235+
[ui]
236+
# 界面边框与间距
237+
border_color = "#45475a" # 边框颜色
238+
padding = 4 # 界面内容的内边距
239+
240+
[file_browser]
241+
# 文件浏览器颜色配置
242+
directory_color = "#89b4fa" # 目录名称颜色
243+
file_color = "#cdd6f4" # 普通文件颜色
244+
symlink_color = "#f5c2e7" # 符号链接颜色
245+
hidden_file_color = "#6c7086" # 隐藏文件颜色
246+
247+
[status_bar]
248+
# 状态栏颜色
249+
background_color = "#313244" # 状态栏背景
250+
foreground_color = "#a6adc8" # 状态栏文字
251+
error_color = "#f38ba8" # 状态栏错误信息
252+
253+
[search]
254+
# 搜索结果配色
255+
match_color = "#a6e3a1" # 搜索结果的匹配高亮
256+
current_match_color = "#fab387" # 当前匹配项的高亮
257+
258+
[progress_bar]
259+
# 进度条的配色
260+
filled_color = "#89dceb" # 已填充部分
261+
empty_color = "#313244" # 未填充部分
262+
```
263+
264+
另见
265+
----
266+
267+
- [Yazi 官方文档](https://yazi-rs.github.io/) _(yazi-rs.github.io)_
268+
- [Yazi Github](https://github.com/sxyazi/yazi) _(github.com)_

0 commit comments

Comments
 (0)