atuin/docs/zh-CN/key-binding.md
Bruce Huang 02049bf68d
update zh-CN docs (#539)
* update zh-CN docs

* update zh-CN docs

* update zh-CN docs

* update zh-CN docs
2022-10-08 03:36:49 +00:00

48 lines
1,002 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 键位绑定
默认情况下, Atuin 将会重新绑定 <kbd>Ctrl-r</kbd>`up` 键。如果你不想使用默认绑定,请在调用 `atuin init` 之前设置 ATUIN_NOBIND
例如:
```
export ATUIN_NOBIND="true"
eval "$(atuin init zsh)"
```
如果需要,你可以在调用 `atuin init` 之后对 Atuin 重新进行键绑定
# zsh
Atuin 定义了 ZLE 部件 "\_atuin_search_widget"
```
export ATUIN_NOBIND="true"
eval "$(atuin init zsh)"
bindkey '^r' _atuin_search_widget
# 取决于终端模式
bindkey '^[[A' _atuin_search_widget
bindkey '^[OA' _atuin_search_widget
```
# bash
```
export ATUIN_NOBIND="true"
eval "$(atuin init bash)"
# 绑定到 ctrl-r, 也可以在这里添加任何其他你想要的绑定方式
bind -x '"\C-r": __atuin_history'
```
# fish
```
set -gx ATUIN_NOBIND "true"
atuin init fish | source
# 在 normal 和 insert 模式下绑定到 ctrl-r你也可以在此处添加其他键位绑定
bind \cr _atuin_search
bind -M insert \cr _atuin_search
```