2017-11-02 05:03:24 +03:00
|
|
|
= Faces
|
2016-02-03 20:15:35 +03:00
|
|
|
|
2017-11-02 05:03:24 +03:00
|
|
|
== Declaration
|
2016-02-03 20:15:35 +03:00
|
|
|
|
2016-02-11 00:03:49 +03:00
|
|
|
A 'face' refers how the specified text is displayed, it has a foreground
|
|
|
|
color, a background color, and some attributes. The value of a face has the
|
|
|
|
following format:
|
2016-02-03 20:15:35 +03:00
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
fg_color[,bg_color][+attributes]
|
|
|
|
--------------------------------
|
|
|
|
|
|
|
|
'fg_color', 'bg_color'::
|
2017-11-02 12:37:39 +03:00
|
|
|
a color whose value can be expressed in the following formats:
|
|
|
|
*black*, *red*, *green*, *yellow*, *blue*, *magenta*, *cyan*, *white*:::
|
|
|
|
a named color
|
|
|
|
*default*:::
|
|
|
|
keep the existing color
|
|
|
|
*rgb:RRGGBB*:::
|
|
|
|
hexadecimal value
|
2016-02-03 20:15:35 +03:00
|
|
|
|
|
|
|
'attributes'::
|
2017-11-02 12:37:39 +03:00
|
|
|
string whose individual letters set an attribute:
|
|
|
|
*u*:::
|
|
|
|
underline
|
|
|
|
*r*:::
|
|
|
|
reverse
|
|
|
|
*b*:::
|
|
|
|
bold
|
|
|
|
*B*:::
|
|
|
|
blink
|
|
|
|
*d*:::
|
|
|
|
dim
|
|
|
|
*i*:::
|
|
|
|
italic
|
2018-09-23 16:17:12 +03:00
|
|
|
*F*:::
|
|
|
|
final, override the previous face instead of merging with it
|
|
|
|
an will only be replaced if another face with the final
|
|
|
|
attribute is applied
|
|
|
|
*f*:::
|
|
|
|
final foreground, as final but only applies to face's
|
|
|
|
foreground color
|
|
|
|
*g*:::
|
|
|
|
final background, as final but only applies to face's
|
|
|
|
background color
|
|
|
|
*a*:::
|
|
|
|
final attributes, as final but only applies to face's
|
|
|
|
attributes
|
2016-02-03 20:15:35 +03:00
|
|
|
|
2017-11-02 05:03:24 +03:00
|
|
|
== Builtin faces
|
|
|
|
|
2016-04-08 19:00:24 +03:00
|
|
|
The following default faces are used by color schemes to highlight certain
|
2016-02-11 00:03:49 +03:00
|
|
|
areas of the user interface:
|
2016-02-02 22:15:12 +03:00
|
|
|
|
2016-02-03 20:15:35 +03:00
|
|
|
*Default*::
|
2017-11-02 12:37:39 +03:00
|
|
|
default colors
|
2016-02-03 20:15:35 +03:00
|
|
|
|
|
|
|
*PrimarySelection*::
|
2017-11-02 12:37:39 +03:00
|
|
|
main selection face for every selected character except the cursor
|
2016-02-03 20:15:35 +03:00
|
|
|
|
|
|
|
*SecondarySelection*::
|
2017-11-02 12:37:39 +03:00
|
|
|
secondary selection face for every selected character except the cursor
|
2016-02-03 20:15:35 +03:00
|
|
|
|
|
|
|
*PrimaryCursor*::
|
2017-11-02 12:37:39 +03:00
|
|
|
cursor of the primary selection
|
2016-02-03 20:15:35 +03:00
|
|
|
|
|
|
|
*SecondaryCursor*::
|
2017-11-02 12:37:39 +03:00
|
|
|
cursor of the secondary selection
|
2016-02-03 20:15:35 +03:00
|
|
|
|
2018-02-24 13:24:06 +03:00
|
|
|
*PrimaryCursorEol*::
|
|
|
|
cursor of the primary selection when it lies on and end of line character
|
|
|
|
|
|
|
|
*SecondaryCursorEol*::
|
|
|
|
cursor of the secondary selection when it lies on and end of line character
|
|
|
|
|
2016-02-03 20:15:35 +03:00
|
|
|
*MenuForeground*::
|
2017-11-02 12:37:39 +03:00
|
|
|
face for the selected element in menus
|
2016-02-03 20:15:35 +03:00
|
|
|
|
|
|
|
*MenuBackground*::
|
2017-11-02 12:37:39 +03:00
|
|
|
face for the not selected elements in menus
|
2016-02-03 20:15:35 +03:00
|
|
|
|
2016-12-16 06:49:14 +03:00
|
|
|
*MenuInfo*::
|
2017-11-02 12:37:39 +03:00
|
|
|
face for additional information for elements in menus
|
2016-12-16 06:49:14 +03:00
|
|
|
|
2016-02-03 20:15:35 +03:00
|
|
|
*Information*::
|
2017-11-02 12:37:39 +03:00
|
|
|
face for the informations windows and information messages
|
2016-02-03 20:15:35 +03:00
|
|
|
|
|
|
|
*Error*::
|
2017-11-02 12:37:39 +03:00
|
|
|
face of error messages
|
2016-02-03 20:15:35 +03:00
|
|
|
|
|
|
|
*StatusLine*::
|
2017-11-02 12:37:39 +03:00
|
|
|
face used for the status line
|
2016-02-03 20:15:35 +03:00
|
|
|
|
2016-12-16 06:49:14 +03:00
|
|
|
*StatusLineMode*::
|
2017-11-02 12:37:39 +03:00
|
|
|
face used for the current mode except the normal mode
|
2016-12-16 06:49:14 +03:00
|
|
|
|
|
|
|
*StatusLineInfo*::
|
2017-11-02 12:37:39 +03:00
|
|
|
face used for special information
|
2016-12-16 06:49:14 +03:00
|
|
|
|
|
|
|
*StatusLineValue*::
|
2017-11-02 12:37:39 +03:00
|
|
|
face used for special values (numeric prefixes, registers, etc.)
|
2016-12-16 06:49:14 +03:00
|
|
|
|
2016-02-03 20:15:35 +03:00
|
|
|
*StatusCursor*::
|
2017-11-02 12:37:39 +03:00
|
|
|
face used for the status line cursor
|
2016-02-03 20:15:35 +03:00
|
|
|
|
|
|
|
*Prompt*::
|
2017-11-02 12:37:39 +03:00
|
|
|
face used prompt displayed on the status line
|
2016-02-03 20:15:35 +03:00
|
|
|
|
2016-02-17 16:55:19 +03:00
|
|
|
*BufferPadding*::
|
2018-09-09 12:01:45 +03:00
|
|
|
face applied on the `~` characters that follow the last line of a buffer
|
2016-12-16 06:49:14 +03:00
|
|
|
|
2018-05-18 16:47:44 +03:00
|
|
|
=== Builtin highlighters faces
|
|
|
|
|
|
|
|
The following faces are used by builtin highlighters if enabled.
|
2018-09-09 12:01:45 +03:00
|
|
|
(See <<highlighters#,`:doc highlighters`>>).
|
2018-05-18 16:47:44 +03:00
|
|
|
|
|
|
|
*LineNumbers*::
|
2018-07-08 12:11:04 +03:00
|
|
|
face used by the `number-lines` highlighter
|
2018-05-18 16:47:44 +03:00
|
|
|
|
|
|
|
*LineNumberCursor*::
|
|
|
|
face used to highlight the line number of the main selection
|
|
|
|
|
|
|
|
*LineNumbersWrapped*::
|
|
|
|
face used to highlight the line number of wrapped lines
|
|
|
|
|
|
|
|
*MatchingChar*::
|
2018-07-08 12:11:04 +03:00
|
|
|
face used by the `show-matching` highlighter
|
2018-05-18 16:47:44 +03:00
|
|
|
|
2016-12-16 06:49:14 +03:00
|
|
|
*Whitespace*::
|
2018-07-08 12:11:04 +03:00
|
|
|
face used by the `show-whitespaces` highlighter
|
2018-09-25 09:41:53 +03:00
|
|
|
|
|
|
|
== Markup strings
|
|
|
|
|
|
|
|
In certain contexts, Kakoune can take a markup string, which is a string
|
|
|
|
containing formatting informations. In these strings, the {facename}
|
|
|
|
syntax will enable the face facename until another face gets activated,
|
|
|
|
or the end of the string is reached.
|
|
|
|
|
|
|
|
For example, the following command displays the text "default" in the
|
|
|
|
Default face, and "error" in the Error face:
|
|
|
|
|
|
|
|
----
|
|
|
|
echo -markup 'default {Error}error{Default} default'
|
|
|
|
----
|
|
|
|
|
|
|
|
Inside a markup string, a literal `{` character is written `\{`, and a
|
|
|
|
literal backslash (`\`) that precedes a '{' character is escaped as well
|
|
|
|
(`\\`).
|