From b228232de72aa6f9e0109fad1f93a921a41c201a Mon Sep 17 00:00:00 2001 From: Tim Allen Date: Wed, 9 Jun 2021 17:50:03 +1000 Subject: [PATCH] Clarify which parts of Kakoune the extra_word_chars option affects. Also, document the "empty option implies underscore" quirk. --- doc/pages/keys.asciidoc | 5 +++-- doc/pages/options.asciidoc | 6 +++++- doc/pages/regex.asciidoc | 9 +++++---- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/doc/pages/keys.asciidoc b/doc/pages/keys.asciidoc index 1398ee75..674541a5 100644 --- a/doc/pages/keys.asciidoc +++ b/doc/pages/keys.asciidoc @@ -95,8 +95,9 @@ it when pasting text. == Movement -'word' is a sequence of alphanumeric characters or underscore, and 'WORD' -is a sequence of non whitespace characters. Generally, a movement on its own +'word' is a sequence of alphanumeric characters, or those in the `extra_word_chars` +option (see <>). +'WORD' is a sequence of non whitespace characters. Generally, a movement on its own will move each selection to cover the text moved over, while holding down the Shift modifier and moving will extend each selection instead. diff --git a/doc/pages/options.asciidoc b/doc/pages/options.asciidoc index c12c9721..fa6602f4 100644 --- a/doc/pages/options.asciidoc +++ b/doc/pages/options.asciidoc @@ -273,7 +273,11 @@ are exclusively available to built-in options. *extra_word_chars* `codepoint-list`:: a list of all additional codepoints that should be considered - as word character. This must be set on the buffer, not the window, + part of a word, for the purposes of the `w`, `b`, and `e` commands + (See <>). + If this option is empty, Kakoune pretends it contains an + underscore, otherwise the value is used as-is. + This must be set on the buffer, not the window, for word completion to offer words containing these codepoints. *matching_pairs* `codepoint-list`:: diff --git a/doc/pages/regex.asciidoc b/doc/pages/regex.asciidoc index 9c1f4859..dc9ff516 100644 --- a/doc/pages/regex.asciidoc +++ b/doc/pages/regex.asciidoc @@ -56,10 +56,11 @@ characters, the `-` character, and the `+` character. Supported character class escapes are: -* `\d` which matches all digits. -* `\w` which matches all word characters. -* `\s` which matches all whitespace characters. -* `\h` which matches all horizontal whitespace characters. +* `\d` which matches digits 0-9. +* `\w` which matches word characters A-Z, a-z, 0-9 and underscore + (ignoring the `extra_word_chars` option). +* `\s` which matches all Unicode whitespace characters. +* `\h` which matches whitespace except Vertical Tab and line-breaks. Using an upper case letter instead of a lower case one will negate the character class. For example, `\D` will match every non-digit