documentation pages: Remove tabs

This commit is contained in:
Maxime Coste 2017-11-02 17:37:39 +08:00
parent 3c2159f06c
commit 4c3d36f9fe
10 changed files with 660 additions and 660 deletions

View File

@ -7,161 +7,161 @@ the execution of the command (i.e. to quit a modified buffer, the
command *q!* has to be used). Aliases are mentionned below each commands.
*change-directory* [<directory>]::
*alias* cd +
change the current directory to *directory*, or the home directory if
unspecified
*alias* cd +
change the current directory to *directory*, or the home directory if
unspecified
*doc* <topic>::
*alias* help +
display documentation about a topic. The completion list displays the
available topics
*alias* help +
display documentation about a topic. The completion list displays the
available topics
*edit[!]* <filename> [<line> [<column>]]::
*alias* e +
open buffer on file, go to given line and column. If file is already
opened, just switch to this file. Use edit! to force reloading
*alias* e +
open buffer on file, go to given line and column. If file is already
opened, just switch to this file. Use edit! to force reloading
*write[!]* [<filename>]::
*alias* w +
write buffer to <filename> or use its name if filename is not
given. If the file is write-protected, its permissions are temporarily
changed to allow saving the buffer and restored afterwards when
the write! command is used.
*alias* w +
write buffer to <filename> or use its name if filename is not
given. If the file is write-protected, its permissions are temporarily
changed to allow saving the buffer and restored afterwards when
the write! command is used.
*write-all*::
*alias* wa +
write all buffers that are associated to a file
*alias* wa +
write all buffers that are associated to a file
*quit!* [<exit status>]::
*alias* q +
exit Kakoune, use quit! to force quitting even if there is some
unsaved buffers remaining. If specified, the client exit status
will be set to <exit status>
*alias* q +
exit Kakoune, use quit! to force quitting even if there is some
unsaved buffers remaining. If specified, the client exit status
will be set to <exit status>
*write-all-quit* [<exit status>]::
*alias* waq +
write all buffers and quit. If specified, the client exit status
will be set to <exit status>
*alias* waq +
write all buffers and quit. If specified, the client exit status
will be set to <exit status>
*kill[!]*::
terminate the current session, all the clients as well as the server
terminate the current session, all the clients as well as the server
*buffer* <name>::
*alias* b +
switch to buffer <name>
*alias* b +
switch to buffer <name>
*buffer-next*::
*alias* bn +
switch to the next buffer
*alias* bn +
switch to the next buffer
*buffer-prev*::
*alias* bp +
switch to the previous buffer
*alias* bp +
switch to the previous buffer
*delete-buffer[!]* [<name>]::
*alias* db +
delete the buffer <name>
*alias* db +
delete the buffer <name>
*source* <filename>::
execute commands in <filename>
execute commands in <filename>
*colorscheme* <name>::
load named colorscheme
load named colorscheme
*rename-client* <name>::
*alias* nc +
set current client name
*alias* nc +
set current client name
*rename-buffer* <name>::
set current buffer name
set current buffer name
*rename-session* <name>::
set current session name
set current session name
*echo* [options] <text>::
show *text* in status line, with the following *options*:
show *text* in status line, with the following *options*:
*-markup*:::
expand the markup strings in *text* (c.f. the 'expansions' documentation page)
*-markup*:::
expand the markup strings in *text* (c.f. the 'expansions' documentation page)
*-debug*:::
print the given text to the *\*debug** buffer
*-debug*:::
print the given text to the *\*debug** buffer
*nop*::
does nothing, but arguments will be evaluated (e.g. shell expansion)
does nothing, but arguments will be evaluated (e.g. shell expansion)
*fail* <text>::
raise an error, uses <text> as its description
raise an error, uses <text> as its description
*declare-option* [-hidden] <type> <name> [<value>]::
*alias* decl +
declare a new option, the -hidden hides the option in completion
suggestions (c.f. the 'options' documentation page)
*alias* decl +
declare a new option, the -hidden hides the option in completion
suggestions (c.f. the 'options' documentation page)
*set-option* <scope> <name> <value>::
*alias* set +
change the value of an option (c.f. the 'options' documentation page),
note that the name of a particular buffer can be specified when the
target *scope* is 'buffer', e.g. set buffer=/path/to/buffer foo "bar";
the scope can also take the `current` special value, which will automatically
point to the narrowest scope available in the current context
*alias* set +
change the value of an option (c.f. the 'options' documentation page),
note that the name of a particular buffer can be specified when the
target *scope* is 'buffer', e.g. set buffer=/path/to/buffer foo "bar";
the scope can also take the `current` special value, which will automatically
point to the narrowest scope available in the current context
*unset-option* <scope> <name>::
*alias* unset +
unset the value of an option (c.f. the 'options' documentation page)
*alias* unset +
unset the value of an option (c.f. the 'options' documentation page)
*update-option* <scope> <name>::
update the value of an option if its type supports that operation
(c.f. the 'options' documentation page)
update the value of an option if its type supports that operation
(c.f. the 'options' documentation page)
*alias* <scope> <name> <command>::
define a new alias, within the context of a scope
define a new alias, within the context of a scope
*unalias* <scope> <name> [<command>]::
remove an alias if its current value is the same as the one passed
as an optional parameter, remove it unconditionally otherwise
remove an alias if its current value is the same as the one passed
as an optional parameter, remove it unconditionally otherwise
*set-face* <name> <facespec>::
*alias* face +
define a face (c.f. the 'faces' documentation page)
*alias* face +
define a face (c.f. the 'faces' documentation page)
*exec* [<flags>] <key> ...::
execute a series of keys, as if they were hit (c.f. the 'execeval'
documentation page)
execute a series of keys, as if they were hit (c.f. the 'execeval'
documentation page)
*eval* [<flags>] <command> ...::
execute commands, as if they were entered in the command prompt
(c.f. the 'execeval' documentation page)
execute commands, as if they were entered in the command prompt
(c.f. the 'execeval' documentation page)
*define-command* [<flags>] <name> <command>::
*alias* def +
define a new command (c.f. the 'Declaring new commands' section below)
*alias* def +
define a new command (c.f. the 'Declaring new commands' section below)
*map* <scope> <mode> <key> <keys>::
bind a list of keys to a combination (c.f. the 'mapping' documentation
page)
bind a list of keys to a combination (c.f. the 'mapping' documentation
page)
*unmap* <scope> <mode> <key> [<expected>]::
unbind a key combination (c.f. the 'mapping' documentation page)
unbind a key combination (c.f. the 'mapping' documentation page)
*hook* [-group <group>] <scope> <hook_name> <filtering_regex> <command>::
execute a command whenever an event is triggered (c.f. the 'hooks'
documentation page)
execute a command whenever an event is triggered (c.f. the 'hooks'
documentation page)
*remove-hooks* <scope> <group>::
*alias* rmhooks +
remove every hooks in *scope* that are part of the given *group*
(c.f. the 'hooks' documentation page)
*alias* rmhooks +
remove every hooks in *scope* that are part of the given *group*
(c.f. the 'hooks' documentation page)
*add-highlighter* [<flags>] <highlighter_name> <highlighter_parameters> ...::
*alias* addhl +
add a highlighter to the current window (c.f. the 'highlighters'
documentation page)
*alias* addhl +
add a highlighter to the current window (c.f. the 'highlighters'
documentation page)
*remove-highlighter* <highlighter_id>::
*alias* rmhl +
remove the highlighter whose id is *highlighter_id* (c.f. the
'highlighters' documentation page)
*alias* rmhl +
remove the highlighter whose id is *highlighter_id* (c.f. the
'highlighters' documentation page)
== Helpers
@ -169,57 +169,57 @@ Kakoune provides some helper commands that can be used to define composite
commands:
*prompt* <prompt> <command>::
prompt the user for a string, when the user validates, executes the
command. The entered text is available in the `text` value accessible
through `$kak_text` in shells or `%val{text}` in commands.
prompt the user for a string, when the user validates, executes the
command. The entered text is available in the `text` value accessible
through `$kak_text` in shells or `%val{text}` in commands.
The *-init <str>* switch allows setting initial content, the
*-password* switch hides the entered text and clears the register
after command execution.
The *-init <str>* switch allows setting initial content, the
*-password* switch hides the entered text and clears the register
after command execution.
The *-on-change* and *-on-abort* switches, followed by a command
will have this command executed whenever the prompt content changes
or the prompt is aborted, respectively.
*on-key* <command>::
wait for next key from user, then execute <command>, the key is
available through the `key` value, accessible through `$kak_key`
in shells, or `%val{key}` in commands.
wait for next key from user, then execute <command>, the key is
available through the `key` value, accessible through `$kak_key`
in shells, or `%val{key}` in commands.
*menu* <label1> <commands1> <label2> <commands2> ...::
display a menu using labels, the selected labels commands are
executed. The *menu* command can take an *-auto-single* argument, to automatically
run commands when only one choice is provided, and a *-select-cmds*
argument, in which case menu takes three argument per item, the
last one being a command to execute when the item is selected (but
not validated)
display a menu using labels, the selected labels commands are
executed. The *menu* command can take an *-auto-single* argument, to automatically
run commands when only one choice is provided, and a *-select-cmds*
argument, in which case menu takes three argument per item, the
last one being a command to execute when the item is selected (but
not validated)
*info* [options] <text>::
display text in an information box with the following *options*:
display text in an information box with the following *options*:
*-anchor* <line>.<column>:::
print the text at the given coordinates
*-anchor* <line>.<column>:::
print the text at the given coordinates
*-placement* {above,below}:::
set the placement relative to the anchor
*-placement* {above,below}:::
set the placement relative to the anchor
*-title* <text>:::
set the title of the message box
*-title* <text>:::
set the title of the message box
*try* <commands> catch <on_error_commands>::
prevent an error in *commands* from aborting the whole command
execution, execute *on_error_commands* instead. If nothing is to be
done on error, the catch part can be omitted
prevent an error in *commands* from aborting the whole command
execution, execute *on_error_commands* instead. If nothing is to be
done on error, the catch part can be omitted
*set-register* <name> <content>::
*alias* reg +
set register *name* to *content*
*alias* reg +
set register *name* to *content*
*select* <anchor_line>.<anchor_column>,<cursor_line>.<cursor_column>:...::
replace the current selections with the one described in the argument
replace the current selections with the one described in the argument
*debug* {info,buffers,options,memory,shared-strings,profile-hash-maps,faces,mappings}::
print some debug information in the *\*debug** buffer
print some debug information in the *\*debug** buffer
Note that those commands are also available in the interactive mode, but
are not really useful in that context.
@ -235,45 +235,45 @@ backslash (\;) to be considered as a literal semicolon argument
New commands can be defined using the *define-command* command:
*define-command* [flags] <command_name> <commands>::
*commands* is a string containing the commands to execute, and *flags*
can be any combination of the following parameters:
*commands* is a string containing the commands to execute, and *flags*
can be any combination of the following parameters:
*-params* <num>:::
the command accepts a *num* parameter, which can be either a number,
or of the form <min>..<max>, with both <min> and <max> omittable
the command accepts a *num* parameter, which can be either a number,
or of the form <min>..<max>, with both <min> and <max> omittable
*-file-completion*:::
try file completion on any parameter passed to this command
try file completion on any parameter passed to this command
*-client-completion*:::
try client name completion on any parameter passed to this command
try client name completion on any parameter passed to this command
*-buffer-completion*:::
try buffer name completion on any parameter passed to this command
try buffer name completion on any parameter passed to this command
*-command-completion*:::
try command completion on any parameter passed to this command
try command completion on any parameter passed to this command
*-shell-completion*:::
following string is a shell command which takes parameters as
positional params and output one completion candidate per line.
The provided shell command will run after each keypress
following string is a shell command which takes parameters as
positional params and output one completion candidate per line.
The provided shell command will run after each keypress
*-shell-candidates*:::
following string is a shell command which takes parameters as
positional params and output one completion candidate per line.
The provided shell command will run once at the beginning of each
completion session, candidates are cached and then used by kakoune
internal fuzzy engine
following string is a shell command which takes parameters as
positional params and output one completion candidate per line.
The provided shell command will run once at the beginning of each
completion session, candidates are cached and then used by kakoune
internal fuzzy engine
*-allow-override*:::
allow the new command to replace an existing one with the same name
allow the new command to replace an existing one with the same name
*-hidden*:::
do not show the command in command name completions
do not show the command in command name completions
*-docstring*:::
define the documentation string for the command
define the documentation string for the command
Using shell expansion allows defining complex commands or accessing
Kakoune's state:

View File

@ -21,36 +21,36 @@ when the commands have been executed: */*, *"*, *|*, *^*, *@*.
== Optional flags
*-client* <name>::
execute in the context of the client named *name*
execute in the context of the client named *name*
*-try-client* <name>::
execute in the context of the client named *name* if such client
exists, or else in the current context
execute in the context of the client named *name* if such client
exists, or else in the current context
*-draft*::
execute in a copy of the context of the selected client. Modifications
to the selections or input state will not affect the client. This
permits to make some modification to the buffer without modifying
the users selection
execute in a copy of the context of the selected client. Modifications
to the selections or input state will not affect the client. This
permits to make some modification to the buffer without modifying
the users selection
*-itersel*::
execute once per selection, in a context with only the considered
selection. This permits avoiding cases where the selections may
get merged
execute once per selection, in a context with only the considered
selection. This permits avoiding cases where the selections may
get merged
*-buffer* <names>::
execute in the context of each buffers in the comma separated list
*names*, as a name can be used to iterate on all buffers
execute in the context of each buffers in the comma separated list
*names*, as a name can be used to iterate on all buffers
*-no-hooks*::
disable hook execution while executing the keys/commands
disable hook execution while executing the keys/commands
*-with-maps*::
use user key mapping in instead of built in keys (*exec* only)
use user key mapping in instead of built in keys (*exec* only)
*-save-regs* <regs>::
regs is a string of registers to be restored after execution (overwrites
the list of registers saved by default, c.f. description)
regs is a string of registers to be restored after execution (overwrites
the list of registers saved by default, c.f. description)
*-collapse-jumps*::
collapse all jumps into a single one from initial selection
collapse all jumps into a single one from initial selection

View File

@ -3,22 +3,22 @@
== Strings
\'strings'::
uninterpreted strings, use a backslash (\') to escape the separator
uninterpreted strings, use a backslash (\') to escape the separator
"strings"::
expanded strings, % strings (c.f. next section) contained are expended,
use a backslash (\\%) to escape the separator
expanded strings, % strings (c.f. next section) contained are expended,
use a backslash (\\%) to escape the separator
%\{strings\}::
these strings are very useful when entering commands
these strings are very useful when entering commands
+
* the '{' and '}' delimiters are configurable, you can use any non
alphanumeric character
* the '{' and '}' delimiters are configurable, you can use any non
alphanumeric character
+
----------------------------------------------------------
e.g. %[string], %<string>, %(string), %~string~, %!string!
----------------------------------------------------------
* if the character following '%' is one of '{[(<', then the closing
one is the matching '}])>' and the delimiters are not escapable but
are nestable
* if the character following '%' is one of '{[(<', then the closing
one is the matching '}])>' and the delimiters are not escapable but
are nestable
+
-----------------------------------------------------------
e.g. %{ roger {}; } is a valid string, %{ marcel \} as well
@ -32,21 +32,21 @@ expanded according to the given *<type>* using *<content>* as its
parameter:
*sh*::
shell expansion, similar to posix shell '$(...)' construct (c.f. next
section)
shell expansion, similar to posix shell '$(...)' construct (c.f. next
section)
*reg*::
register expansion, will expand to the content of the register named
by *<content>*.
register expansion, will expand to the content of the register named
by *<content>*.
*opt*::
option expansion, will expand to the value of the option named by
*<content>*
option expansion, will expand to the value of the option named by
*<content>*
*val*::
value expansion, will expand to the value of the environment variables
available to shell expansion. *<content>* shall be the name of that
variable without the *kak_* prefix.
value expansion, will expand to the value of the environment variables
available to shell expansion. *<content>* shall be the name of that
variable without the *kak_* prefix.
*arg*::
argument expansion, expand to the arguments of the current
command, *<content>* can be a number, or @ for all arguments
argument expansion, expand to the arguments of the current
command, *<content>* can be a number, or @ for all arguments
== Shell expansions
@ -55,72 +55,72 @@ shell commands in it. The following environment variables are used to pass
informations about Kakoune's state:
*kak_selection*::
content of the main selection
content of the main selection
*kak_selections*::
content of the selection separated by colons, colons in the selection
contents are escaped with a backslash
content of the selection separated by colons, colons in the selection
contents are escaped with a backslash
*kak_selection_desc*::
range of the main selection, represented as anchor,cursor; anchor
and cursor are in this format: line.column
range of the main selection, represented as anchor,cursor; anchor
and cursor are in this format: line.column
*kak_selections_desc*::
range of the selections separated by colons
range of the selections separated by colons
*kak_bufname*::
name of the current buffer
name of the current buffer
*kak_buffile*::
full path of the file or same as kak_bufname when theres no
associated file
full path of the file or same as kak_bufname when theres no
associated file
*kak_buflist*::
the current buffer list, each buffer separated by a colon
the current buffer list, each buffer separated by a colon
*kak_buf_line_count*::
the current buffer line count
the current buffer line count
*kak_timestamp*::
timestamp of the current buffer, the timestamp is an integer value
which is incremented each time the buffer is modified
timestamp of the current buffer, the timestamp is an integer value
which is incremented each time the buffer is modified
*kak_history_id*::
history id of the current buffer, the history id is an integer value
which is used to reference a specific buffer version in the undo tree
history id of the current buffer, the history id is an integer value
which is used to reference a specific buffer version in the undo tree
*kak_runtime*::
directory containing the kak binary
directory containing the kak binary
*kak_count*::
count parameter passed to the command
count parameter passed to the command
*kak_opt_<name>*::
value of option *name*
value of option *name*
*kak_reg_<r>*::
value of register *r*
value of register *r*
*kak_session*::
name of the current session
name of the current session
*kak_client*::
name of the current client
name of the current client
*kak_client_pid*::
process id of the current client
process id of the current client
*kak_client_list*::
list of clients connected to the current session
list of clients connected to the current session
*kak_source*::
path of the file currently getting executed (through the source
command)
path of the file currently getting executed (through the source
command)
*kak_modified*::
buffer has modifications not saved
buffer has modifications not saved
*kak_cursor_line*::
line of the end of the main selection
line of the end of the main selection
*kak_cursor_column*::
column of the end of the main selection (in byte)
column of the end of the main selection (in byte)
*kak_cursor_char_value*::
unicode value of the codepoint under the cursor
unicode value of the codepoint under the cursor
*kak_cursor_char_column*::
column of the end of the main selection (in character)
column of the end of the main selection (in character)
*kak_cursor_byte_offset*::
Offset of the main selection from the beginning of the buffer (in bytes).
Offset of the main selection from the beginning of the buffer (in bytes).
*kak_window_width*::
width of the current kakoune window
width of the current kakoune window
*kak_window_height*::
height of the current kakoune window
height of the current kakoune window
*kak_hook_param*::
filtering text passed to the currently executing hook
filtering text passed to the currently executing hook
*kak_hook_param_capture_N*::
text captured by the hook filter regex capture N
text captured by the hook filter regex capture N
*kak_client_env_<name>*::
value of the *name* variable in the client environment
(e.g. *$kak_client_env_SHELL* is the SHELL variable)
value of the *name* variable in the client environment
(e.g. *$kak_client_env_SHELL* is the SHELL variable)
Note that in order for Kakoune to pass a value in the environment, the
variable has to be spelled out within the body of the expansion

View File

@ -11,31 +11,31 @@ fg_color[,bg_color][+attributes]
--------------------------------
'fg_color', 'bg_color'::
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
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
'attributes'::
string whose individual letters set an attribute:
*u*:::
underline
*r*:::
reverse
*b*:::
bold
*B*:::
blink
*d*:::
dim
*i*:::
italic
*e*:::
exclusive, override previous faces instead of merging
with them
string whose individual letters set an attribute:
*u*:::
underline
*r*:::
reverse
*b*:::
bold
*B*:::
blink
*d*:::
dim
*i*:::
italic
*e*:::
exclusive, override previous faces instead of merging
with them
== Builtin faces
@ -43,67 +43,67 @@ The following default faces are used by color schemes to highlight certain
areas of the user interface:
*Default*::
default colors
default colors
*PrimarySelection*::
main selection face for every selected character except the cursor
main selection face for every selected character except the cursor
*SecondarySelection*::
secondary selection face for every selected character except the cursor
secondary selection face for every selected character except the cursor
*PrimaryCursor*::
cursor of the primary selection
cursor of the primary selection
*SecondaryCursor*::
cursor of the secondary selection
cursor of the secondary selection
*LineNumbers*::
face used by the number_lines highlighter
face used by the number_lines highlighter
*LineNumberCursor*::
face used to highlight the line number of the main selection
face used to highlight the line number of the main selection
*LineNumbersWrapped*::
face used to highlight the line number of wrapped lines
face used to highlight the line number of wrapped lines
*MenuForeground*::
face for the selected element in menus
face for the selected element in menus
*MenuBackground*::
face for the not selected elements in menus
face for the not selected elements in menus
*MenuInfo*::
face for additional information for elements in menus
face for additional information for elements in menus
*Information*::
face for the informations windows and information messages
face for the informations windows and information messages
*Error*::
face of error messages
face of error messages
*StatusLine*::
face used for the status line
face used for the status line
*StatusLineMode*::
face used for the current mode except the normal mode
face used for the current mode except the normal mode
*StatusLineInfo*::
face used for special information
face used for special information
*StatusLineValue*::
face used for special values (numeric prefixes, registers, etc.)
face used for special values (numeric prefixes, registers, etc.)
*StatusCursor*::
face used for the status line cursor
face used for the status line cursor
*Prompt*::
face used prompt displayed on the status line
face used prompt displayed on the status line
*MatchingChar*::
face used by the show_matching highlighter
face used by the show_matching highlighter
*BufferPadding*::
face applied on the characters that follow the last line of a buffer
face applied on the characters that follow the last line of a buffer
*Whitespace*::
face used by the show_whitespaces highlighter
face used by the show_whitespaces highlighter

View File

@ -27,91 +27,91 @@ ids.
== General highlighters
*regex* <ex> <capture_id>:<face> ...::
highlight a regex, takes the regex as first parameter, followed by
any number of face parameters. For example:
highlight a regex, takes the regex as first parameter, followed by
any number of face parameters. For example:
-------------------------------------------------------------------
add-highlighter window regex //\h*(TODO:)[^\n]* 0:cyan 1:yellow,red
-------------------------------------------------------------------
will highlight C++ style comments in cyan, with an eventual 'TODO:'
in yellow on red background
will highlight C++ style comments in cyan, with an eventual 'TODO:'
in yellow on red background
*dynregex*::
Similar to regex, but expand (like a command parameter would) the
given expression before building a regex from the result
Similar to regex, but expand (like a command parameter would) the
given expression before building a regex from the result
*flag_lines* <face> <option_name>::
add a column in front of the buffer, and display the flags specified
in <option_name>, using <face>
add a column in front of the buffer, and display the flags specified
in <option_name>, using <face>
*show_matching*::
highlight matching char of the character under the selections' cursor
using MatchingChar face
highlight matching char of the character under the selections' cursor
using MatchingChar face
*show_whitespaces* [options]::
display symbols on top of whitespaces to make them more explicit
using the Whitespace face, with the following *options*:
display symbols on top of whitespaces to make them more explicit
using the Whitespace face, with the following *options*:
*-lf* <separator>:::
a one character long separator that will replace line feeds
*-lf* <separator>:::
a one character long separator that will replace line feeds
*-spc* <separator>:::
a one character long separator that will replace spaces
*-spc* <separator>:::
a one character long separator that will replace spaces
*-nbsp* <separator>:::
a one character long separator that will replace non-breakable spaces
*-nbsp* <separator>:::
a one character long separator that will replace non-breakable spaces
*-tab* <separator>:::
a one character long separator that will replace tabulations
*-tab* <separator>:::
a one character long separator that will replace tabulations
*-tabpad* <separator>:::
a one character long separator that will be appended to tabulations to honor the *tabstop* option
*-tabpad* <separator>:::
a one character long separator that will be appended to tabulations to honor the *tabstop* option
*number_lines* [options]::
show line numbers, with the following *options*:
show line numbers, with the following *options*:
*-relative*:::
show line numbers relative to the main cursor line
*-relative*:::
show line numbers relative to the main cursor line
*-hlcursor*:::
highlight the cursor line with a separate face
*-hlcursor*:::
highlight the cursor line with a separate face
*-separator* <separator text>:::
specify a string to separate the line numbers column with
the rest of the buffer (default is '|')
*-separator* <separator text>:::
specify a string to separate the line numbers column with
the rest of the buffer (default is '|')
*wrap* [options]::
soft wrap buffer text at window width, with the following *options*:
soft wrap buffer text at window width, with the following *options*:
*-word*:::
wrap at word boundaries instead of codepoint boundaries.
*-word*:::
wrap at word boundaries instead of codepoint boundaries.
*-indent*:::
preserve line indent when wrapping.
*-indent*:::
preserve line indent when wrapping.
*-width <max_width>*:::
wrap text at *max_width* if the window is wider.
*-width <max_width>*:::
wrap text at *max_width* if the window is wider.
*fill* <face>::
fill using the given *face*, mostly useful with regions highlighters
fill using the given *face*, mostly useful with regions highlighters
*ranges* <option_name>::
use the data in the range-specs option of the given name to highlight
the buffer. The string part of the is interpretted as a face to apply
to the range.
use the data in the range-specs option of the given name to highlight
the buffer. The string part of the is interpretted as a face to apply
to the range.
*replace-ranges* <option_name>::
use the data in the range-specs option of the given name to highlight
the buffer. The string part of the is interpretted as a display line to
display in place of the range.
use the data in the range-specs option of the given name to highlight
the buffer. The string part of the is interpretted as a display line to
display in place of the range.
*column* <number> <face>::
highlight column *number* with face *face*
highlight column *number* with face *face*
*line* <number> <face>::
highlight line *number* with face *face*
highlight line *number* with face *face*
== Highlighting Groups
@ -143,14 +143,14 @@ A special highlighter provides a way to segment the buffer into regions,
which are to be highlighted differently.
*name*::
user defined, used to identify the region
user defined, used to identify the region
*opening*::
regex that defines the region start text
regex that defines the region start text
*closing*::
regex that defines the region end text
regex that defines the region end text
*recurse*::
regex that defines the text that matches recursively an end token
into the region
regex that defines the text that matches recursively an end token
into the region
The *recurse* option is useful for regions that can be nested, for example
the following contruct:
@ -206,8 +206,8 @@ highlighter as root:
-----------------------------------------------------------------
add-highlighter <path> regions -default code <lang> \
string <str_opening> <str_closing> <str_recurse> \
comment <comment_opening> <comment_closing> <comment_recurse>
string <str_opening> <str_closing> <str_recurse> \
comment <comment_opening> <comment_closing> <comment_recurse>
add-highlighter <path>/<lang>/code ...
add-highlighter <path>/<lang>/string ...

View File

@ -35,125 +35,125 @@ of the given *group*.
== Default hooks
*NormalIdle*::
a certain duration has passed since last key was pressed in normal mode
a certain duration has passed since last key was pressed in normal mode
*NormalBegin*::
entering normal mode
entering normal mode
*NormalEnd*::
leaving normal mode
leaving normal mode
*NormalKey*::
a key is received in normal mode, the key is used for filtering
a key is received in normal mode, the key is used for filtering
*InsertIdle*::
a certain duration has passed since last key was pressed in insert mode
a certain duration has passed since last key was pressed in insert mode
*InsertBegin*::
entering insert mode
entering insert mode
*InsertEnd*::
leaving insert mode
leaving insert mode
*InsertKey*::
a key is received in insert mode, the key is used for filtering
a key is received in insert mode, the key is used for filtering
*InsertChar*::
a character is received in insert mode, the character is used for
filtering
a character is received in insert mode, the character is used for
filtering
*InsertDelete*::
a character is deleted in insert mode, the character deleted by
the main selection is used for filtering
a character is deleted in insert mode, the character deleted by
the main selection is used for filtering
*InsertMove*::
the cursor moved (without inserting) in insert mode, the key that
triggered the move is used for filtering
the cursor moved (without inserting) in insert mode, the key that
triggered the move is used for filtering
*PromptIdle*::
a certain duration has passed since last key was pressed in prompt mode
a certain duration has passed since last key was pressed in prompt mode
*WinCreate*::
a window was created, the filtering text is the buffer name
a window was created, the filtering text is the buffer name
*WinClose*::
a window was destroyed, the filtering text is the buffer name
a window was destroyed, the filtering text is the buffer name
*WinResize*::
a window resized, the filtering text is *<line>.<column>*
a window resized, the filtering text is *<line>.<column>*
*WinDisplay*::
a window was bound a client, the filtering text is the buffer name
a window was bound a client, the filtering text is the buffer name
*WinSetOption*::
an option was set in a window context, the filtering text is
*<option_name>=<new_value>*
an option was set in a window context, the filtering text is
*<option_name>=<new_value>*
*BufSetOption*::
an option was set in a buffer context, the filtering text is
*<option_name>=<new_value>*
an option was set in a buffer context, the filtering text is
*<option_name>=<new_value>*
*BufNewFile*::
a buffer for a new file has been created, filename is used for
filtering
a buffer for a new file has been created, filename is used for
filtering
*BufOpenFile*::
a buffer for an existing file has been created, filename is used
for filtering
a buffer for an existing file has been created, filename is used
for filtering
*BufCreate*::
a buffer has been created, filename is used for filtering
a buffer has been created, filename is used for filtering
*BufWritePre*::
executed just before a buffer is written, filename is used for
filtering
executed just before a buffer is written, filename is used for
filtering
*BufWritePost*::
executed just after a buffer is written, filename is used for filtering
executed just after a buffer is written, filename is used for filtering
*BufClose*::
executed when a buffer is deleted, while it is still valid
executed when a buffer is deleted, while it is still valid
*BufOpenFifo*::
executed when a buffer opens a fifo
executed when a buffer opens a fifo
*BufReadFifo*::
executed after some data has been read from a fifo and inserted in
the buffer
executed after some data has been read from a fifo and inserted in
the buffer
*BufCloseFifo*::
executed when a fifo buffer closes its fifo file descriptor either
because the buffer is being deleted,
or because the writing end has been closed
executed when a fifo buffer closes its fifo file descriptor either
because the buffer is being deleted,
or because the writing end has been closed
*RuntimeError*::
an error was encountered while executing a user command the error
message is used for filtering
an error was encountered while executing a user command the error
message is used for filtering
*KakBegin*::
kakoune has started, this hook is called just after reading the user
configuration files
kakoune has started, this hook is called just after reading the user
configuration files
*KakEnd*::
kakoune is quitting
kakoune is quitting
*FocusIn*::
on supported clients, triggered when the client gets focused. The
filtering text is the client name
on supported clients, triggered when the client gets focused. The
filtering text is the client name
*FocusOut*::
on supported clients, triggered when the client gets unfocused. The
filtering text is the client name
on supported clients, triggered when the client gets unfocused. The
filtering text is the client name
*InsertCompletionShow*::
Triggered when the insert completion menu gets displayed
Triggered when the insert completion menu gets displayed
*InsertCompletionHide*::
Triggered when the insert completion menu gets hidden
Triggered when the insert completion menu gets hidden
*RawKey*::
Triggered whenever a key is pressed by the user, the key is
used for filtering.
Triggered whenever a key is pressed by the user, the key is
used for filtering.
When not specified, the filtering text is an empty string. Note that
some hooks will not consider underlying scopes depending on what context

View File

@ -15,58 +15,58 @@ documentation page.
== Insert mode
*<esc>*::
leave insert mode
leave insert mode
*<backspace>*::
delete characters before cursors
delete characters before cursors
*<del>*::
delete characters under cursors
delete characters under cursors
*<left>*, *<right>*, *<up>*, *<down>*::
move the cursors in given direction
move the cursors in given direction
*<home>*::
move cursors to line begin
move cursors to line begin
*<end>*::
move cursors to end of line
move cursors to end of line
*<c-n>*::
select next completion candidate
select next completion candidate
*<c-p>*::
select previous completion candidate
select previous completion candidate
*<c-x>*::
explicit insert completion query, followed by:
explicit insert completion query, followed by:
*f*:::
explicit file completion
*f*:::
explicit file completion
*w*:::
explicit word completion (current buffer)
*w*:::
explicit word completion (current buffer)
*W*:::
explicit word completion (all buffers)
*W*:::
explicit word completion (all buffers)
*l*:::
explicit line completion
*l*:::
explicit line completion
*<c-o>*::
disable automatic completion for this insert session
disable automatic completion for this insert session
*<c-r>*::
insert contents of the register given by next key
insert contents of the register given by next key
*<c-v>*::
insert next keystroke directly into the buffer, without interpreting it
insert next keystroke directly into the buffer, without interpreting it
*<c-u>*::
commit changes up to now as a single undo group
commit changes up to now as a single undo group
*<a-;>*::
escape to normal mode for a single command
escape to normal mode for a single command
== Using Counts
@ -91,344 +91,344 @@ it when pasting text.
is a sequence of non whitespace characters
*h*::
select the character on the left of selection end
select the character on the left of selection end
*j*::
select the character below the selection end
select the character below the selection end
*k*::
select the character above the selection end
select the character above the selection end
*l*::
select the character on the right of selection end
select the character on the right of selection end
*w*::
select the word and following whitespaces on the right of selection end
select the word and following whitespaces on the right of selection end
*b*::
select preceding whitespaces and the word on the left of selection end
select preceding whitespaces and the word on the left of selection end
*e*::
select preceding whitespaces and the word on the right of selection end
select preceding whitespaces and the word on the right of selection end
*<a-[wbe]>*::
same as [wbe] but select WORD instead of word
same as [wbe] but select WORD instead of word
*f*::
select to the next occurrence of given character
select to the next occurrence of given character
*t*::
select until the next occurrence of given character
select until the next occurrence of given character
*<a-[ft]>*::
same as [ft] but in the other direction
same as [ft] but in the other direction
*m*::
select to matching character
select to matching character
*M*::
extend selection to matching character
extend selection to matching character
*x*::
select line on which selection end lies (or next line when end lies
on an end-of-line)
select line on which selection end lies (or next line when end lies
on an end-of-line)
*X*:: similar to *x*, except the current selection is extended
*<a-x>*::
expand selections to contain full lines (including end-of-lines)
expand selections to contain full lines (including end-of-lines)
*<a-X>*::
trim selections to only contain full lines (not including last
end-of-line)
trim selections to only contain full lines (not including last
end-of-line)
*%*::
select whole buffer
select whole buffer
*<a-h>*::
select to line begin
select to line begin
*<a-l>*::
select to line end
select to line end
*/*::
search (select next match)
search (select next match)
*<a-/>*::
search (select previous match)
search (select previous match)
*?*::
search (extend to next match)
search (extend to next match)
*<a-?>*::
search (extend to previous match)
search (extend to previous match)
*n*::
select next match
select next match
*N*::
add a new selection with next match
add a new selection with next match
*<a-n>*::
select previous match
select previous match
*<a-N>*::
add a new selection with previous match
add a new selection with previous match
*pageup, <c-b>*::
scroll one page up
scroll one page up
*pagedown, <c-f>*::
scroll one page down
scroll one page down
*<c-u>*::
scroll half a page up
scroll half a page up
*<c-d>*::
scroll half a page down
scroll half a page down
*'*::
rotate selections (the main selection becomes the next one)
rotate selections (the main selection becomes the next one)
*<a-'>*::
rotate selections backwards
rotate selections backwards
*;*::
reduce selections to their cursor
reduce selections to their cursor
*<a-;>*::
flip the selections direction
flip the selections direction
*<a-:>*::
ensure selections are in forward direction (cursor after anchor)
ensure selections are in forward direction (cursor after anchor)
*<a-.>*::
repeat last object or *f*/*t* selection command
repeat last object or *f*/*t* selection command
== Changes
*i*::
enter insert mode before current selection
enter insert mode before current selection
*a*::
enter insert mode after current selection
enter insert mode after current selection
*d*::
yank and delete current selection
yank and delete current selection
*c*::
yank and delete current selection and enter insert mode
yank and delete current selection and enter insert mode
*.*::
repeat last insert mode change (*i*, *a*, or *c*, including the
inserted text)
repeat last insert mode change (*i*, *a*, or *c*, including the
inserted text)
*<a-d>*::
delete current selection (not yanking)
delete current selection (not yanking)
*<a-c>*::
delete current selection and enter insert mode (not yanking)
delete current selection and enter insert mode (not yanking)
*I*::
enter insert mode at current selection begin line start
enter insert mode at current selection begin line start
*A*::
enter insert mode at current selection end line end
enter insert mode at current selection end line end
*o*::
enter insert mode in a new line (or in a given count of new lines) below
current selection end
enter insert mode in a new line (or in a given count of new lines) below
current selection end
*O*::
enter insert mode in a new line (or in a given count of new lines) above
current selection begin
enter insert mode in a new line (or in a given count of new lines) above
current selection begin
*<a-o>*::
add an empty line below cursor
add an empty line below cursor
*<a-O>*::
add an empty line above cursor
add an empty line above cursor
*y*::
yank selections
yank selections
*p*::
paste after current selection end
paste after current selection end
*P*::
paste before current selection begin
paste before current selection begin
*<a-p>*::
paste all after current selection end, and select each pasted string
paste all after current selection end, and select each pasted string
*<a-P>*::
paste all before current selection begin, and select each pasted string
paste all before current selection begin, and select each pasted string
*R*::
replace current selection with yanked text
replace current selection with yanked text
*<a-R>*::
replace current selection with every yanked text
replace current selection with every yanked text
*r*::
replace each character with the next entered one
replace each character with the next entered one
*<a-j>*::
join selected lines
join selected lines
*<a-J>*::
join selected lines and select spaces inserted in place of line breaks
join selected lines and select spaces inserted in place of line breaks
*<a-m>*::
merge contiguous selections together (works across lines as well)
merge contiguous selections together (works across lines as well)
*>*::
indent selected lines
indent selected lines
*<a\->>*::
indent selected lines, including empty lines
indent selected lines, including empty lines
*<*::
deindent selected lines
deindent selected lines
*<a-<>*::
deindent selected lines, do not remove incomplete indent (3 leading
spaces when indent is 4)
deindent selected lines, do not remove incomplete indent (3 leading
spaces when indent is 4)
*|*::
pipe each selection through the given external filter program and
replace the selection with its output
pipe each selection through the given external filter program and
replace the selection with its output
*<a-|>*::
pipe each selection through the given external filter program and
ignore its output
pipe each selection through the given external filter program and
ignore its output
*!*::
insert command output before selection
insert command output before selection
*<a-!>*::
append command output after selection
append command output after selection
*u*::
undo last change
undo last change
*<a-u>*::
move backward in history
move backward in history
*U*::
redo last change
redo last change
*<a-U>*::
move forward in history
move forward in history
*&*::
align selection, align the cursor of selections by inserting spaces
before the first character of the selection
align selection, align the cursor of selections by inserting spaces
before the first character of the selection
*<a-&>*::
copy indent, copy the indentation of the main selection (or the
count one if a count is given) to all other ones
copy indent, copy the indentation of the main selection (or the
count one if a count is given) to all other ones
*`*::
to lower case
to lower case
*~*::
to upper case
to upper case
*<a-`>*::
swap case
swap case
*@*::
convert tabs to spaces in current selections, uses the buffer tabstop
option or the count parameter for tabstop
convert tabs to spaces in current selections, uses the buffer tabstop
option or the count parameter for tabstop
*<a-@>*::
convert spaces to tabs in current selections, uses the buffer tabstop
option or the count parameter for tabstop
convert spaces to tabs in current selections, uses the buffer tabstop
option or the count parameter for tabstop
*<a-">*::
rotate selections content, if specified, the count groups selections,
so the following command
rotate selections content, if specified, the count groups selections,
so the following command
----------
3<a-">
----------
rotate (1, 2, 3) and (3, 4, 6) independently
rotate (1, 2, 3) and (3, 4, 6) independently
== Goto Commands
*g*, *G*::
When a count is specified, *G* only extends the current selection to the given line,
*g* sends the anchor to the given line and a menu is then displayed which waits
for one of the following additional keys:
When a count is specified, *G* only extends the current selection to the given line,
*g* sends the anchor to the given line and a menu is then displayed which waits
for one of the following additional keys:
*h*:::
go to line begin
*h*:::
go to line begin
*l*:::
go to line end
*l*:::
go to line end
*i*:::
go to non blank line start
*i*:::
go to non blank line start
*g*, *k*:::
go to the first line
*g*, *k*:::
go to the first line
*j*:::
go to the last line
*j*:::
go to the last line
*e*:::
go to last char of last line
*e*:::
go to last char of last line
*t*:::
go to the first displayed line
*t*:::
go to the first displayed line
*c*:::
go to the middle displayed line
*c*:::
go to the middle displayed line
*b*:::
go to the last displayed line
*b*:::
go to the last displayed line
*a*:::
go to the previous (alternate) buffer
*a*:::
go to the previous (alternate) buffer
*f*:::
open the file whose name is selected
*f*:::
open the file whose name is selected
*.*:::
go to last buffer modification position
*.*:::
go to last buffer modification position
== View commands
*v*, *V*::
*V* enters lock view mode (which will be left when the <esc> is hit),
and *v* modifies the current view; a menu is then displayed which waits
for one of the following additional keys:
*V* enters lock view mode (which will be left when the <esc> is hit),
and *v* modifies the current view; a menu is then displayed which waits
for one of the following additional keys:
*v*, *c*:::
center the main selection in the window (vertically)
*v*, *c*:::
center the main selection in the window (vertically)
*m*:::
center the main selection in the window (horizontally)
*m*:::
center the main selection in the window (horizontally)
*t*:::
scroll to put the main selection on the top line of the window
*t*:::
scroll to put the main selection on the top line of the window
*b*:::
scroll to put the main selection on the bottom line of the window
*b*:::
scroll to put the main selection on the bottom line of the window
*h*:::
scroll the window count columns left
*h*:::
scroll the window count columns left
*j*:::
scroll the window count line downward
*j*:::
scroll the window count line downward
*k*:::
scroll the window count line upward
*k*:::
scroll the window count line upward
*l*:::
scroll the window count columns right
*l*:::
scroll the window count columns right
== Marks
@ -436,239 +436,239 @@ is a sequence of non whitespace characters
Marks use the *^* register by default.
*Z*::
save the current selections to the register
save the current selections to the register
*z*::
restore the selections from the register
restore the selections from the register
*<a-z>*, *<a-Z>*::
*<a-z>* combines the selections from the register with the current ones, whereas
*<a-Z>* combines the current selections with the register; a menu is then
displayed which waits for one of the following additional keys:
*<a-z>* combines the selections from the register with the current ones, whereas
*<a-Z>* combines the current selections with the register; a menu is then
displayed which waits for one of the following additional keys:
*a*:::
append the selections
*a*:::
append the selections
*u*:::
keep a union of the selections
*u*:::
keep a union of the selections
*i*:::
keep an intersection of the selections
*i*:::
keep an intersection of the selections
*<*:::
select the selection with the leftmost cursor for each pair
*<*:::
select the selection with the leftmost cursor for each pair
*>*:::
select the selection with the rightmost cursor for each pair
*>*:::
select the selection with the rightmost cursor for each pair
*+*:::
select the longest selection
*+*:::
select the longest selection
*-*:::
select the shortest selection
*-*:::
select the shortest selection
== Macros
Macros use the *@* register by default
*<esc>*::
end macro recording
end macro recording
*Q*::
start or end macro recording
start or end macro recording
*q*::
play a recorded macro
play a recorded macro
== Searching
Searches use the */* register by default
***::
set the search pattern to the current selection (automatically
detects word boundaries)
set the search pattern to the current selection (automatically
detects word boundaries)
*<a-***>*::
set the search pattern to the current selection (verbatim, no smart
detection)
set the search pattern to the current selection (verbatim, no smart
detection)
== Jump list
*<c-i>*::
Jump forward
Jump forward
*<c-o>*::
Jump backward
Jump backward
*<c-s>*::
save current selections
save current selections
== Multiple selections
*s*::
create a selection
create a selection
*<a-s>*::
split the current selections on line boundaries
split the current selections on line boundaries
*S*::
split the current selection
split the current selection
*C*::
copy the current selection to the next line
copy the current selection to the next line
*<a-C>*::
copy the current selection to the previous line
copy the current selection to the previous line
*<space>*::
clear a multiple selection
clear a multiple selection
*<a-space>*::
clear the current selection
clear the current selection
*<a-k>*::
keep the selections that match the given regex
keep the selections that match the given regex
*<a-K>*::
clear selections that match the given regex
clear selections that match the given regex
*$*::
pipe each selection to the given shell command and keep the ones
for which the shell returned 0
pipe each selection to the given shell command and keep the ones
for which the shell returned 0
== Object Selection
*<a-a>*::
selects the whole object
selects the whole object
*<a-i>*::
selects the inner object, that is the object excluding its surrounder
selects the inner object, that is the object excluding its surrounder
*[*::
selects to object start
selects to object start
*]*::
selects to object end
selects to object end
*{*::
extends selections to object start
extends selections to object start
*}*::
extends selections to object end
extends selections to object end
After these keys, you need to enter a second key in order to specify which
object you want
*b*, *(*, *)*::
select the enclosing parenthesis
select the enclosing parenthesis
*B*, *{*, *}*::
select the enclosing {} block
select the enclosing {} block
*r*, *[*, *]*::
select the enclosing [] block
select the enclosing [] block
*a*, *<*, *>*::
select the enclosing <> block
select the enclosing <> block
*"*, *Q*::
select the enclosing double quoted string
select the enclosing double quoted string
*'*, *q*::
select the enclosing single quoted string
select the enclosing single quoted string
*`*, *g*::
select the enclosing grave quoted string
select the enclosing grave quoted string
*w*::
select the whole word
select the whole word
*W*::
select the whole WORD
select the whole WORD
*s*::
select the sentence
select the sentence
*p*::
select the paragraph
select the paragraph
*␣*::
select the whitespaces
select the whitespaces
*i*::
select the current indentation block
select the current indentation block
*n*::
select the number
select the number
*u*::
select the argument
select the argument
*c*::
select user defined object, will prompt for open and close text
select user defined object, will prompt for open and close text
== Prompt Commands
*<ret>*::
validate prompt
validate prompt
*<esc>*::
abandon without
abandon without
*<left>*, *<a-h>*::
move cursor to previous character
move cursor to previous character
*<right>*, *<a-l>*::
move cursor to previous character
move cursor to previous character
*<home>*::
move cursor to first character
move cursor to first character
*<end>*::
move cursor past the last character
move cursor past the last character
*<backspace>*, *<a-x>*::
erase character before cursor
erase character before cursor
*<del>*, *<a-d>*::
erase character under cursor
erase character under cursor
*<c-w>*::
avance to next word begin
avance to next word begin
*<c-a-w>*::
advance to next WORD begin
advance to next WORD begin
*<c-b>*::
go back to previous word begin
go back to previous word begin
*<c-a-b>*::
go back to previous WORD begin
go back to previous WORD begin
*<c-e>*::
advance to next word end
advance to next word end
*<c-a-e>*::
advance to next word end
advance to next word end
*<up>*, *<c-p>*::
select previous entry in history
select previous entry in history
*<down>*, *<c-n>*::
select next entry in history
select next entry in history
*<tab>*::
select next completion candidate
select next completion candidate
*<backtab>*::
select previous completion candidate
select previous completion candidate
*<c-r>*::
insert then content of the register given by next key
insert then content of the register given by next key
*<c-v>*::
insert next keystroke without interpreting it
insert next keystroke without interpreting it
*<c-o>*::
disable auto completion for this prompt
disable auto completion for this prompt

View File

@ -14,22 +14,22 @@ The *map* command makes *key* behave as if the *keys* sequence was typed.
*mode* dictates in what context the mapping will be available:
*insert*::
insert mode
*normal*::
normal mode
*prompt*::
prompts, such as when entering a command through *:*, or a regex through */*
*menu*::
mode entered when a menu is displayed with the 'menu' command
*user*::
mode entered when the user prefix is hit (default: ',')
*goto*::
mode entered when the goto key is hit (default: 'g')
*view*::
mode entered when the view key is hit (default: 'v')
*object*::
mode entered when an object selection is triggered (e.g. '<a-i>')
*insert*::
insert mode
*normal*::
normal mode
*prompt*::
prompts, such as when entering a command through *:*, or a regex through */*
*menu*::
mode entered when a menu is displayed with the 'menu' command
*user*::
mode entered when the user prefix is hit (default: ',')
*goto*::
mode entered when the goto key is hit (default: 'g')
*view*::
mode entered when the view key is hit (default: 'v')
*object*::
mode entered when an object selection is triggered (e.g. '<a-i>')
The context of execution of the above modes is always the current one at the
time of execution of the mapping, except for *user* mode (always executed
@ -52,49 +52,49 @@ For *key* and *keys* in the *map* command, the following key names can
be used:
*x*, *<x>*::
Most keys, especially alphabetic keys, represent themselves.
Keys can also be wrapped in angle-brackets for consistency
with the non-alphabetic keys below.
Most keys, especially alphabetic keys, represent themselves.
Keys can also be wrapped in angle-brackets for consistency
with the non-alphabetic keys below.
*X*, *<X>*::
Holding down Shift while pressing the *x* key.
Holding down Shift while pressing the *x* key.
*<c-x>*::
Holding down Control while pressing the *x* key.
Holding down Control while pressing the *x* key.
*<a-x>*::
Holding down Alt while pressing the *x* key.
Holding down Alt while pressing the *x* key.
*<lt>*, *<gt>*::
The *<* and *>* characters.
The *<* and *>* characters.
*<plus>*, *<minus>*::
The *+* and *-* characters..
The *+* and *-* characters..
*<ret>*::
The Return or Enter key.
The Return or Enter key.
*<space>*::
The space bar.
The space bar.
*<tab>*::
The Tab key.
The Tab key.
*<backtab>*::
The reverse-tab key. This is Shift-Tab on most keyboards.
The reverse-tab key. This is Shift-Tab on most keyboards.
*<backspace>*::
The Backspace (delete to the left) key.
The Backspace (delete to the left) key.
*<del>*::
The Delete (to the right) key.
The Delete (to the right) key.
*<esc>*::
The Escape key.
The Escape key.
*<up>*, *<down>*, *<left>*, *<right>*, *<pageup>*, *<pagedown>*, *<home>*::
*<end>*::
The usual cursor-movement keys.
The usual cursor-movement keys.
*<f1>*, *<f2>*, ...*<f12>*::
Function keys.
Function keys.

View File

@ -9,11 +9,11 @@ the last yanked text, or the captured groups associated with the selections.
== Interacting
*<c-r><c>*::
when in insert mode or in a prompt, insert the value stored in the
*c* register (single character)
when in insert mode or in a prompt, insert the value stored in the
*c* register (single character)
*"<c>*::
in normal mode, select the *<c>* register (single character)
in normal mode, select the *<c>* register (single character)
== Alternate names
@ -25,22 +25,22 @@ in contexts where only alphanumeric identifiers are possible.
Most commands using a register default to a specific one if not specified:
*"* (dquote)::
default copy register, used by yanking and pasting commands like *y*, *p*
and *R*
default copy register, used by yanking and pasting commands like *y*, *p*
and *R*
*/* (slash)::
default search register, used by regex based commands like *s*, ***
or */*
default search register, used by regex based commands like *s*, ***
or */*
*@* (arobase)::
default macro register, used by *q* and *Q*
default macro register, used by *q* and *Q*
*^* (caret)::
default mark register, used by *z* and *Z*
default mark register, used by *z* and *Z*
*|* (pipe)::
default shell command register, used by command that spawn a subshell such as
*|*, *<a-|>*, *!* or *<a-!>*
default shell command register, used by command that spawn a subshell such as
*|*, *<a-|>*, *!* or *<a-!>*
== Special registers
@ -48,19 +48,19 @@ Some registers are not general purposes, they cannot be written to, but they
contain some special data
*%* (percent)::
current buffer name
current buffer name
*.* (dot)::
current selection contents
current selection contents
*#* (hash)::
selection indices (first selection has 1, second has 2, ...)
selection indices (first selection has 1, second has 2, ...)
*_* (underscore)::
null register, always empty
null register, always empty
*:* (colon)::
last entered command
last entered command
== Integer registers

View File

@ -11,11 +11,11 @@ value was declared in.
Scopes are named as follows:
*window*::
context linked to the window displaying a buffer
context linked to the window displaying a buffer
*buffer*::
context linked directly to the buffer
context linked directly to the buffer
*global*::
global context linked to the instance of Kakoune
global context linked to the instance of Kakoune
The following order of priority applies to the above scopes:
@ -37,16 +37,16 @@ default.
Examples:
*filetype*::
A single buffer opened in two separate windows can have different
filetypes declared in the *window* scope with 'set' (c.f. the 'options'
documentation page)
A single buffer opened in two separate windows can have different
filetypes declared in the *window* scope with 'set' (c.f. the 'options'
documentation page)
*status line*::
All the buffers of the current session can have the same information
displayed in the status line, except for a specific buffer (the
'modelinefmt' option can be declared in the *global* scope, and
customized in the *buffer* scope with 'set', c.f. the 'options'
documentation page)
All the buffers of the current session can have the same information
displayed in the status line, except for a specific buffer (the
'modelinefmt' option can be declared in the *global* scope, and
customized in the *buffer* scope with 'set', c.f. the 'options'
documentation page)
== Execution context