1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 01:00:05 +08:00

Add cn blog for key binding guide (#3675)

This commit is contained in:
Wang Shidong 2020-08-01 10:51:28 +08:00 committed by GitHub
parent 280b0b9b9b
commit 1de861e41b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 83 additions and 10 deletions

View File

@ -118,7 +118,7 @@ through search tools: `ag`, `rg`, `ack`, `pt` and `grep`, Choose one you like.
You don't need to remember any key bindings, as the mapping guide will show up after the <kbd>SPC</kbd> is pressed. You don't need to remember any key bindings, as the mapping guide will show up after the <kbd>SPC</kbd> is pressed.
The mapping guide is also available for `g`, `z`, and `s`. The mapping guide is also available for `g`, `z`, and `s`.
![mapping guide](https://user-images.githubusercontent.com/13142418/35568184-9a318082-058d-11e8-9d88-e0eafd1d498d.gif) ![float_guide](https://user-images.githubusercontent.com/13142418/89091735-5de96a00-d3de-11ea-85e1-b0fc64537836.gif)
[**Help description for key bindings**](https://spacevim.org/help-description-for-key-bindings/) [**Help description for key bindings**](https://spacevim.org/help-description-for-key-bindings/)

View File

@ -2,28 +2,37 @@
title: "Mnemonic key bindings navigation" title: "Mnemonic key bindings navigation"
categories: [feature, blog] categories: [feature, blog]
description: "Key bindings are organized using mnemonic prefixes like b for buffer, p for project, s for search, h for help, etc…" description: "Key bindings are organized using mnemonic prefixes like b for buffer, p for project, s for search, h for help, etc…"
image: https://user-images.githubusercontent.com/13142418/80597412-62f2f200-8a5a-11ea-9dbf-30ec9f82422a.gif image: https://user-images.githubusercontent.com/13142418/89091735-5de96a00-d3de-11ea-85e1-b0fc64537836.gif
commentsID: "Mnemonic key bindings navigation" commentsID: "Mnemonic key bindings navigation"
comments: true comments: true
--- ---
# [Blogs](../blog/) >> # Mnemonic key bindings navigation # [Blogs](../blog/) >> Mnemonic key bindings navigation
You don't need to remember any key bindings, as a guide buffer is displayed each time the prefix key is pressed You don't need to remember any key bindings, as a guide buffer is displayed each time the prefix key is pressed
in normal/visual mode. It lists the available key bindings and their short description. in normal/visual mode. It lists the available key bindings and their short description.
The prefix can be `[SPC]`, `[Window]`, `[denite]`, `<leader>` and `[unite]`, when the guide is opened, you can The prefix can be `[SPC]`, `[Window]`, `<leader>`, when the guide is opened, you can
see the prefix on the statusline. This will be shown in floating windows if your vim/neovim support this feature. see the prefix on the statusline.
This will be shown in floating windows if your vim/neovim support this feature.
- vim: `8.1.1364`
- neovim: `v0.4.2`
![float_guide](https://user-images.githubusercontent.com/13142418/89091735-5de96a00-d3de-11ea-85e1-b0fc64537836.gif)
Otherwise, it will be displayed in split Window.
![mapping guide](https://user-images.githubusercontent.com/13142418/35568184-9a318082-058d-11e8-9d88-e0eafd1d498d.gif) ![mapping guide](https://user-images.githubusercontent.com/13142418/35568184-9a318082-058d-11e8-9d88-e0eafd1d498d.gif)
## default key binding prefixes ## default key binding prefixes
| Prefix name | custom option and default value | description | | Prefix name | custom option and default value | description |
| ----------- | --------------------------------- | ----------------------------------- | | ----------- | ------------------------------------------------------- | ---------------------------------- |
| `[SPC]` | NONE / `<Space>` | default mapping prefix of SpaceVim | | `[SPC]` | NONE / `<Space>` | default mapping prefix of SpaceVim |
| `[Window]` | `g:spacevim_windows_leader` / `s` | window mapping prefix of SpaceVim | | `[Window]` | `g:spacevim_windows_leader` / `s` | window mapping prefix of SpaceVim |
| `<leader>` | `mapleader` / `` \ `` | default leader prefix of vim/neovim | | `<leader>` | `mapleader` / `\` | default leader prefix of vim/neovim |
By default the guide buffer will be displayed 1000ms after the key has been pressed. You can change the delay by setting `'timeoutlen'` option to your liking (the value is in milliseconds). By default the guide buffer will be displayed 1000ms after the key has been pressed. You can change the delay by setting `'timeoutlen'` option to your liking (the value is in milliseconds).

View File

@ -0,0 +1,63 @@
---
title: "快捷键助记导航"
categories: [blog_cn, feature_cn]
description: "快捷键助记导航会根据已输入的按键,自动智能提示下一个按键以及其功能。"
image: https://user-images.githubusercontent.com/13142418/89091735-5de96a00-d3de-11ea-85e1-b0fc64537836.gif
permalink: /cn/:title/
lang: zh
type: article
comments: true
commentsID: "快捷键助记导航"
---
# [Blogs](../blog/) >> 快捷键助记导航
<!-- vim-markdown-toc GFM -->
- [功能简介](#功能简介)
- [默认快捷键前缀](#默认快捷键前缀)
- [翻页及其他帮助信息](#翻页及其他帮助信息)
<!-- vim-markdown-toc -->
## 功能简介
在使用 SpaceVim 时,不需要记忆任何快捷键,快捷键助记导航会根据已输入的按键,智能提示下一个按键以及其功能。
导航窗口打开后,可在状态栏上可以看到已输入的按键,通常以`[SPC]`, `[Window]`, `<leader>`开头。
窗口的打开方式基于 Vim 或者 Neovim 的版本,当使用的高于以下版本的 Vim 或者 Neovim 时,将使用悬浮窗口打开:
- vim: `8.1.1364`
- neovim: `v0.4.2`
![float_guide](https://user-images.githubusercontent.com/13142418/89091735-5de96a00-d3de-11ea-85e1-b0fc64537836.gif)
若使用的是低版本的 Vim 或者 Neovim则使用分割窗口打开
![mapping guide](https://user-images.githubusercontent.com/13142418/35568184-9a318082-058d-11e8-9d88-e0eafd1d498d.gif)
## 默认快捷键前缀
| 前缀 | 配置选项及默认值 | 描述 |
| ---------- | ----------------------------------------------------- | ------------------ |
| `[SPC]` | NONE / `<Space>` | 默认快捷键前缀 |
| `[Window]` | `g:spacevim_windows_leader` / `s` | 默认窗口快捷键前缀 |
| `<leader>` | `mapleader` / `\` | 默认的 Vim 或者 Neovim 快捷键前缀 |
默认情况下,快捷键导航窗口将在按键停顿 1000ms 后自动打开,这一世间是根据 Vim 选项`'timeoutlen'` 来设定的。
例如,在 Normal 模式下,按下空格键,将可以看到:
![mapping-guide](https://cloud.githubusercontent.com/assets/13142418/25778673/ae8c3168-3337-11e7-8536-ee78d59e5a9c.png)
这一导航中,所有快捷键均已`[SPC]`为前缀,可以按下按键`b`查看 buffer 相关的快捷键,或者`p`查看 project 相关的快捷键。
## 翻页及其他帮助信息
导航窗口打开后,按下按键`Ctrl-h`,就可以在状态栏上看到帮助信息,以及三个按键功能。
| 快捷键 | 功能描述 |
| ------ | -------------- |
| `u` | 撤销上一个按键 |
| `n` | 向下翻页 |
| `p` | 向上翻页 |

View File

@ -11,6 +11,7 @@ description: "Edit markdown within vim, autopreview markdown in the default brow
- [Install](#install) - [Install](#install)
- [Formatting](#formatting) - [Formatting](#formatting)
- [options](#options) - [options](#options)
- [Tagbar](#tagbar)
- [Key bindings](#key-bindings) - [Key bindings](#key-bindings)
<!-- vim-markdown-toc --> <!-- vim-markdown-toc -->