diff options
| author | Maxime Coste <mawww@kakoune.org> | 2020-04-06 11:13:24 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2020-04-06 11:23:47 +1000 |
| commit | f7a2ecfacb566a219d9deef3a5cfaa2d1c5bd404 (patch) | |
| tree | eb044d77d2c31c40b4b99767b22bca9e505f44ba /doc | |
| parent | c585107ab5e7155f7da648c3752cf360f7156177 (diff) | |
Support empty ranges in replace-ranges highlighter
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/pages/changelog.asciidoc | 2 | ||||
| -rw-r--r-- | doc/pages/options.asciidoc | 40 |
2 files changed, 31 insertions, 11 deletions
diff --git a/doc/pages/changelog.asciidoc b/doc/pages/changelog.asciidoc index 4e706c89..a4ed429b 100644 --- a/doc/pages/changelog.asciidoc +++ b/doc/pages/changelog.asciidoc @@ -5,6 +5,8 @@ released versions. == Development version +* replace-ranges highlighter now support empty ranges + * `%var{...}` now expands to list of strings, `$kak_quoted_...` now work as expected with these. diff --git a/doc/pages/options.asciidoc b/doc/pages/options.asciidoc index d074accf..db070781 100644 --- a/doc/pages/options.asciidoc +++ b/doc/pages/options.asciidoc @@ -88,19 +88,37 @@ are exclusively available to built-in options. *range-specs*:: a timestamp (like `%val{timestamp}`, see <<expansions#value-expansions,`:doc expansions value-expansions`>>) - followed by a list of range descriptors. Each range descriptor must use - the syntax `a.b,c.d|string` or `a.b+length|string`, where _a_ is the line - containing the first character, _b_ is the number of bytes from the start - of the line to the first byte of the first character, _c_ is the line - containing the last character, _d_ is the number of bytes from the start of - the line to the first byte of the last character, _length_ is the length of - the range in bytes and _string_ is an arbitrary string which is associated - with the range. All numeric fields are 1-based. When the `update-option` is - used on an option of this type, its ranges gets updated according to all the - buffer modifications that happened since its timestamp. See - <<highlighters#specs-highlighters,`:doc highlighters specs-highlighters`>>) + followed by a list of range descriptors. + + Each range descriptor must use the syntax `a.b,c.d|string` or + `a.b+length|string`, with: + + * _a_ is the line containing the first character + + * _b_ is the number of bytes from the start of the line to the + first byte of the first character + + * _c_ is the line containing the last character + + * _d_ is the number of bytes from the start of the line to the + first byte of the last character + + * _length_ is the length of the range in bytes, if 0 the range + is empty, but still valid. + + * _string_ is an arbitrary string which is associated with + the range. + + All numeric fields are 1-based. + + When the `update-option` is used on an option of this type, its + ranges gets updated according to all the buffer modifications that + happened since its timestamp. + `set -add` appends the new pair to the list + See <<highlighters#specs-highlighters,`:doc highlighters specs-highlighters`>>) + *line-specs*:: a list of a line number and a corresponding flag (`<line>|<flag text>`), except for the first element which is just the timestamp |
