From 80aad263dfc6cff1b65deedd071679d0c8dbd35d Mon Sep 17 00:00:00 2001 From: Denis Revunov Date: Fri, 4 Nov 2022 00:30:50 +0300 Subject: [PATCH] Prettify doc --- src/excmds.ts | 23 ++++++++++++----------- src/lib/config.ts | 12 +++++++++--- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/src/excmds.ts b/src/excmds.ts index 38d22c8c..e9308af7 100644 --- a/src/excmds.ts +++ b/src/excmds.ts @@ -4260,17 +4260,18 @@ export async function bind(...args: string[]) { } /** - * Register key combination from keyboard until enter is pressed, and send it to [[bind]] - * with provided arguments. - * If you have alwaysqwerty enabled, it will bind commands to physical keys - * - * Used same as bind, but without key provided: - * `bindkey [command]`, then press the keys you want to bind, then hit Enter. - * `bindkey --mode=[mode] [command]` also works. - * - * You can execute it without arguments to see what is bound to the keys you type. - * - */ + Register key combination from keyboard until enter is pressed, and send it to [[bind]] + with provided arguments. + + If you have alwaysqwerty enabled, it will bind commands to physical keys. + + Used same as bind, but without key provided: + + - `bindkey [command]`, then press the keys you want to bind, then hit Enter. + - `bindkey --mode=[mode] [command]` also works. + + You can execute it without arguments to see what is bound to the keys you type. +*/ export async function bindkey(...args: string[]) { let mode = "normal" if (args.length && args[0].startsWith("--mode=")) { diff --git a/src/lib/config.ts b/src/lib/config.ts index d0c0fbd7..0e18fe9b 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -514,11 +514,16 @@ export class default_config { * Map for translating keys directly into other keys in normal-ish modes. * For example, if you have an entry in this config option mapping `п` to `g`, * then you could type `пп` instead of `gg` or `пi` instead of `gi` or `;п` instead - * of `;g`. This was primarily useful for international users, but now you can set - * alwaysqwerty true, which will make everything layout-independent. + * of `;g`. + * + * This was primarily useful for international users, but now you can `set + * alwaysqwerty true`, which will make everything layout-independent. * However, if you don't want qwerty, you can use it to map keys however you like - * and still have layout-independent behavior. For example, you may want to map 'a' to 'q` on azerty + * and still have layout-independent behavior. + * + * For example, you may want to map 'a' to 'q` on azerty * or 'r' to 'p' if you use dvorak. + * * Note that the current implementation does not allow you to "chain" keys, for example, "a"=>"b" and "b"=>"c" for "a"=>"c". You can, however, swap or rotate keys, so "a"=>"b" and "b"=>"a" will work the way you'd expect, as will "a"=>"b" and "b"=>"c" and "c"=>"a". */ keytranslatemap = { @@ -546,6 +551,7 @@ export class default_config { * Instead of fetching actual character which depends on selected layout, * use machine code of a key. Makes any keyboard work as if it is qwerty. * Recommended for everyone, especially multilingual. + * * If you don't want qwerty, you can use keytranslatemap to map it to something else, * and this setting is still useful because it makes all events tied to the physical * keys.