在Spacemacs中生成带有键绑定的降价表

问题描述 投票:-2回答:1

在Spacemacs(邪恶模式)中使用键绑定生成降价表的最佳方法是什么?

更新:为了澄清,这个问题不是关于编辑markdown,而是自动生成大量键绑定的表内容。

这可能是一个elisp函数迭代可能的单击键(字母,数字,标点符号,可能是空格和一些控制字符,有和没有修饰键),查看每个键绑定到哪个函数(如果有的话),并得到功能描述。

你可以使用SPC h d k手动完成,但是考虑到可能的键绑定的数量以及它们依赖于缓冲模式和状态的方式,生成表会很方便。

该表应显示带有和不带修饰符的单击键(字母,数字,标点符号),绑定到它们的函数以及函数描述的第一行。

结果应如下所示:

https://github.com/cjolowicz/howto/blob/master/spacemacs.md

| Key    | Mnemonic     | Description                                                     | Function                   |
| ------ | --------     | --------------------------------------------------------------- | ------------------------   |
| a      | *append*     | Switch to Insert state just after point.                        | `evil-append`              |
| b      | *backward*   | Move the cursor to the beginning of the COUNT-th previous word. | `evil-backward-word-begin` |
| c      | *change*     | Change text from BEG to END with TYPE.                          | `evil-change`              |
| d      | *delete*     | Delete text from BEG to END with TYPE.                          | `evil-delete`              |
| e      | *end*        | Move the cursor to the end of the COUNT-th next word.           | `evil-forward-word-end`    |
| f      | *find*       | Move to the next COUNT’th occurrence of CHAR.                   | `evil-find-char`           |
| g      | *goto*       | (prefix)                                                        |                            |
| h      |              | Move cursor to the left by COUNT characters.                    | `evil-backward-char`       |
| i      | *insert*     | Switch to Insert state just before point.                       | `evil-insert`              |
| j      |              | Move the cursor COUNT lines down.                               | `evil-next-line`           |
| k      |              | Move the cursor COUNT lines up.                                 | `evil-previous-line`       |
| l      |              | Move cursor to the right by COUNT characters.                   | `evil-forward-char`        |
| m      | *mark*       | Set the marker denoted by CHAR to position POS.                 | `evil-set-marker`          |
| n      | *next*       | Goes to the next occurrence.                                    | `evil-ex-search-next`      |
| o      | *open*       | Insert a new line below point and switch to Insert state.       | `evil-open-below`          |
| p      | *paste*      | Disable paste transient state if there is more than 1 cursor.   | `evil-mc-paste-after`      |
| q      |              | Record a keyboard macro into REGISTER.                          | `evil-record-macro`        |
| r      | *replace*    | Replace text from BEG to END with CHAR.                         | `evil-replace`             |
| s      | *substitute* | Change a character.                                             | `evil-substitute`          |
| t      | *to*         | Move before the next COUNT’th occurrence of CHAR.               | `evil-find-char-to`        |
| u      | *undo*       | Undo changes.                                                   | `evil-tree-undo`           |
| v      | *visual*     | Characterwise selection.                                        | `evil-visual-char`         |
| w      | *word*       | Move the cursor to the beginning of the COUNT-th next word.     | `evil-forward-word-begin`  |
| x      | *cross*      | Delete next character.                                          | `evil-delete-char`         |
| y      | *yank*       | Saves the characters in motion into the kill-ring.              | `evil-yank`                |
| z      | *scroll*     | (prefix)                                                        |                            |

(Mnemonic专栏当然是手工制作的。)

emacs markdown elisp spacemacs
1个回答
0
投票

Org附带的orgtbl-mode minor mode(以及Emacs本身)应该能够在这里提供帮助。激活它,然后使用Tab和Ret从一个单元格导航到另一个单元格,让orgtbl随时创建和平衡单元格。 (导航到新单元格时会发生平衡,例如使用Tab。)

你必须自己开始表,例如喜欢的东西

| Key | Mnemonic | Description | Function |
|-

但是从那里orgtbl可以接管。您还可以使用org-table-insert-columnorg-table-move-row-down之类的内容进行其他类型的表格更改。

我不完全确定这会与evil-mode有多好用,或者它会使用什么样的绑定开箱即用,但值得一试。

© www.soinside.com 2019 - 2024. All rights reserved.