scopes - a
Scopes are groups in which a particular Kakoune object (a variable, hook, alias etc) can have different values, depending on the group the value was declared in.
NAMES AND HIERARCHY¶
Scopes are named as follows:
The following order of priority applies to the above scopes:
window ]> buffer ]> global
The above priority line implies that objects can have individual values that will be resolved first in the window scope (highest priority), then in the buffer scope, and finally in the global scope (lowest priority).
The scope paradigm is very useful as it allows the user to customize the behavior of the editor without modifying the configuration globally, as is the case with other editors who only have a single global scope by default.
Some commands work in a specific context that might exclude one or several scopes altogether, consequently ignoring some values of a given object.
Example: the window scope is never considered when resolving the values of options when writing a buffer (e.g. BOM, eolformat).