documentation pages: Remove tabs
This commit is contained in:
parent
3c2159f06c
commit
4c3d36f9fe
|
@ -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.
|
command *q!* has to be used). Aliases are mentionned below each commands.
|
||||||
|
|
||||||
*change-directory* [<directory>]::
|
*change-directory* [<directory>]::
|
||||||
*alias* cd +
|
*alias* cd +
|
||||||
change the current directory to *directory*, or the home directory if
|
change the current directory to *directory*, or the home directory if
|
||||||
unspecified
|
unspecified
|
||||||
|
|
||||||
*doc* <topic>::
|
*doc* <topic>::
|
||||||
*alias* help +
|
*alias* help +
|
||||||
display documentation about a topic. The completion list displays the
|
display documentation about a topic. The completion list displays the
|
||||||
available topics
|
available topics
|
||||||
|
|
||||||
*edit[!]* <filename> [<line> [<column>]]::
|
*edit[!]* <filename> [<line> [<column>]]::
|
||||||
*alias* e +
|
*alias* e +
|
||||||
open buffer on file, go to given line and column. If file is already
|
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
|
opened, just switch to this file. Use edit! to force reloading
|
||||||
|
|
||||||
*write[!]* [<filename>]::
|
*write[!]* [<filename>]::
|
||||||
*alias* w +
|
*alias* w +
|
||||||
write buffer to <filename> or use its name if filename is not
|
write buffer to <filename> or use its name if filename is not
|
||||||
given. If the file is write-protected, its permissions are temporarily
|
given. If the file is write-protected, its permissions are temporarily
|
||||||
changed to allow saving the buffer and restored afterwards when
|
changed to allow saving the buffer and restored afterwards when
|
||||||
the write! command is used.
|
the write! command is used.
|
||||||
|
|
||||||
*write-all*::
|
*write-all*::
|
||||||
*alias* wa +
|
*alias* wa +
|
||||||
write all buffers that are associated to a file
|
write all buffers that are associated to a file
|
||||||
|
|
||||||
*quit!* [<exit status>]::
|
*quit!* [<exit status>]::
|
||||||
*alias* q +
|
*alias* q +
|
||||||
exit Kakoune, use quit! to force quitting even if there is some
|
exit Kakoune, use quit! to force quitting even if there is some
|
||||||
unsaved buffers remaining. If specified, the client exit status
|
unsaved buffers remaining. If specified, the client exit status
|
||||||
will be set to <exit status>
|
will be set to <exit status>
|
||||||
|
|
||||||
*write-all-quit* [<exit status>]::
|
*write-all-quit* [<exit status>]::
|
||||||
*alias* waq +
|
*alias* waq +
|
||||||
write all buffers and quit. If specified, the client exit status
|
write all buffers and quit. If specified, the client exit status
|
||||||
will be set to <exit status>
|
will be set to <exit status>
|
||||||
|
|
||||||
*kill[!]*::
|
*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>::
|
*buffer* <name>::
|
||||||
*alias* b +
|
*alias* b +
|
||||||
switch to buffer <name>
|
switch to buffer <name>
|
||||||
|
|
||||||
*buffer-next*::
|
*buffer-next*::
|
||||||
*alias* bn +
|
*alias* bn +
|
||||||
switch to the next buffer
|
switch to the next buffer
|
||||||
|
|
||||||
*buffer-prev*::
|
*buffer-prev*::
|
||||||
*alias* bp +
|
*alias* bp +
|
||||||
switch to the previous buffer
|
switch to the previous buffer
|
||||||
|
|
||||||
*delete-buffer[!]* [<name>]::
|
*delete-buffer[!]* [<name>]::
|
||||||
*alias* db +
|
*alias* db +
|
||||||
delete the buffer <name>
|
delete the buffer <name>
|
||||||
|
|
||||||
*source* <filename>::
|
*source* <filename>::
|
||||||
execute commands in <filename>
|
execute commands in <filename>
|
||||||
|
|
||||||
*colorscheme* <name>::
|
*colorscheme* <name>::
|
||||||
load named colorscheme
|
load named colorscheme
|
||||||
|
|
||||||
*rename-client* <name>::
|
*rename-client* <name>::
|
||||||
*alias* nc +
|
*alias* nc +
|
||||||
set current client name
|
set current client name
|
||||||
|
|
||||||
*rename-buffer* <name>::
|
*rename-buffer* <name>::
|
||||||
set current buffer name
|
set current buffer name
|
||||||
|
|
||||||
*rename-session* <name>::
|
*rename-session* <name>::
|
||||||
set current session name
|
set current session name
|
||||||
|
|
||||||
*echo* [options] <text>::
|
*echo* [options] <text>::
|
||||||
show *text* in status line, with the following *options*:
|
show *text* in status line, with the following *options*:
|
||||||
|
|
||||||
*-markup*:::
|
*-markup*:::
|
||||||
expand the markup strings in *text* (c.f. the 'expansions' documentation page)
|
expand the markup strings in *text* (c.f. the 'expansions' documentation page)
|
||||||
|
|
||||||
*-debug*:::
|
*-debug*:::
|
||||||
print the given text to the *\*debug** buffer
|
print the given text to the *\*debug** buffer
|
||||||
|
|
||||||
*nop*::
|
*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>::
|
*fail* <text>::
|
||||||
raise an error, uses <text> as its description
|
raise an error, uses <text> as its description
|
||||||
|
|
||||||
*declare-option* [-hidden] <type> <name> [<value>]::
|
*declare-option* [-hidden] <type> <name> [<value>]::
|
||||||
*alias* decl +
|
*alias* decl +
|
||||||
declare a new option, the -hidden hides the option in completion
|
declare a new option, the -hidden hides the option in completion
|
||||||
suggestions (c.f. the 'options' documentation page)
|
suggestions (c.f. the 'options' documentation page)
|
||||||
|
|
||||||
*set-option* <scope> <name> <value>::
|
*set-option* <scope> <name> <value>::
|
||||||
*alias* set +
|
*alias* set +
|
||||||
change the value of an option (c.f. the 'options' documentation page),
|
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
|
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";
|
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
|
the scope can also take the `current` special value, which will automatically
|
||||||
point to the narrowest scope available in the current context
|
point to the narrowest scope available in the current context
|
||||||
|
|
||||||
*unset-option* <scope> <name>::
|
*unset-option* <scope> <name>::
|
||||||
*alias* unset +
|
*alias* unset +
|
||||||
unset the value of an option (c.f. the 'options' documentation page)
|
unset the value of an option (c.f. the 'options' documentation page)
|
||||||
|
|
||||||
*update-option* <scope> <name>::
|
*update-option* <scope> <name>::
|
||||||
update the value of an option if its type supports that operation
|
update the value of an option if its type supports that operation
|
||||||
(c.f. the 'options' documentation page)
|
(c.f. the 'options' documentation page)
|
||||||
|
|
||||||
*alias* <scope> <name> <command>::
|
*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>]::
|
*unalias* <scope> <name> [<command>]::
|
||||||
remove an alias if its current value is the same as the one passed
|
remove an alias if its current value is the same as the one passed
|
||||||
as an optional parameter, remove it unconditionally otherwise
|
as an optional parameter, remove it unconditionally otherwise
|
||||||
|
|
||||||
*set-face* <name> <facespec>::
|
*set-face* <name> <facespec>::
|
||||||
*alias* face +
|
*alias* face +
|
||||||
define a face (c.f. the 'faces' documentation page)
|
define a face (c.f. the 'faces' documentation page)
|
||||||
|
|
||||||
*exec* [<flags>] <key> ...::
|
*exec* [<flags>] <key> ...::
|
||||||
execute a series of keys, as if they were hit (c.f. the 'execeval'
|
execute a series of keys, as if they were hit (c.f. the 'execeval'
|
||||||
documentation page)
|
documentation page)
|
||||||
|
|
||||||
*eval* [<flags>] <command> ...::
|
*eval* [<flags>] <command> ...::
|
||||||
execute commands, as if they were entered in the command prompt
|
execute commands, as if they were entered in the command prompt
|
||||||
(c.f. the 'execeval' documentation page)
|
(c.f. the 'execeval' documentation page)
|
||||||
|
|
||||||
*define-command* [<flags>] <name> <command>::
|
*define-command* [<flags>] <name> <command>::
|
||||||
*alias* def +
|
*alias* def +
|
||||||
define a new command (c.f. the 'Declaring new commands' section below)
|
define a new command (c.f. the 'Declaring new commands' section below)
|
||||||
|
|
||||||
*map* <scope> <mode> <key> <keys>::
|
*map* <scope> <mode> <key> <keys>::
|
||||||
bind a list of keys to a combination (c.f. the 'mapping' documentation
|
bind a list of keys to a combination (c.f. the 'mapping' documentation
|
||||||
page)
|
page)
|
||||||
|
|
||||||
*unmap* <scope> <mode> <key> [<expected>]::
|
*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>::
|
*hook* [-group <group>] <scope> <hook_name> <filtering_regex> <command>::
|
||||||
execute a command whenever an event is triggered (c.f. the 'hooks'
|
execute a command whenever an event is triggered (c.f. the 'hooks'
|
||||||
documentation page)
|
documentation page)
|
||||||
|
|
||||||
*remove-hooks* <scope> <group>::
|
*remove-hooks* <scope> <group>::
|
||||||
*alias* rmhooks +
|
*alias* rmhooks +
|
||||||
remove every hooks in *scope* that are part of the given *group*
|
remove every hooks in *scope* that are part of the given *group*
|
||||||
(c.f. the 'hooks' documentation page)
|
(c.f. the 'hooks' documentation page)
|
||||||
|
|
||||||
*add-highlighter* [<flags>] <highlighter_name> <highlighter_parameters> ...::
|
*add-highlighter* [<flags>] <highlighter_name> <highlighter_parameters> ...::
|
||||||
*alias* addhl +
|
*alias* addhl +
|
||||||
add a highlighter to the current window (c.f. the 'highlighters'
|
add a highlighter to the current window (c.f. the 'highlighters'
|
||||||
documentation page)
|
documentation page)
|
||||||
|
|
||||||
*remove-highlighter* <highlighter_id>::
|
*remove-highlighter* <highlighter_id>::
|
||||||
*alias* rmhl +
|
*alias* rmhl +
|
||||||
remove the highlighter whose id is *highlighter_id* (c.f. the
|
remove the highlighter whose id is *highlighter_id* (c.f. the
|
||||||
'highlighters' documentation page)
|
'highlighters' documentation page)
|
||||||
|
|
||||||
== Helpers
|
== Helpers
|
||||||
|
|
||||||
|
@ -169,57 +169,57 @@ Kakoune provides some helper commands that can be used to define composite
|
||||||
commands:
|
commands:
|
||||||
|
|
||||||
*prompt* <prompt> <command>::
|
*prompt* <prompt> <command>::
|
||||||
prompt the user for a string, when the user validates, executes the
|
prompt the user for a string, when the user validates, executes the
|
||||||
command. The entered text is available in the `text` value accessible
|
command. The entered text is available in the `text` value accessible
|
||||||
through `$kak_text` in shells or `%val{text}` in commands.
|
through `$kak_text` in shells or `%val{text}` in commands.
|
||||||
|
|
||||||
The *-init <str>* switch allows setting initial content, the
|
The *-init <str>* switch allows setting initial content, the
|
||||||
*-password* switch hides the entered text and clears the register
|
*-password* switch hides the entered text and clears the register
|
||||||
after command execution.
|
after command execution.
|
||||||
|
|
||||||
The *-on-change* and *-on-abort* switches, followed by a command
|
The *-on-change* and *-on-abort* switches, followed by a command
|
||||||
will have this command executed whenever the prompt content changes
|
will have this command executed whenever the prompt content changes
|
||||||
or the prompt is aborted, respectively.
|
or the prompt is aborted, respectively.
|
||||||
|
|
||||||
*on-key* <command>::
|
*on-key* <command>::
|
||||||
wait for next key from user, then execute <command>, the key is
|
wait for next key from user, then execute <command>, the key is
|
||||||
available through the `key` value, accessible through `$kak_key`
|
available through the `key` value, accessible through `$kak_key`
|
||||||
in shells, or `%val{key}` in commands.
|
in shells, or `%val{key}` in commands.
|
||||||
|
|
||||||
*menu* <label1> <commands1> <label2> <commands2> ...::
|
*menu* <label1> <commands1> <label2> <commands2> ...::
|
||||||
display a menu using labels, the selected label’s commands are
|
display a menu using labels, the selected label’s commands are
|
||||||
executed. The *menu* command can take an *-auto-single* argument, to automatically
|
executed. The *menu* command can take an *-auto-single* argument, to automatically
|
||||||
run commands when only one choice is provided, and a *-select-cmds*
|
run commands when only one choice is provided, and a *-select-cmds*
|
||||||
argument, in which case menu takes three argument per item, the
|
argument, in which case menu takes three argument per item, the
|
||||||
last one being a command to execute when the item is selected (but
|
last one being a command to execute when the item is selected (but
|
||||||
not validated)
|
not validated)
|
||||||
|
|
||||||
*info* [options] <text>::
|
*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>:::
|
*-anchor* <line>.<column>:::
|
||||||
print the text at the given coordinates
|
print the text at the given coordinates
|
||||||
|
|
||||||
*-placement* {above,below}:::
|
*-placement* {above,below}:::
|
||||||
set the placement relative to the anchor
|
set the placement relative to the anchor
|
||||||
|
|
||||||
*-title* <text>:::
|
*-title* <text>:::
|
||||||
set the title of the message box
|
set the title of the message box
|
||||||
|
|
||||||
*try* <commands> catch <on_error_commands>::
|
*try* <commands> catch <on_error_commands>::
|
||||||
prevent an error in *commands* from aborting the whole command
|
prevent an error in *commands* from aborting the whole command
|
||||||
execution, execute *on_error_commands* instead. If nothing is to be
|
execution, execute *on_error_commands* instead. If nothing is to be
|
||||||
done on error, the catch part can be omitted
|
done on error, the catch part can be omitted
|
||||||
|
|
||||||
*set-register* <name> <content>::
|
*set-register* <name> <content>::
|
||||||
*alias* reg +
|
*alias* reg +
|
||||||
set register *name* to *content*
|
set register *name* to *content*
|
||||||
|
|
||||||
*select* <anchor_line>.<anchor_column>,<cursor_line>.<cursor_column>:...::
|
*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}::
|
*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
|
Note that those commands are also available in the interactive mode, but
|
||||||
are not really useful in that context.
|
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:
|
New commands can be defined using the *define-command* command:
|
||||||
|
|
||||||
*define-command* [flags] <command_name> <commands>::
|
*define-command* [flags] <command_name> <commands>::
|
||||||
*commands* is a string containing the commands to execute, and *flags*
|
*commands* is a string containing the commands to execute, and *flags*
|
||||||
can be any combination of the following parameters:
|
can be any combination of the following parameters:
|
||||||
|
|
||||||
*-params* <num>:::
|
*-params* <num>:::
|
||||||
the command accepts a *num* parameter, which can be either a number,
|
the command accepts a *num* parameter, which can be either a number,
|
||||||
or of the form <min>..<max>, with both <min> and <max> omittable
|
or of the form <min>..<max>, with both <min> and <max> omittable
|
||||||
|
|
||||||
*-file-completion*:::
|
*-file-completion*:::
|
||||||
try file completion on any parameter passed to this command
|
try file completion on any parameter passed to this command
|
||||||
|
|
||||||
*-client-completion*:::
|
*-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*:::
|
*-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*:::
|
*-command-completion*:::
|
||||||
try command completion on any parameter passed to this command
|
try command completion on any parameter passed to this command
|
||||||
|
|
||||||
*-shell-completion*:::
|
*-shell-completion*:::
|
||||||
following string is a shell command which takes parameters as
|
following string is a shell command which takes parameters as
|
||||||
positional params and output one completion candidate per line.
|
positional params and output one completion candidate per line.
|
||||||
The provided shell command will run after each keypress
|
The provided shell command will run after each keypress
|
||||||
|
|
||||||
*-shell-candidates*:::
|
*-shell-candidates*:::
|
||||||
following string is a shell command which takes parameters as
|
following string is a shell command which takes parameters as
|
||||||
positional params and output one completion candidate per line.
|
positional params and output one completion candidate per line.
|
||||||
The provided shell command will run once at the beginning of each
|
The provided shell command will run once at the beginning of each
|
||||||
completion session, candidates are cached and then used by kakoune
|
completion session, candidates are cached and then used by kakoune
|
||||||
internal fuzzy engine
|
internal fuzzy engine
|
||||||
|
|
||||||
*-allow-override*:::
|
*-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*:::
|
*-hidden*:::
|
||||||
do not show the command in command name completions
|
do not show the command in command name completions
|
||||||
|
|
||||||
*-docstring*:::
|
*-docstring*:::
|
||||||
define the documentation string for the command
|
define the documentation string for the command
|
||||||
|
|
||||||
Using shell expansion allows defining complex commands or accessing
|
Using shell expansion allows defining complex commands or accessing
|
||||||
Kakoune's state:
|
Kakoune's state:
|
||||||
|
|
|
@ -21,36 +21,36 @@ when the commands have been executed: */*, *"*, *|*, *^*, *@*.
|
||||||
== Optional flags
|
== Optional flags
|
||||||
|
|
||||||
*-client* <name>::
|
*-client* <name>::
|
||||||
execute in the context of the client named *name*
|
execute in the context of the client named *name*
|
||||||
|
|
||||||
*-try-client* <name>::
|
*-try-client* <name>::
|
||||||
execute in the context of the client named *name* if such client
|
execute in the context of the client named *name* if such client
|
||||||
exists, or else in the current context
|
exists, or else in the current context
|
||||||
|
|
||||||
*-draft*::
|
*-draft*::
|
||||||
execute in a copy of the context of the selected client. Modifications
|
execute in a copy of the context of the selected client. Modifications
|
||||||
to the selections or input state will not affect the client. This
|
to the selections or input state will not affect the client. This
|
||||||
permits to make some modification to the buffer without modifying
|
permits to make some modification to the buffer without modifying
|
||||||
the user’s selection
|
the user’s selection
|
||||||
|
|
||||||
*-itersel*::
|
*-itersel*::
|
||||||
execute once per selection, in a context with only the considered
|
execute once per selection, in a context with only the considered
|
||||||
selection. This permits avoiding cases where the selections may
|
selection. This permits avoiding cases where the selections may
|
||||||
get merged
|
get merged
|
||||||
|
|
||||||
*-buffer* <names>::
|
*-buffer* <names>::
|
||||||
execute in the context of each buffers in the comma separated list
|
execute in the context of each buffers in the comma separated list
|
||||||
*names*, as a name can be used to iterate on all buffers
|
*names*, as a name can be used to iterate on all buffers
|
||||||
|
|
||||||
*-no-hooks*::
|
*-no-hooks*::
|
||||||
disable hook execution while executing the keys/commands
|
disable hook execution while executing the keys/commands
|
||||||
|
|
||||||
*-with-maps*::
|
*-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>::
|
*-save-regs* <regs>::
|
||||||
regs is a string of registers to be restored after execution (overwrites
|
regs is a string of registers to be restored after execution (overwrites
|
||||||
the list of registers saved by default, c.f. description)
|
the list of registers saved by default, c.f. description)
|
||||||
|
|
||||||
*-collapse-jumps*::
|
*-collapse-jumps*::
|
||||||
collapse all jumps into a single one from initial selection
|
collapse all jumps into a single one from initial selection
|
||||||
|
|
|
@ -3,22 +3,22 @@
|
||||||
== Strings
|
== Strings
|
||||||
|
|
||||||
\'strings'::
|
\'strings'::
|
||||||
uninterpreted strings, use a backslash (\') to escape the separator
|
uninterpreted strings, use a backslash (\') to escape the separator
|
||||||
"strings"::
|
"strings"::
|
||||||
expanded strings, % strings (c.f. next section) contained are expended,
|
expanded strings, % strings (c.f. next section) contained are expended,
|
||||||
use a backslash (\\%) to escape the separator
|
use a backslash (\\%) to escape the separator
|
||||||
%\{strings\}::
|
%\{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
|
* the '{' and '}' delimiters are configurable, you can use any non
|
||||||
alphanumeric character
|
alphanumeric character
|
||||||
+
|
+
|
||||||
----------------------------------------------------------
|
----------------------------------------------------------
|
||||||
e.g. %[string], %<string>, %(string), %~string~, %!string!
|
e.g. %[string], %<string>, %(string), %~string~, %!string!
|
||||||
----------------------------------------------------------
|
----------------------------------------------------------
|
||||||
* if the character following '%' is one of '{[(<', then the closing
|
* if the character following '%' is one of '{[(<', then the closing
|
||||||
one is the matching '}])>' and the delimiters are not escapable but
|
one is the matching '}])>' and the delimiters are not escapable but
|
||||||
are nestable
|
are nestable
|
||||||
+
|
+
|
||||||
-----------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
e.g. %{ roger {}; } is a valid string, %{ marcel \} as well
|
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:
|
parameter:
|
||||||
|
|
||||||
*sh*::
|
*sh*::
|
||||||
shell expansion, similar to posix shell '$(...)' construct (c.f. next
|
shell expansion, similar to posix shell '$(...)' construct (c.f. next
|
||||||
section)
|
section)
|
||||||
*reg*::
|
*reg*::
|
||||||
register expansion, will expand to the content of the register named
|
register expansion, will expand to the content of the register named
|
||||||
by *<content>*.
|
by *<content>*.
|
||||||
*opt*::
|
*opt*::
|
||||||
option expansion, will expand to the value of the option named by
|
option expansion, will expand to the value of the option named by
|
||||||
*<content>*
|
*<content>*
|
||||||
*val*::
|
*val*::
|
||||||
value expansion, will expand to the value of the environment variables
|
value expansion, will expand to the value of the environment variables
|
||||||
available to shell expansion. *<content>* shall be the name of that
|
available to shell expansion. *<content>* shall be the name of that
|
||||||
variable without the *kak_* prefix.
|
variable without the *kak_* prefix.
|
||||||
*arg*::
|
*arg*::
|
||||||
argument expansion, expand to the arguments of the current
|
argument expansion, expand to the arguments of the current
|
||||||
command, *<content>* can be a number, or @ for all arguments
|
command, *<content>* can be a number, or @ for all arguments
|
||||||
|
|
||||||
== Shell expansions
|
== Shell expansions
|
||||||
|
|
||||||
|
@ -55,72 +55,72 @@ shell commands in it. The following environment variables are used to pass
|
||||||
informations about Kakoune's state:
|
informations about Kakoune's state:
|
||||||
|
|
||||||
*kak_selection*::
|
*kak_selection*::
|
||||||
content of the main selection
|
content of the main selection
|
||||||
*kak_selections*::
|
*kak_selections*::
|
||||||
content of the selection separated by colons, colons in the selection
|
content of the selection separated by colons, colons in the selection
|
||||||
contents are escaped with a backslash
|
contents are escaped with a backslash
|
||||||
*kak_selection_desc*::
|
*kak_selection_desc*::
|
||||||
range of the main selection, represented as anchor,cursor; anchor
|
range of the main selection, represented as anchor,cursor; anchor
|
||||||
and cursor are in this format: line.column
|
and cursor are in this format: line.column
|
||||||
*kak_selections_desc*::
|
*kak_selections_desc*::
|
||||||
range of the selections separated by colons
|
range of the selections separated by colons
|
||||||
*kak_bufname*::
|
*kak_bufname*::
|
||||||
name of the current buffer
|
name of the current buffer
|
||||||
*kak_buffile*::
|
*kak_buffile*::
|
||||||
full path of the file or same as kak_bufname when there’s no
|
full path of the file or same as kak_bufname when there’s no
|
||||||
associated file
|
associated file
|
||||||
*kak_buflist*::
|
*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*::
|
*kak_buf_line_count*::
|
||||||
the current buffer line count
|
the current buffer line count
|
||||||
*kak_timestamp*::
|
*kak_timestamp*::
|
||||||
timestamp of the current buffer, the timestamp is an integer value
|
timestamp of the current buffer, the timestamp is an integer value
|
||||||
which is incremented each time the buffer is modified
|
which is incremented each time the buffer is modified
|
||||||
*kak_history_id*::
|
*kak_history_id*::
|
||||||
history id of the current buffer, the history id is an integer value
|
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
|
which is used to reference a specific buffer version in the undo tree
|
||||||
*kak_runtime*::
|
*kak_runtime*::
|
||||||
directory containing the kak binary
|
directory containing the kak binary
|
||||||
*kak_count*::
|
*kak_count*::
|
||||||
count parameter passed to the command
|
count parameter passed to the command
|
||||||
*kak_opt_<name>*::
|
*kak_opt_<name>*::
|
||||||
value of option *name*
|
value of option *name*
|
||||||
*kak_reg_<r>*::
|
*kak_reg_<r>*::
|
||||||
value of register *r*
|
value of register *r*
|
||||||
*kak_session*::
|
*kak_session*::
|
||||||
name of the current session
|
name of the current session
|
||||||
*kak_client*::
|
*kak_client*::
|
||||||
name of the current client
|
name of the current client
|
||||||
*kak_client_pid*::
|
*kak_client_pid*::
|
||||||
process id of the current client
|
process id of the current client
|
||||||
*kak_client_list*::
|
*kak_client_list*::
|
||||||
list of clients connected to the current session
|
list of clients connected to the current session
|
||||||
*kak_source*::
|
*kak_source*::
|
||||||
path of the file currently getting executed (through the source
|
path of the file currently getting executed (through the source
|
||||||
command)
|
command)
|
||||||
*kak_modified*::
|
*kak_modified*::
|
||||||
buffer has modifications not saved
|
buffer has modifications not saved
|
||||||
*kak_cursor_line*::
|
*kak_cursor_line*::
|
||||||
line of the end of the main selection
|
line of the end of the main selection
|
||||||
*kak_cursor_column*::
|
*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*::
|
*kak_cursor_char_value*::
|
||||||
unicode value of the codepoint under the cursor
|
unicode value of the codepoint under the cursor
|
||||||
*kak_cursor_char_column*::
|
*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*::
|
*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*::
|
*kak_window_width*::
|
||||||
width of the current kakoune window
|
width of the current kakoune window
|
||||||
*kak_window_height*::
|
*kak_window_height*::
|
||||||
height of the current kakoune window
|
height of the current kakoune window
|
||||||
*kak_hook_param*::
|
*kak_hook_param*::
|
||||||
filtering text passed to the currently executing hook
|
filtering text passed to the currently executing hook
|
||||||
*kak_hook_param_capture_N*::
|
*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>*::
|
*kak_client_env_<name>*::
|
||||||
value of the *name* variable in the client environment
|
value of the *name* variable in the client environment
|
||||||
(e.g. *$kak_client_env_SHELL* is the SHELL variable)
|
(e.g. *$kak_client_env_SHELL* is the SHELL variable)
|
||||||
|
|
||||||
Note that in order for Kakoune to pass a value in the environment, the
|
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
|
variable has to be spelled out within the body of the expansion
|
||||||
|
|
|
@ -11,31 +11,31 @@ fg_color[,bg_color][+attributes]
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
|
||||||
'fg_color', 'bg_color'::
|
'fg_color', 'bg_color'::
|
||||||
a color whose value can be expressed in the following formats:
|
a color whose value can be expressed in the following formats:
|
||||||
*black*, *red*, *green*, *yellow*, *blue*, *magenta*, *cyan*, *white*:::
|
*black*, *red*, *green*, *yellow*, *blue*, *magenta*, *cyan*, *white*:::
|
||||||
a named color
|
a named color
|
||||||
*default*:::
|
*default*:::
|
||||||
keep the existing color
|
keep the existing color
|
||||||
*rgb:RRGGBB*:::
|
*rgb:RRGGBB*:::
|
||||||
hexadecimal value
|
hexadecimal value
|
||||||
|
|
||||||
'attributes'::
|
'attributes'::
|
||||||
string whose individual letters set an attribute:
|
string whose individual letters set an attribute:
|
||||||
*u*:::
|
*u*:::
|
||||||
underline
|
underline
|
||||||
*r*:::
|
*r*:::
|
||||||
reverse
|
reverse
|
||||||
*b*:::
|
*b*:::
|
||||||
bold
|
bold
|
||||||
*B*:::
|
*B*:::
|
||||||
blink
|
blink
|
||||||
*d*:::
|
*d*:::
|
||||||
dim
|
dim
|
||||||
*i*:::
|
*i*:::
|
||||||
italic
|
italic
|
||||||
*e*:::
|
*e*:::
|
||||||
exclusive, override previous faces instead of merging
|
exclusive, override previous faces instead of merging
|
||||||
with them
|
with them
|
||||||
|
|
||||||
== Builtin faces
|
== Builtin faces
|
||||||
|
|
||||||
|
@ -43,67 +43,67 @@ The following default faces are used by color schemes to highlight certain
|
||||||
areas of the user interface:
|
areas of the user interface:
|
||||||
|
|
||||||
*Default*::
|
*Default*::
|
||||||
default colors
|
default colors
|
||||||
|
|
||||||
*PrimarySelection*::
|
*PrimarySelection*::
|
||||||
main selection face for every selected character except the cursor
|
main selection face for every selected character except the cursor
|
||||||
|
|
||||||
*SecondarySelection*::
|
*SecondarySelection*::
|
||||||
secondary selection face for every selected character except the cursor
|
secondary selection face for every selected character except the cursor
|
||||||
|
|
||||||
*PrimaryCursor*::
|
*PrimaryCursor*::
|
||||||
cursor of the primary selection
|
cursor of the primary selection
|
||||||
|
|
||||||
*SecondaryCursor*::
|
*SecondaryCursor*::
|
||||||
cursor of the secondary selection
|
cursor of the secondary selection
|
||||||
|
|
||||||
*LineNumbers*::
|
*LineNumbers*::
|
||||||
face used by the number_lines highlighter
|
face used by the number_lines highlighter
|
||||||
|
|
||||||
*LineNumberCursor*::
|
*LineNumberCursor*::
|
||||||
face used to highlight the line number of the main selection
|
face used to highlight the line number of the main selection
|
||||||
|
|
||||||
*LineNumbersWrapped*::
|
*LineNumbersWrapped*::
|
||||||
face used to highlight the line number of wrapped lines
|
face used to highlight the line number of wrapped lines
|
||||||
|
|
||||||
*MenuForeground*::
|
*MenuForeground*::
|
||||||
face for the selected element in menus
|
face for the selected element in menus
|
||||||
|
|
||||||
*MenuBackground*::
|
*MenuBackground*::
|
||||||
face for the not selected elements in menus
|
face for the not selected elements in menus
|
||||||
|
|
||||||
*MenuInfo*::
|
*MenuInfo*::
|
||||||
face for additional information for elements in menus
|
face for additional information for elements in menus
|
||||||
|
|
||||||
*Information*::
|
*Information*::
|
||||||
face for the informations windows and information messages
|
face for the informations windows and information messages
|
||||||
|
|
||||||
*Error*::
|
*Error*::
|
||||||
face of error messages
|
face of error messages
|
||||||
|
|
||||||
*StatusLine*::
|
*StatusLine*::
|
||||||
face used for the status line
|
face used for the status line
|
||||||
|
|
||||||
*StatusLineMode*::
|
*StatusLineMode*::
|
||||||
face used for the current mode except the normal mode
|
face used for the current mode except the normal mode
|
||||||
|
|
||||||
*StatusLineInfo*::
|
*StatusLineInfo*::
|
||||||
face used for special information
|
face used for special information
|
||||||
|
|
||||||
*StatusLineValue*::
|
*StatusLineValue*::
|
||||||
face used for special values (numeric prefixes, registers, etc.)
|
face used for special values (numeric prefixes, registers, etc.)
|
||||||
|
|
||||||
*StatusCursor*::
|
*StatusCursor*::
|
||||||
face used for the status line cursor
|
face used for the status line cursor
|
||||||
|
|
||||||
*Prompt*::
|
*Prompt*::
|
||||||
face used prompt displayed on the status line
|
face used prompt displayed on the status line
|
||||||
|
|
||||||
*MatchingChar*::
|
*MatchingChar*::
|
||||||
face used by the show_matching highlighter
|
face used by the show_matching highlighter
|
||||||
|
|
||||||
*BufferPadding*::
|
*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*::
|
*Whitespace*::
|
||||||
face used by the show_whitespaces highlighter
|
face used by the show_whitespaces highlighter
|
||||||
|
|
|
@ -27,91 +27,91 @@ ids.
|
||||||
== General highlighters
|
== General highlighters
|
||||||
|
|
||||||
*regex* <ex> <capture_id>:<face> ...::
|
*regex* <ex> <capture_id>:<face> ...::
|
||||||
highlight a regex, takes the regex as first parameter, followed by
|
highlight a regex, takes the regex as first parameter, followed by
|
||||||
any number of face parameters. For example:
|
any number of face parameters. For example:
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
add-highlighter window regex //\h*(TODO:)[^\n]* 0:cyan 1:yellow,red
|
add-highlighter window regex //\h*(TODO:)[^\n]* 0:cyan 1:yellow,red
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
|
|
||||||
will highlight C++ style comments in cyan, with an eventual 'TODO:'
|
will highlight C++ style comments in cyan, with an eventual 'TODO:'
|
||||||
in yellow on red background
|
in yellow on red background
|
||||||
|
|
||||||
*dynregex*::
|
*dynregex*::
|
||||||
Similar to regex, but expand (like a command parameter would) the
|
Similar to regex, but expand (like a command parameter would) the
|
||||||
given expression before building a regex from the result
|
given expression before building a regex from the result
|
||||||
|
|
||||||
*flag_lines* <face> <option_name>::
|
*flag_lines* <face> <option_name>::
|
||||||
add a column in front of the buffer, and display the flags specified
|
add a column in front of the buffer, and display the flags specified
|
||||||
in <option_name>, using <face>
|
in <option_name>, using <face>
|
||||||
|
|
||||||
*show_matching*::
|
*show_matching*::
|
||||||
highlight matching char of the character under the selections' cursor
|
highlight matching char of the character under the selections' cursor
|
||||||
using MatchingChar face
|
using MatchingChar face
|
||||||
|
|
||||||
*show_whitespaces* [options]::
|
*show_whitespaces* [options]::
|
||||||
display symbols on top of whitespaces to make them more explicit
|
display symbols on top of whitespaces to make them more explicit
|
||||||
using the Whitespace face, with the following *options*:
|
using the Whitespace face, with the following *options*:
|
||||||
|
|
||||||
*-lf* <separator>:::
|
*-lf* <separator>:::
|
||||||
a one character long separator that will replace line feeds
|
a one character long separator that will replace line feeds
|
||||||
|
|
||||||
*-spc* <separator>:::
|
*-spc* <separator>:::
|
||||||
a one character long separator that will replace spaces
|
a one character long separator that will replace spaces
|
||||||
|
|
||||||
*-nbsp* <separator>:::
|
*-nbsp* <separator>:::
|
||||||
a one character long separator that will replace non-breakable spaces
|
a one character long separator that will replace non-breakable spaces
|
||||||
|
|
||||||
*-tab* <separator>:::
|
*-tab* <separator>:::
|
||||||
a one character long separator that will replace tabulations
|
a one character long separator that will replace tabulations
|
||||||
|
|
||||||
*-tabpad* <separator>:::
|
*-tabpad* <separator>:::
|
||||||
a one character long separator that will be appended to tabulations to honor the *tabstop* option
|
a one character long separator that will be appended to tabulations to honor the *tabstop* option
|
||||||
|
|
||||||
|
|
||||||
*number_lines* [options]::
|
*number_lines* [options]::
|
||||||
show line numbers, with the following *options*:
|
show line numbers, with the following *options*:
|
||||||
|
|
||||||
*-relative*:::
|
*-relative*:::
|
||||||
show line numbers relative to the main cursor line
|
show line numbers relative to the main cursor line
|
||||||
|
|
||||||
*-hlcursor*:::
|
*-hlcursor*:::
|
||||||
highlight the cursor line with a separate face
|
highlight the cursor line with a separate face
|
||||||
|
|
||||||
*-separator* <separator text>:::
|
*-separator* <separator text>:::
|
||||||
specify a string to separate the line numbers column with
|
specify a string to separate the line numbers column with
|
||||||
the rest of the buffer (default is '|')
|
the rest of the buffer (default is '|')
|
||||||
|
|
||||||
*wrap* [options]::
|
*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*:::
|
*-word*:::
|
||||||
wrap at word boundaries instead of codepoint boundaries.
|
wrap at word boundaries instead of codepoint boundaries.
|
||||||
|
|
||||||
*-indent*:::
|
*-indent*:::
|
||||||
preserve line indent when wrapping.
|
preserve line indent when wrapping.
|
||||||
|
|
||||||
*-width <max_width>*:::
|
*-width <max_width>*:::
|
||||||
wrap text at *max_width* if the window is wider.
|
wrap text at *max_width* if the window is wider.
|
||||||
|
|
||||||
*fill* <face>::
|
*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>::
|
*ranges* <option_name>::
|
||||||
use the data in the range-specs option of the given name to highlight
|
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
|
the buffer. The string part of the is interpretted as a face to apply
|
||||||
to the range.
|
to the range.
|
||||||
|
|
||||||
*replace-ranges* <option_name>::
|
*replace-ranges* <option_name>::
|
||||||
use the data in the range-specs option of the given name to highlight
|
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
|
the buffer. The string part of the is interpretted as a display line to
|
||||||
display in place of the range.
|
display in place of the range.
|
||||||
|
|
||||||
*column* <number> <face>::
|
*column* <number> <face>::
|
||||||
highlight column *number* with face *face*
|
highlight column *number* with face *face*
|
||||||
|
|
||||||
*line* <number> <face>::
|
*line* <number> <face>::
|
||||||
highlight line *number* with face *face*
|
highlight line *number* with face *face*
|
||||||
|
|
||||||
== Highlighting Groups
|
== Highlighting Groups
|
||||||
|
|
||||||
|
@ -143,14 +143,14 @@ A special highlighter provides a way to segment the buffer into regions,
|
||||||
which are to be highlighted differently.
|
which are to be highlighted differently.
|
||||||
|
|
||||||
*name*::
|
*name*::
|
||||||
user defined, used to identify the region
|
user defined, used to identify the region
|
||||||
*opening*::
|
*opening*::
|
||||||
regex that defines the region start text
|
regex that defines the region start text
|
||||||
*closing*::
|
*closing*::
|
||||||
regex that defines the region end text
|
regex that defines the region end text
|
||||||
*recurse*::
|
*recurse*::
|
||||||
regex that defines the text that matches recursively an end token
|
regex that defines the text that matches recursively an end token
|
||||||
into the region
|
into the region
|
||||||
|
|
||||||
The *recurse* option is useful for regions that can be nested, for example
|
The *recurse* option is useful for regions that can be nested, for example
|
||||||
the following contruct:
|
the following contruct:
|
||||||
|
@ -206,8 +206,8 @@ highlighter as root:
|
||||||
|
|
||||||
-----------------------------------------------------------------
|
-----------------------------------------------------------------
|
||||||
add-highlighter <path> regions -default code <lang> \
|
add-highlighter <path> regions -default code <lang> \
|
||||||
string <str_opening> <str_closing> <str_recurse> \
|
string <str_opening> <str_closing> <str_recurse> \
|
||||||
comment <comment_opening> <comment_closing> <comment_recurse>
|
comment <comment_opening> <comment_closing> <comment_recurse>
|
||||||
|
|
||||||
add-highlighter <path>/<lang>/code ...
|
add-highlighter <path>/<lang>/code ...
|
||||||
add-highlighter <path>/<lang>/string ...
|
add-highlighter <path>/<lang>/string ...
|
||||||
|
|
|
@ -35,125 +35,125 @@ of the given *group*.
|
||||||
== Default hooks
|
== Default hooks
|
||||||
|
|
||||||
*NormalIdle*::
|
*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*::
|
*NormalBegin*::
|
||||||
entering normal mode
|
entering normal mode
|
||||||
|
|
||||||
*NormalEnd*::
|
*NormalEnd*::
|
||||||
leaving normal mode
|
leaving normal mode
|
||||||
|
|
||||||
*NormalKey*::
|
*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*::
|
*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*::
|
*InsertBegin*::
|
||||||
entering insert mode
|
entering insert mode
|
||||||
|
|
||||||
*InsertEnd*::
|
*InsertEnd*::
|
||||||
leaving insert mode
|
leaving insert mode
|
||||||
|
|
||||||
*InsertKey*::
|
*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*::
|
*InsertChar*::
|
||||||
a character is received in insert mode, the character is used for
|
a character is received in insert mode, the character is used for
|
||||||
filtering
|
filtering
|
||||||
|
|
||||||
*InsertDelete*::
|
*InsertDelete*::
|
||||||
a character is deleted in insert mode, the character deleted by
|
a character is deleted in insert mode, the character deleted by
|
||||||
the main selection is used for filtering
|
the main selection is used for filtering
|
||||||
|
|
||||||
*InsertMove*::
|
*InsertMove*::
|
||||||
the cursor moved (without inserting) in insert mode, the key that
|
the cursor moved (without inserting) in insert mode, the key that
|
||||||
triggered the move is used for filtering
|
triggered the move is used for filtering
|
||||||
|
|
||||||
*PromptIdle*::
|
*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*::
|
*WinCreate*::
|
||||||
a window was created, the filtering text is the buffer name
|
a window was created, the filtering text is the buffer name
|
||||||
|
|
||||||
*WinClose*::
|
*WinClose*::
|
||||||
a window was destroyed, the filtering text is the buffer name
|
a window was destroyed, the filtering text is the buffer name
|
||||||
|
|
||||||
*WinResize*::
|
*WinResize*::
|
||||||
a window resized, the filtering text is *<line>.<column>*
|
a window resized, the filtering text is *<line>.<column>*
|
||||||
|
|
||||||
*WinDisplay*::
|
*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*::
|
*WinSetOption*::
|
||||||
an option was set in a window context, the filtering text is
|
an option was set in a window context, the filtering text is
|
||||||
*<option_name>=<new_value>*
|
*<option_name>=<new_value>*
|
||||||
|
|
||||||
*BufSetOption*::
|
*BufSetOption*::
|
||||||
an option was set in a buffer context, the filtering text is
|
an option was set in a buffer context, the filtering text is
|
||||||
*<option_name>=<new_value>*
|
*<option_name>=<new_value>*
|
||||||
|
|
||||||
*BufNewFile*::
|
*BufNewFile*::
|
||||||
a buffer for a new file has been created, filename is used for
|
a buffer for a new file has been created, filename is used for
|
||||||
filtering
|
filtering
|
||||||
|
|
||||||
*BufOpenFile*::
|
*BufOpenFile*::
|
||||||
a buffer for an existing file has been created, filename is used
|
a buffer for an existing file has been created, filename is used
|
||||||
for filtering
|
for filtering
|
||||||
|
|
||||||
*BufCreate*::
|
*BufCreate*::
|
||||||
a buffer has been created, filename is used for filtering
|
a buffer has been created, filename is used for filtering
|
||||||
|
|
||||||
*BufWritePre*::
|
*BufWritePre*::
|
||||||
executed just before a buffer is written, filename is used for
|
executed just before a buffer is written, filename is used for
|
||||||
filtering
|
filtering
|
||||||
|
|
||||||
*BufWritePost*::
|
*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*::
|
*BufClose*::
|
||||||
executed when a buffer is deleted, while it is still valid
|
executed when a buffer is deleted, while it is still valid
|
||||||
|
|
||||||
*BufOpenFifo*::
|
*BufOpenFifo*::
|
||||||
executed when a buffer opens a fifo
|
executed when a buffer opens a fifo
|
||||||
|
|
||||||
*BufReadFifo*::
|
*BufReadFifo*::
|
||||||
executed after some data has been read from a fifo and inserted in
|
executed after some data has been read from a fifo and inserted in
|
||||||
the buffer
|
the buffer
|
||||||
|
|
||||||
*BufCloseFifo*::
|
*BufCloseFifo*::
|
||||||
executed when a fifo buffer closes its fifo file descriptor either
|
executed when a fifo buffer closes its fifo file descriptor either
|
||||||
because the buffer is being deleted,
|
because the buffer is being deleted,
|
||||||
or because the writing end has been closed
|
or because the writing end has been closed
|
||||||
|
|
||||||
*RuntimeError*::
|
*RuntimeError*::
|
||||||
an error was encountered while executing a user command the error
|
an error was encountered while executing a user command the error
|
||||||
message is used for filtering
|
message is used for filtering
|
||||||
|
|
||||||
*KakBegin*::
|
*KakBegin*::
|
||||||
kakoune has started, this hook is called just after reading the user
|
kakoune has started, this hook is called just after reading the user
|
||||||
configuration files
|
configuration files
|
||||||
|
|
||||||
*KakEnd*::
|
*KakEnd*::
|
||||||
kakoune is quitting
|
kakoune is quitting
|
||||||
|
|
||||||
*FocusIn*::
|
*FocusIn*::
|
||||||
on supported clients, triggered when the client gets focused. The
|
on supported clients, triggered when the client gets focused. The
|
||||||
filtering text is the client name
|
filtering text is the client name
|
||||||
|
|
||||||
*FocusOut*::
|
*FocusOut*::
|
||||||
on supported clients, triggered when the client gets unfocused. The
|
on supported clients, triggered when the client gets unfocused. The
|
||||||
filtering text is the client name
|
filtering text is the client name
|
||||||
|
|
||||||
*InsertCompletionShow*::
|
*InsertCompletionShow*::
|
||||||
Triggered when the insert completion menu gets displayed
|
Triggered when the insert completion menu gets displayed
|
||||||
|
|
||||||
*InsertCompletionHide*::
|
*InsertCompletionHide*::
|
||||||
Triggered when the insert completion menu gets hidden
|
Triggered when the insert completion menu gets hidden
|
||||||
|
|
||||||
*RawKey*::
|
*RawKey*::
|
||||||
Triggered whenever a key is pressed by the user, the key is
|
Triggered whenever a key is pressed by the user, the key is
|
||||||
used for filtering.
|
used for filtering.
|
||||||
|
|
||||||
When not specified, the filtering text is an empty string. Note that
|
When not specified, the filtering text is an empty string. Note that
|
||||||
some hooks will not consider underlying scopes depending on what context
|
some hooks will not consider underlying scopes depending on what context
|
||||||
|
|
|
@ -15,58 +15,58 @@ documentation page.
|
||||||
== Insert mode
|
== Insert mode
|
||||||
|
|
||||||
*<esc>*::
|
*<esc>*::
|
||||||
leave insert mode
|
leave insert mode
|
||||||
|
|
||||||
*<backspace>*::
|
*<backspace>*::
|
||||||
delete characters before cursors
|
delete characters before cursors
|
||||||
|
|
||||||
*<del>*::
|
*<del>*::
|
||||||
delete characters under cursors
|
delete characters under cursors
|
||||||
|
|
||||||
*<left>*, *<right>*, *<up>*, *<down>*::
|
*<left>*, *<right>*, *<up>*, *<down>*::
|
||||||
move the cursors in given direction
|
move the cursors in given direction
|
||||||
|
|
||||||
*<home>*::
|
*<home>*::
|
||||||
move cursors to line begin
|
move cursors to line begin
|
||||||
|
|
||||||
*<end>*::
|
*<end>*::
|
||||||
move cursors to end of line
|
move cursors to end of line
|
||||||
|
|
||||||
*<c-n>*::
|
*<c-n>*::
|
||||||
select next completion candidate
|
select next completion candidate
|
||||||
|
|
||||||
*<c-p>*::
|
*<c-p>*::
|
||||||
select previous completion candidate
|
select previous completion candidate
|
||||||
|
|
||||||
*<c-x>*::
|
*<c-x>*::
|
||||||
explicit insert completion query, followed by:
|
explicit insert completion query, followed by:
|
||||||
|
|
||||||
*f*:::
|
*f*:::
|
||||||
explicit file completion
|
explicit file completion
|
||||||
|
|
||||||
*w*:::
|
*w*:::
|
||||||
explicit word completion (current buffer)
|
explicit word completion (current buffer)
|
||||||
|
|
||||||
*W*:::
|
*W*:::
|
||||||
explicit word completion (all buffers)
|
explicit word completion (all buffers)
|
||||||
|
|
||||||
*l*:::
|
*l*:::
|
||||||
explicit line completion
|
explicit line completion
|
||||||
|
|
||||||
*<c-o>*::
|
*<c-o>*::
|
||||||
disable automatic completion for this insert session
|
disable automatic completion for this insert session
|
||||||
|
|
||||||
*<c-r>*::
|
*<c-r>*::
|
||||||
insert contents of the register given by next key
|
insert contents of the register given by next key
|
||||||
|
|
||||||
*<c-v>*::
|
*<c-v>*::
|
||||||
insert next keystroke directly into the buffer, without interpreting it
|
insert next keystroke directly into the buffer, without interpreting it
|
||||||
|
|
||||||
*<c-u>*::
|
*<c-u>*::
|
||||||
commit changes up to now as a single undo group
|
commit changes up to now as a single undo group
|
||||||
|
|
||||||
*<a-;>*::
|
*<a-;>*::
|
||||||
escape to normal mode for a single command
|
escape to normal mode for a single command
|
||||||
|
|
||||||
== Using Counts
|
== Using Counts
|
||||||
|
|
||||||
|
@ -91,344 +91,344 @@ it when pasting text.
|
||||||
is a sequence of non whitespace characters
|
is a sequence of non whitespace characters
|
||||||
|
|
||||||
*h*::
|
*h*::
|
||||||
select the character on the left of selection end
|
select the character on the left of selection end
|
||||||
|
|
||||||
*j*::
|
*j*::
|
||||||
select the character below the selection end
|
select the character below the selection end
|
||||||
|
|
||||||
*k*::
|
*k*::
|
||||||
select the character above the selection end
|
select the character above the selection end
|
||||||
|
|
||||||
*l*::
|
*l*::
|
||||||
select the character on the right of selection end
|
select the character on the right of selection end
|
||||||
|
|
||||||
*w*::
|
*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*::
|
*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*::
|
*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]>*::
|
*<a-[wbe]>*::
|
||||||
same as [wbe] but select WORD instead of word
|
same as [wbe] but select WORD instead of word
|
||||||
|
|
||||||
*f*::
|
*f*::
|
||||||
select to the next occurrence of given character
|
select to the next occurrence of given character
|
||||||
|
|
||||||
*t*::
|
*t*::
|
||||||
select until the next occurrence of given character
|
select until the next occurrence of given character
|
||||||
|
|
||||||
*<a-[ft]>*::
|
*<a-[ft]>*::
|
||||||
same as [ft] but in the other direction
|
same as [ft] but in the other direction
|
||||||
|
|
||||||
*m*::
|
*m*::
|
||||||
select to matching character
|
select to matching character
|
||||||
|
|
||||||
*M*::
|
*M*::
|
||||||
extend selection to matching character
|
extend selection to matching character
|
||||||
|
|
||||||
*x*::
|
*x*::
|
||||||
select line on which selection end lies (or next line when end lies
|
select line on which selection end lies (or next line when end lies
|
||||||
on an end-of-line)
|
on an end-of-line)
|
||||||
|
|
||||||
*X*:: similar to *x*, except the current selection is extended
|
*X*:: similar to *x*, except the current selection is extended
|
||||||
|
|
||||||
*<a-x>*::
|
*<a-x>*::
|
||||||
expand selections to contain full lines (including end-of-lines)
|
expand selections to contain full lines (including end-of-lines)
|
||||||
|
|
||||||
*<a-X>*::
|
*<a-X>*::
|
||||||
trim selections to only contain full lines (not including last
|
trim selections to only contain full lines (not including last
|
||||||
end-of-line)
|
end-of-line)
|
||||||
|
|
||||||
*%*::
|
*%*::
|
||||||
select whole buffer
|
select whole buffer
|
||||||
|
|
||||||
*<a-h>*::
|
*<a-h>*::
|
||||||
select to line begin
|
select to line begin
|
||||||
|
|
||||||
*<a-l>*::
|
*<a-l>*::
|
||||||
select to line end
|
select to line end
|
||||||
|
|
||||||
*/*::
|
*/*::
|
||||||
search (select next match)
|
search (select next match)
|
||||||
|
|
||||||
*<a-/>*::
|
*<a-/>*::
|
||||||
search (select previous match)
|
search (select previous match)
|
||||||
|
|
||||||
*?*::
|
*?*::
|
||||||
search (extend to next match)
|
search (extend to next match)
|
||||||
|
|
||||||
*<a-?>*::
|
*<a-?>*::
|
||||||
search (extend to previous match)
|
search (extend to previous match)
|
||||||
|
|
||||||
*n*::
|
*n*::
|
||||||
select next match
|
select next match
|
||||||
|
|
||||||
*N*::
|
*N*::
|
||||||
add a new selection with next match
|
add a new selection with next match
|
||||||
|
|
||||||
*<a-n>*::
|
*<a-n>*::
|
||||||
select previous match
|
select previous match
|
||||||
|
|
||||||
*<a-N>*::
|
*<a-N>*::
|
||||||
add a new selection with previous match
|
add a new selection with previous match
|
||||||
|
|
||||||
*pageup, <c-b>*::
|
*pageup, <c-b>*::
|
||||||
scroll one page up
|
scroll one page up
|
||||||
|
|
||||||
*pagedown, <c-f>*::
|
*pagedown, <c-f>*::
|
||||||
scroll one page down
|
scroll one page down
|
||||||
|
|
||||||
*<c-u>*::
|
*<c-u>*::
|
||||||
scroll half a page up
|
scroll half a page up
|
||||||
|
|
||||||
*<c-d>*::
|
*<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-'>*::
|
*<a-'>*::
|
||||||
rotate selections backwards
|
rotate selections backwards
|
||||||
|
|
||||||
*;*::
|
*;*::
|
||||||
reduce selections to their cursor
|
reduce selections to their cursor
|
||||||
|
|
||||||
*<a-;>*::
|
*<a-;>*::
|
||||||
flip the selections direction
|
flip the selections direction
|
||||||
|
|
||||||
*<a-:>*::
|
*<a-:>*::
|
||||||
ensure selections are in forward direction (cursor after anchor)
|
ensure selections are in forward direction (cursor after anchor)
|
||||||
|
|
||||||
*<a-.>*::
|
*<a-.>*::
|
||||||
repeat last object or *f*/*t* selection command
|
repeat last object or *f*/*t* selection command
|
||||||
|
|
||||||
== Changes
|
== Changes
|
||||||
|
|
||||||
*i*::
|
*i*::
|
||||||
enter insert mode before current selection
|
enter insert mode before current selection
|
||||||
|
|
||||||
*a*::
|
*a*::
|
||||||
enter insert mode after current selection
|
enter insert mode after current selection
|
||||||
|
|
||||||
*d*::
|
*d*::
|
||||||
yank and delete current selection
|
yank and delete current selection
|
||||||
|
|
||||||
*c*::
|
*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
|
repeat last insert mode change (*i*, *a*, or *c*, including the
|
||||||
inserted text)
|
inserted text)
|
||||||
|
|
||||||
*<a-d>*::
|
*<a-d>*::
|
||||||
delete current selection (not yanking)
|
delete current selection (not yanking)
|
||||||
|
|
||||||
*<a-c>*::
|
*<a-c>*::
|
||||||
delete current selection and enter insert mode (not yanking)
|
delete current selection and enter insert mode (not yanking)
|
||||||
|
|
||||||
*I*::
|
*I*::
|
||||||
enter insert mode at current selection begin line start
|
enter insert mode at current selection begin line start
|
||||||
|
|
||||||
*A*::
|
*A*::
|
||||||
enter insert mode at current selection end line end
|
enter insert mode at current selection end line end
|
||||||
|
|
||||||
*o*::
|
*o*::
|
||||||
enter insert mode in a new line (or in a given count of new lines) below
|
enter insert mode in a new line (or in a given count of new lines) below
|
||||||
current selection end
|
current selection end
|
||||||
|
|
||||||
*O*::
|
*O*::
|
||||||
enter insert mode in a new line (or in a given count of new lines) above
|
enter insert mode in a new line (or in a given count of new lines) above
|
||||||
current selection begin
|
current selection begin
|
||||||
|
|
||||||
*<a-o>*::
|
*<a-o>*::
|
||||||
add an empty line below cursor
|
add an empty line below cursor
|
||||||
|
|
||||||
*<a-O>*::
|
*<a-O>*::
|
||||||
add an empty line above cursor
|
add an empty line above cursor
|
||||||
|
|
||||||
*y*::
|
*y*::
|
||||||
yank selections
|
yank selections
|
||||||
|
|
||||||
*p*::
|
*p*::
|
||||||
paste after current selection end
|
paste after current selection end
|
||||||
|
|
||||||
*P*::
|
*P*::
|
||||||
paste before current selection begin
|
paste before current selection begin
|
||||||
|
|
||||||
*<a-p>*::
|
*<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>*::
|
*<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*::
|
*R*::
|
||||||
replace current selection with yanked text
|
replace current selection with yanked text
|
||||||
|
|
||||||
*<a-R>*::
|
*<a-R>*::
|
||||||
replace current selection with every yanked text
|
replace current selection with every yanked text
|
||||||
|
|
||||||
*r*::
|
*r*::
|
||||||
replace each character with the next entered one
|
replace each character with the next entered one
|
||||||
|
|
||||||
*<a-j>*::
|
*<a-j>*::
|
||||||
join selected lines
|
join selected lines
|
||||||
|
|
||||||
*<a-J>*::
|
*<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>*::
|
*<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\->>*::
|
*<a\->>*::
|
||||||
indent selected lines, including empty lines
|
indent selected lines, including empty lines
|
||||||
|
|
||||||
*<*::
|
*<*::
|
||||||
deindent selected lines
|
deindent selected lines
|
||||||
|
|
||||||
*<a-<>*::
|
*<a-<>*::
|
||||||
deindent selected lines, do not remove incomplete indent (3 leading
|
deindent selected lines, do not remove incomplete indent (3 leading
|
||||||
spaces when indent is 4)
|
spaces when indent is 4)
|
||||||
|
|
||||||
*|*::
|
*|*::
|
||||||
pipe each selection through the given external filter program and
|
pipe each selection through the given external filter program and
|
||||||
replace the selection with its output
|
replace the selection with its output
|
||||||
|
|
||||||
*<a-|>*::
|
*<a-|>*::
|
||||||
pipe each selection through the given external filter program and
|
pipe each selection through the given external filter program and
|
||||||
ignore its output
|
ignore its output
|
||||||
|
|
||||||
*!*::
|
*!*::
|
||||||
insert command output before selection
|
insert command output before selection
|
||||||
|
|
||||||
*<a-!>*::
|
*<a-!>*::
|
||||||
append command output after selection
|
append command output after selection
|
||||||
|
|
||||||
*u*::
|
*u*::
|
||||||
undo last change
|
undo last change
|
||||||
|
|
||||||
*<a-u>*::
|
*<a-u>*::
|
||||||
move backward in history
|
move backward in history
|
||||||
|
|
||||||
*U*::
|
*U*::
|
||||||
redo last change
|
redo last change
|
||||||
|
|
||||||
*<a-U>*::
|
*<a-U>*::
|
||||||
move forward in history
|
move forward in history
|
||||||
|
|
||||||
*&*::
|
*&*::
|
||||||
align selection, align the cursor of selections by inserting spaces
|
align selection, align the cursor of selections by inserting spaces
|
||||||
before the first character of the selection
|
before the first character of the selection
|
||||||
|
|
||||||
*<a-&>*::
|
*<a-&>*::
|
||||||
copy indent, copy the indentation of the main selection (or the
|
copy indent, copy the indentation of the main selection (or the
|
||||||
count one if a count is given) to all other ones
|
count one if a count is given) to all other ones
|
||||||
|
|
||||||
*`*::
|
*`*::
|
||||||
to lower case
|
to lower case
|
||||||
|
|
||||||
*~*::
|
*~*::
|
||||||
to upper case
|
to upper case
|
||||||
|
|
||||||
*<a-`>*::
|
*<a-`>*::
|
||||||
swap case
|
swap case
|
||||||
|
|
||||||
*@*::
|
*@*::
|
||||||
convert tabs to spaces in current selections, uses the buffer tabstop
|
convert tabs to spaces in current selections, uses the buffer tabstop
|
||||||
option or the count parameter for tabstop
|
option or the count parameter for tabstop
|
||||||
|
|
||||||
*<a-@>*::
|
*<a-@>*::
|
||||||
convert spaces to tabs in current selections, uses the buffer tabstop
|
convert spaces to tabs in current selections, uses the buffer tabstop
|
||||||
option or the count parameter for tabstop
|
option or the count parameter for tabstop
|
||||||
|
|
||||||
*<a-">*::
|
*<a-">*::
|
||||||
rotate selections content, if specified, the count groups selections,
|
rotate selections content, if specified, the count groups selections,
|
||||||
so the following command
|
so the following command
|
||||||
|
|
||||||
----------
|
----------
|
||||||
3<a-">
|
3<a-">
|
||||||
----------
|
----------
|
||||||
|
|
||||||
rotate (1, 2, 3) and (3, 4, 6) independently
|
rotate (1, 2, 3) and (3, 4, 6) independently
|
||||||
|
|
||||||
== Goto Commands
|
== Goto Commands
|
||||||
|
|
||||||
*g*, *G*::
|
*g*, *G*::
|
||||||
When a count is specified, *G* only extends the current selection to the given line,
|
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
|
*g* sends the anchor to the given line and a menu is then displayed which waits
|
||||||
for one of the following additional keys:
|
for one of the following additional keys:
|
||||||
|
|
||||||
*h*:::
|
*h*:::
|
||||||
go to line begin
|
go to line begin
|
||||||
|
|
||||||
*l*:::
|
*l*:::
|
||||||
go to line end
|
go to line end
|
||||||
|
|
||||||
*i*:::
|
*i*:::
|
||||||
go to non blank line start
|
go to non blank line start
|
||||||
|
|
||||||
*g*, *k*:::
|
*g*, *k*:::
|
||||||
go to the first line
|
go to the first line
|
||||||
|
|
||||||
*j*:::
|
*j*:::
|
||||||
go to the last line
|
go to the last line
|
||||||
|
|
||||||
*e*:::
|
*e*:::
|
||||||
go to last char of last line
|
go to last char of last line
|
||||||
|
|
||||||
*t*:::
|
*t*:::
|
||||||
go to the first displayed line
|
go to the first displayed line
|
||||||
|
|
||||||
*c*:::
|
*c*:::
|
||||||
go to the middle displayed line
|
go to the middle displayed line
|
||||||
|
|
||||||
*b*:::
|
*b*:::
|
||||||
go to the last displayed line
|
go to the last displayed line
|
||||||
|
|
||||||
*a*:::
|
*a*:::
|
||||||
go to the previous (alternate) buffer
|
go to the previous (alternate) buffer
|
||||||
|
|
||||||
*f*:::
|
*f*:::
|
||||||
open the file whose name is selected
|
open the file whose name is selected
|
||||||
|
|
||||||
*.*:::
|
*.*:::
|
||||||
go to last buffer modification position
|
go to last buffer modification position
|
||||||
|
|
||||||
== View commands
|
== View commands
|
||||||
|
|
||||||
*v*, *V*::
|
*v*, *V*::
|
||||||
*V* enters lock view mode (which will be left when the <esc> is hit),
|
*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
|
and *v* modifies the current view; a menu is then displayed which waits
|
||||||
for one of the following additional keys:
|
for one of the following additional keys:
|
||||||
|
|
||||||
*v*, *c*:::
|
*v*, *c*:::
|
||||||
center the main selection in the window (vertically)
|
center the main selection in the window (vertically)
|
||||||
|
|
||||||
*m*:::
|
*m*:::
|
||||||
center the main selection in the window (horizontally)
|
center the main selection in the window (horizontally)
|
||||||
|
|
||||||
*t*:::
|
*t*:::
|
||||||
scroll to put the main selection on the top line of the window
|
scroll to put the main selection on the top line of the window
|
||||||
|
|
||||||
*b*:::
|
*b*:::
|
||||||
scroll to put the main selection on the bottom line of the window
|
scroll to put the main selection on the bottom line of the window
|
||||||
|
|
||||||
*h*:::
|
*h*:::
|
||||||
scroll the window count columns left
|
scroll the window count columns left
|
||||||
|
|
||||||
*j*:::
|
*j*:::
|
||||||
scroll the window count line downward
|
scroll the window count line downward
|
||||||
|
|
||||||
*k*:::
|
*k*:::
|
||||||
scroll the window count line upward
|
scroll the window count line upward
|
||||||
|
|
||||||
*l*:::
|
*l*:::
|
||||||
scroll the window count columns right
|
scroll the window count columns right
|
||||||
|
|
||||||
|
|
||||||
== Marks
|
== Marks
|
||||||
|
@ -436,239 +436,239 @@ is a sequence of non whitespace characters
|
||||||
Marks use the *^* register by default.
|
Marks use the *^* register by default.
|
||||||
|
|
||||||
*Z*::
|
*Z*::
|
||||||
save the current selections to the register
|
save the current selections to the register
|
||||||
|
|
||||||
*z*::
|
*z*::
|
||||||
restore the selections from the register
|
restore the selections from the register
|
||||||
|
|
||||||
*<a-z>*, *<a-Z>*::
|
*<a-z>*, *<a-Z>*::
|
||||||
*<a-z>* combines the selections from the register with the current ones, whereas
|
*<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
|
*<a-Z>* combines the current selections with the register; a menu is then
|
||||||
displayed which waits for one of the following additional keys:
|
displayed which waits for one of the following additional keys:
|
||||||
|
|
||||||
*a*:::
|
*a*:::
|
||||||
append the selections
|
append the selections
|
||||||
|
|
||||||
*u*:::
|
*u*:::
|
||||||
keep a union of the selections
|
keep a union of the selections
|
||||||
|
|
||||||
*i*:::
|
*i*:::
|
||||||
keep an intersection of the selections
|
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
|
||||||
|
|
||||||
Macros use the *@* register by default
|
Macros use the *@* register by default
|
||||||
|
|
||||||
*<esc>*::
|
*<esc>*::
|
||||||
end macro recording
|
end macro recording
|
||||||
|
|
||||||
*Q*::
|
*Q*::
|
||||||
start or end macro recording
|
start or end macro recording
|
||||||
|
|
||||||
*q*::
|
*q*::
|
||||||
play a recorded macro
|
play a recorded macro
|
||||||
|
|
||||||
== Searching
|
== Searching
|
||||||
|
|
||||||
Searches use the */* register by default
|
Searches use the */* register by default
|
||||||
|
|
||||||
***::
|
***::
|
||||||
set the search pattern to the current selection (automatically
|
set the search pattern to the current selection (automatically
|
||||||
detects word boundaries)
|
detects word boundaries)
|
||||||
|
|
||||||
*<a-***>*::
|
*<a-***>*::
|
||||||
set the search pattern to the current selection (verbatim, no smart
|
set the search pattern to the current selection (verbatim, no smart
|
||||||
detection)
|
detection)
|
||||||
|
|
||||||
== Jump list
|
== Jump list
|
||||||
|
|
||||||
|
|
||||||
*<c-i>*::
|
*<c-i>*::
|
||||||
Jump forward
|
Jump forward
|
||||||
|
|
||||||
*<c-o>*::
|
*<c-o>*::
|
||||||
Jump backward
|
Jump backward
|
||||||
|
|
||||||
*<c-s>*::
|
*<c-s>*::
|
||||||
save current selections
|
save current selections
|
||||||
|
|
||||||
== Multiple selections
|
== Multiple selections
|
||||||
|
|
||||||
*s*::
|
*s*::
|
||||||
create a selection
|
create a selection
|
||||||
|
|
||||||
*<a-s>*::
|
*<a-s>*::
|
||||||
split the current selections on line boundaries
|
split the current selections on line boundaries
|
||||||
|
|
||||||
*S*::
|
*S*::
|
||||||
split the current selection
|
split the current selection
|
||||||
|
|
||||||
*C*::
|
*C*::
|
||||||
copy the current selection to the next line
|
copy the current selection to the next line
|
||||||
|
|
||||||
*<a-C>*::
|
*<a-C>*::
|
||||||
copy the current selection to the previous line
|
copy the current selection to the previous line
|
||||||
|
|
||||||
*<space>*::
|
*<space>*::
|
||||||
clear a multiple selection
|
clear a multiple selection
|
||||||
|
|
||||||
*<a-space>*::
|
*<a-space>*::
|
||||||
clear the current selection
|
clear the current selection
|
||||||
|
|
||||||
*<a-k>*::
|
*<a-k>*::
|
||||||
keep the selections that match the given regex
|
keep the selections that match the given regex
|
||||||
|
|
||||||
*<a-K>*::
|
*<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
|
pipe each selection to the given shell command and keep the ones
|
||||||
for which the shell returned 0
|
for which the shell returned 0
|
||||||
|
|
||||||
== Object Selection
|
== Object Selection
|
||||||
|
|
||||||
*<a-a>*::
|
*<a-a>*::
|
||||||
selects the whole object
|
selects the whole object
|
||||||
|
|
||||||
*<a-i>*::
|
*<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
|
After these keys, you need to enter a second key in order to specify which
|
||||||
object you want
|
object you want
|
||||||
|
|
||||||
*b*, *(*, *)*::
|
*b*, *(*, *)*::
|
||||||
select the enclosing parenthesis
|
select the enclosing parenthesis
|
||||||
|
|
||||||
*B*, *{*, *}*::
|
*B*, *{*, *}*::
|
||||||
select the enclosing {} block
|
select the enclosing {} block
|
||||||
|
|
||||||
*r*, *[*, *]*::
|
*r*, *[*, *]*::
|
||||||
select the enclosing [] block
|
select the enclosing [] block
|
||||||
|
|
||||||
*a*, *<*, *>*::
|
*a*, *<*, *>*::
|
||||||
select the enclosing <> block
|
select the enclosing <> block
|
||||||
|
|
||||||
*"*, *Q*::
|
*"*, *Q*::
|
||||||
select the enclosing double quoted string
|
select the enclosing double quoted string
|
||||||
|
|
||||||
*'*, *q*::
|
*'*, *q*::
|
||||||
select the enclosing single quoted string
|
select the enclosing single quoted string
|
||||||
|
|
||||||
*`*, *g*::
|
*`*, *g*::
|
||||||
select the enclosing grave quoted string
|
select the enclosing grave quoted string
|
||||||
|
|
||||||
*w*::
|
*w*::
|
||||||
select the whole word
|
select the whole word
|
||||||
|
|
||||||
*W*::
|
*W*::
|
||||||
select the whole WORD
|
select the whole WORD
|
||||||
|
|
||||||
*s*::
|
*s*::
|
||||||
select the sentence
|
select the sentence
|
||||||
|
|
||||||
*p*::
|
*p*::
|
||||||
select the paragraph
|
select the paragraph
|
||||||
|
|
||||||
*␣*::
|
*␣*::
|
||||||
select the whitespaces
|
select the whitespaces
|
||||||
|
|
||||||
*i*::
|
*i*::
|
||||||
select the current indentation block
|
select the current indentation block
|
||||||
|
|
||||||
*n*::
|
*n*::
|
||||||
select the number
|
select the number
|
||||||
|
|
||||||
*u*::
|
*u*::
|
||||||
select the argument
|
select the argument
|
||||||
|
|
||||||
*c*::
|
*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
|
== Prompt Commands
|
||||||
|
|
||||||
*<ret>*::
|
*<ret>*::
|
||||||
validate prompt
|
validate prompt
|
||||||
|
|
||||||
*<esc>*::
|
*<esc>*::
|
||||||
abandon without
|
abandon without
|
||||||
|
|
||||||
*<left>*, *<a-h>*::
|
*<left>*, *<a-h>*::
|
||||||
move cursor to previous character
|
move cursor to previous character
|
||||||
|
|
||||||
*<right>*, *<a-l>*::
|
*<right>*, *<a-l>*::
|
||||||
move cursor to previous character
|
move cursor to previous character
|
||||||
|
|
||||||
*<home>*::
|
*<home>*::
|
||||||
move cursor to first character
|
move cursor to first character
|
||||||
|
|
||||||
*<end>*::
|
*<end>*::
|
||||||
move cursor past the last character
|
move cursor past the last character
|
||||||
|
|
||||||
*<backspace>*, *<a-x>*::
|
*<backspace>*, *<a-x>*::
|
||||||
erase character before cursor
|
erase character before cursor
|
||||||
|
|
||||||
*<del>*, *<a-d>*::
|
*<del>*, *<a-d>*::
|
||||||
erase character under cursor
|
erase character under cursor
|
||||||
|
|
||||||
*<c-w>*::
|
*<c-w>*::
|
||||||
avance to next word begin
|
avance to next word begin
|
||||||
|
|
||||||
*<c-a-w>*::
|
*<c-a-w>*::
|
||||||
advance to next WORD begin
|
advance to next WORD begin
|
||||||
|
|
||||||
*<c-b>*::
|
*<c-b>*::
|
||||||
go back to previous word begin
|
go back to previous word begin
|
||||||
|
|
||||||
*<c-a-b>*::
|
*<c-a-b>*::
|
||||||
go back to previous WORD begin
|
go back to previous WORD begin
|
||||||
|
|
||||||
*<c-e>*::
|
*<c-e>*::
|
||||||
advance to next word end
|
advance to next word end
|
||||||
|
|
||||||
*<c-a-e>*::
|
*<c-a-e>*::
|
||||||
advance to next word end
|
advance to next word end
|
||||||
|
|
||||||
*<up>*, *<c-p>*::
|
*<up>*, *<c-p>*::
|
||||||
select previous entry in history
|
select previous entry in history
|
||||||
|
|
||||||
*<down>*, *<c-n>*::
|
*<down>*, *<c-n>*::
|
||||||
select next entry in history
|
select next entry in history
|
||||||
|
|
||||||
*<tab>*::
|
*<tab>*::
|
||||||
select next completion candidate
|
select next completion candidate
|
||||||
|
|
||||||
*<backtab>*::
|
*<backtab>*::
|
||||||
select previous completion candidate
|
select previous completion candidate
|
||||||
|
|
||||||
*<c-r>*::
|
*<c-r>*::
|
||||||
insert then content of the register given by next key
|
insert then content of the register given by next key
|
||||||
|
|
||||||
*<c-v>*::
|
*<c-v>*::
|
||||||
insert next keystroke without interpreting it
|
insert next keystroke without interpreting it
|
||||||
|
|
||||||
*<c-o>*::
|
*<c-o>*::
|
||||||
disable auto completion for this prompt
|
disable auto completion for this prompt
|
||||||
|
|
|
@ -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:
|
*mode* dictates in what context the mapping will be available:
|
||||||
|
|
||||||
*insert*::
|
*insert*::
|
||||||
insert mode
|
insert mode
|
||||||
*normal*::
|
*normal*::
|
||||||
normal mode
|
normal mode
|
||||||
*prompt*::
|
*prompt*::
|
||||||
prompts, such as when entering a command through *:*, or a regex through */*
|
prompts, such as when entering a command through *:*, or a regex through */*
|
||||||
*menu*::
|
*menu*::
|
||||||
mode entered when a menu is displayed with the 'menu' command
|
mode entered when a menu is displayed with the 'menu' command
|
||||||
*user*::
|
*user*::
|
||||||
mode entered when the user prefix is hit (default: ',')
|
mode entered when the user prefix is hit (default: ',')
|
||||||
*goto*::
|
*goto*::
|
||||||
mode entered when the goto key is hit (default: 'g')
|
mode entered when the goto key is hit (default: 'g')
|
||||||
*view*::
|
*view*::
|
||||||
mode entered when the view key is hit (default: 'v')
|
mode entered when the view key is hit (default: 'v')
|
||||||
*object*::
|
*object*::
|
||||||
mode entered when an object selection is triggered (e.g. '<a-i>')
|
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
|
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
|
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:
|
be used:
|
||||||
|
|
||||||
*x*, *<x>*::
|
*x*, *<x>*::
|
||||||
Most keys, especially alphabetic keys, represent themselves.
|
Most keys, especially alphabetic keys, represent themselves.
|
||||||
Keys can also be wrapped in angle-brackets for consistency
|
Keys can also be wrapped in angle-brackets for consistency
|
||||||
with the non-alphabetic keys below.
|
with the non-alphabetic keys below.
|
||||||
|
|
||||||
*X*, *<X>*::
|
*X*, *<X>*::
|
||||||
Holding down Shift while pressing the *x* key.
|
Holding down Shift while pressing the *x* key.
|
||||||
|
|
||||||
*<c-x>*::
|
*<c-x>*::
|
||||||
Holding down Control while pressing the *x* key.
|
Holding down Control while pressing the *x* key.
|
||||||
|
|
||||||
*<a-x>*::
|
*<a-x>*::
|
||||||
Holding down Alt while pressing the *x* key.
|
Holding down Alt while pressing the *x* key.
|
||||||
|
|
||||||
*<lt>*, *<gt>*::
|
*<lt>*, *<gt>*::
|
||||||
The *<* and *>* characters.
|
The *<* and *>* characters.
|
||||||
|
|
||||||
*<plus>*, *<minus>*::
|
*<plus>*, *<minus>*::
|
||||||
The *+* and *-* characters..
|
The *+* and *-* characters..
|
||||||
|
|
||||||
*<ret>*::
|
*<ret>*::
|
||||||
The Return or Enter key.
|
The Return or Enter key.
|
||||||
|
|
||||||
*<space>*::
|
*<space>*::
|
||||||
The space bar.
|
The space bar.
|
||||||
|
|
||||||
*<tab>*::
|
*<tab>*::
|
||||||
The Tab key.
|
The Tab key.
|
||||||
|
|
||||||
*<backtab>*::
|
*<backtab>*::
|
||||||
The reverse-tab key. This is Shift-Tab on most keyboards.
|
The reverse-tab key. This is Shift-Tab on most keyboards.
|
||||||
|
|
||||||
*<backspace>*::
|
*<backspace>*::
|
||||||
The Backspace (delete to the left) key.
|
The Backspace (delete to the left) key.
|
||||||
|
|
||||||
*<del>*::
|
*<del>*::
|
||||||
The Delete (to the right) key.
|
The Delete (to the right) key.
|
||||||
|
|
||||||
*<esc>*::
|
*<esc>*::
|
||||||
The Escape key.
|
The Escape key.
|
||||||
|
|
||||||
*<up>*, *<down>*, *<left>*, *<right>*, *<pageup>*, *<pagedown>*, *<home>*::
|
*<up>*, *<down>*, *<left>*, *<right>*, *<pageup>*, *<pagedown>*, *<home>*::
|
||||||
*<end>*::
|
*<end>*::
|
||||||
The usual cursor-movement keys.
|
The usual cursor-movement keys.
|
||||||
|
|
||||||
*<f1>*, *<f2>*, ...*<f12>*::
|
*<f1>*, *<f2>*, ...*<f12>*::
|
||||||
Function keys.
|
Function keys.
|
||||||
|
|
|
@ -9,11 +9,11 @@ the last yanked text, or the captured groups associated with the selections.
|
||||||
== Interacting
|
== Interacting
|
||||||
|
|
||||||
*<c-r><c>*::
|
*<c-r><c>*::
|
||||||
when in insert mode or in a prompt, insert the value stored in the
|
when in insert mode or in a prompt, insert the value stored in the
|
||||||
*c* register (single character)
|
*c* register (single character)
|
||||||
|
|
||||||
*"<c>*::
|
*"<c>*::
|
||||||
in normal mode, select the *<c>* register (single character)
|
in normal mode, select the *<c>* register (single character)
|
||||||
|
|
||||||
== Alternate names
|
== 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:
|
Most commands using a register default to a specific one if not specified:
|
||||||
|
|
||||||
*"* (dquote)::
|
*"* (dquote)::
|
||||||
default copy register, used by yanking and pasting commands like *y*, *p*
|
default copy register, used by yanking and pasting commands like *y*, *p*
|
||||||
and *R*
|
and *R*
|
||||||
|
|
||||||
*/* (slash)::
|
*/* (slash)::
|
||||||
default search register, used by regex based commands like *s*, ***
|
default search register, used by regex based commands like *s*, ***
|
||||||
or */*
|
or */*
|
||||||
|
|
||||||
*@* (arobase)::
|
*@* (arobase)::
|
||||||
default macro register, used by *q* and *Q*
|
default macro register, used by *q* and *Q*
|
||||||
|
|
||||||
*^* (caret)::
|
*^* (caret)::
|
||||||
default mark register, used by *z* and *Z*
|
default mark register, used by *z* and *Z*
|
||||||
|
|
||||||
*|* (pipe)::
|
*|* (pipe)::
|
||||||
default shell command register, used by command that spawn a subshell such as
|
default shell command register, used by command that spawn a subshell such as
|
||||||
*|*, *<a-|>*, *!* or *<a-!>*
|
*|*, *<a-|>*, *!* or *<a-!>*
|
||||||
|
|
||||||
== Special registers
|
== Special registers
|
||||||
|
|
||||||
|
@ -48,19 +48,19 @@ Some registers are not general purposes, they cannot be written to, but they
|
||||||
contain some special data
|
contain some special data
|
||||||
|
|
||||||
*%* (percent)::
|
*%* (percent)::
|
||||||
current buffer name
|
current buffer name
|
||||||
|
|
||||||
*.* (dot)::
|
*.* (dot)::
|
||||||
current selection contents
|
current selection contents
|
||||||
|
|
||||||
*#* (hash)::
|
*#* (hash)::
|
||||||
selection indices (first selection has 1, second has 2, ...)
|
selection indices (first selection has 1, second has 2, ...)
|
||||||
|
|
||||||
*_* (underscore)::
|
*_* (underscore)::
|
||||||
null register, always empty
|
null register, always empty
|
||||||
|
|
||||||
*:* (colon)::
|
*:* (colon)::
|
||||||
last entered command
|
last entered command
|
||||||
|
|
||||||
== Integer registers
|
== Integer registers
|
||||||
|
|
||||||
|
|
|
@ -11,11 +11,11 @@ value was declared in.
|
||||||
Scopes are named as follows:
|
Scopes are named as follows:
|
||||||
|
|
||||||
*window*::
|
*window*::
|
||||||
context linked to the window displaying a buffer
|
context linked to the window displaying a buffer
|
||||||
*buffer*::
|
*buffer*::
|
||||||
context linked directly to the buffer
|
context linked directly to the buffer
|
||||||
*global*::
|
*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:
|
The following order of priority applies to the above scopes:
|
||||||
|
|
||||||
|
@ -37,16 +37,16 @@ default.
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
*filetype*::
|
*filetype*::
|
||||||
A single buffer opened in two separate windows can have different
|
A single buffer opened in two separate windows can have different
|
||||||
filetypes declared in the *window* scope with 'set' (c.f. the 'options'
|
filetypes declared in the *window* scope with 'set' (c.f. the 'options'
|
||||||
documentation page)
|
documentation page)
|
||||||
|
|
||||||
*status line*::
|
*status line*::
|
||||||
All the buffers of the current session can have the same information
|
All the buffers of the current session can have the same information
|
||||||
displayed in the status line, except for a specific buffer (the
|
displayed in the status line, except for a specific buffer (the
|
||||||
'modelinefmt' option can be declared in the *global* scope, and
|
'modelinefmt' option can be declared in the *global* scope, and
|
||||||
customized in the *buffer* scope with 'set', c.f. the 'options'
|
customized in the *buffer* scope with 'set', c.f. the 'options'
|
||||||
documentation page)
|
documentation page)
|
||||||
|
|
||||||
== Execution context
|
== Execution context
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user