Skip to content

Keymap ​

This page has not been written yet.

Each table below filters as you type, and the helix / vim buttons switch which keymap it answers in; the choice is remembered across the page. Only the match group is written so far.

Match: m ​

m is the group for pairs and the text between them, as in helix: go to the other bracket, select inside or around something, and add, delete or replace a pair. Each step shows a menu of what it takes, so you can press m and read on. Under the vim keymap the same things are vim-surround's keys.

Nothing matches.

What mi and ma take ​

mi selects the inside, ma the inside with whatever surrounds it. The examples use one sentence, with the cursor on 期:

他说:「今天(星期三)要下雨,记得带伞。」然后就走了。

KeysObjectSelects
mi wword星期三
mi ssentence他说:「今天(星期三)要下雨,记得带伞。」
mi pparagraphthe whole paragraph
mi mthe nearest pair, whichever kind星期三
ma m…with the pair(星期三)
mi (inside the parentheses (( covers () too)星期三
mi 「inside the Chinese brackets今天(星期三)要下雨,记得带伞。

Markdown marks are k, for markup. On a **bc** d with the cursor on b:

KeysSelects
mi kbc
ma k**bc**

k also takes *italic*, ~~struck~~, ==marked==, `code`, links and [[wiki links]].

In code, four more: on fn add(a: i32, b: i32) -> i32 { a + b }, with the cursor on the parameter b:

KeysObjectSelects
mi ffunctionthe whole fn add(…) { a + b }
mi aparameterb: i32
mi ccomment (in a table: this cell)the comment the cursor is in
mi ttype definitionthe struct or enum the cursor is in

Any character that is not a letter or a digit works as a pair: mi $ on $xy$ selects xy.

What ms, md and mr take ​

A bracket (either half), a quote, a Chinese bracket, or any other character, which then pairs with itself. md and mr also take m for the nearest pair, and md takes k for Markdown marks.

TextKeysResult
foo bar, foo selectedms ((foo) bar
foo bar, foo selectedms 「「foo」 bar
foo bar, foo selectedms **foo* bar
a (bc) dmd (a bc d
a *x* bmd *a x b
这是 **一句话** 的例子md k这是 一句话 的例子
这是 [字](http://a) 的例子md k这是 字 的例子
这是 [字](http://a) 的例子md m这是 字(http://a) 的例子, as helix does
f(a)mr ( [f[a]
a $x$ bmr $ (a (x) b

In every example the cursor stands inside the pair. Under the vim keymap, ds( is md (, cs([ is mr ( [, and ysiw( surrounds the word.

yumete is released under the MIT License.