Rewrote the documentation pages in asciidoc
format
This commit is contained in:
parent
6951f3f2d9
commit
77beeaf9b9
|
@ -1,185 +1,154 @@
|
||||||
.TH KAKOUNE 1 "" "" "COMMANDS"
|
KAKOUNE(1)
|
||||||
|
==========
|
||||||
|
|
||||||
.SS Primitives
|
NAME
|
||||||
.TP
|
----
|
||||||
.BR e[dit] " <filename> [<line> [<column>]]"
|
commands - a
|
||||||
|
|
||||||
|
Primitives
|
||||||
|
----------
|
||||||
|
*e[dit]* <filename> [<line> [<column>]]::
|
||||||
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
|
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
|
||||||
.TP
|
|
||||||
.BR w[rite] " [<filename>]"
|
|
||||||
write buffer to <filename> or use it's name if filename is not given
|
|
||||||
.TP
|
|
||||||
.BR w[rite]a[ll]
|
|
||||||
write all buffers that are associated to a file
|
|
||||||
.TP
|
|
||||||
.BR q[uit]
|
|
||||||
exit Kakoune, use quit! to force quitting even if there is some unsaved buffers remaining
|
|
||||||
.TP
|
|
||||||
.BR wq
|
|
||||||
write current buffer and quit
|
|
||||||
.TP
|
|
||||||
.BR b[uffer] " <name>"
|
|
||||||
switch to buffer <name>
|
|
||||||
.TP
|
|
||||||
.BR d[el]b[uf] " [<name>]"
|
|
||||||
delete the buffer <name>, use d[el]b[uf]! to force deleting a modified buffer
|
|
||||||
.TP
|
|
||||||
.BR source " <filename>"
|
|
||||||
execute commands in <filename>
|
|
||||||
.TP
|
|
||||||
.BR runtime " <filename>"
|
|
||||||
execute commands in <filename>, <filename> is relative to kak executable path
|
|
||||||
.TP
|
|
||||||
.BR colorscheme " <name>"
|
|
||||||
load named colorscheme
|
|
||||||
.TP
|
|
||||||
.BR nameclient " <name>"
|
|
||||||
set current client name
|
|
||||||
.TP
|
|
||||||
.BR namebuf " <name>"
|
|
||||||
set current buffer name
|
|
||||||
.TP
|
|
||||||
.BR echo " <text>"
|
|
||||||
show <text> in status line
|
|
||||||
.TP
|
|
||||||
.BR nop
|
|
||||||
does nothing, but arguments will be evaluated (e.g. shell expansion)
|
|
||||||
.TP
|
|
||||||
.BR set " <scope> <name> <value>"
|
|
||||||
change the value of an option (c.f. the 'options' documentation page)
|
|
||||||
.TP
|
|
||||||
.BR alias " <scope> <name> <command>"
|
|
||||||
define a new alias, within the context of a scope
|
|
||||||
.TP
|
|
||||||
.BR 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
|
|
||||||
.TP
|
|
||||||
.BR decl " [-hidden] <type> <name> [<value>]"
|
|
||||||
declare a new option, the -hidden hides the option in completion suggestions (c.f. the 'options' documentation page)
|
|
||||||
.TP
|
|
||||||
.BR face " <name> <facespec>"
|
|
||||||
define a face (c.f. the 'faces' documentation page)
|
|
||||||
.TP
|
|
||||||
.BR exec " [<flags>] <key> …"
|
|
||||||
execute a series of keys, as if they were hit (c.f. the 'execeval' documentation page)
|
|
||||||
.TP
|
|
||||||
.BR eval " [<flags>] <command> …"
|
|
||||||
execute commands, as if they were entered in the command prompt (c.f. the 'execeval' documentation page)
|
|
||||||
.TP
|
|
||||||
.BR def " [<flags>] <name> <command>"
|
|
||||||
define a new command (c.f. the 'Declaring new commands' section below)
|
|
||||||
.TP
|
|
||||||
.BR map " <scope> <mode> <key> <keys>"
|
|
||||||
bind a combination of keys to another one (c.f. the 'commands' documentation page)
|
|
||||||
.TP
|
|
||||||
.BR hook " [-group <group>] <scope> <hook_name> <filtering_regex> <command>"
|
|
||||||
execute a command whenever an event is triggered (c.f. the 'hooks' documentation page)
|
|
||||||
.TP
|
|
||||||
.BR rmhooks " <scope> <group>"
|
|
||||||
remove every hooks in
|
|
||||||
.IR <scope>
|
|
||||||
that are part of the given
|
|
||||||
.IR <group>
|
|
||||||
(c.f. the 'hooks' documentation page)
|
|
||||||
.TP
|
|
||||||
.BR addhl " [<flags>] <highlighter_name> <highlighter_parameters> …"
|
|
||||||
add a highlighter to the current window (c.f. the 'highlighters' documentation page)
|
|
||||||
.TP
|
|
||||||
.BR rmhl " <highlighter_id>"
|
|
||||||
remove the highlighter whose id is
|
|
||||||
.IR highlighter_id
|
|
||||||
(c.f. the 'highlighters' documentation page)
|
|
||||||
|
|
||||||
.SS Helpers
|
*w[rite]* [<filename>]::
|
||||||
|
write buffer to <filename> or use it's name if filename is not given
|
||||||
|
|
||||||
|
*w[rite]a[ll]*::
|
||||||
|
write all buffers that are associated to a file
|
||||||
|
|
||||||
|
*q[uit]*::
|
||||||
|
exit Kakoune, use quit! to force quitting even if there is some unsaved buffers remaining
|
||||||
|
|
||||||
|
*wq*::
|
||||||
|
write current buffer and quit
|
||||||
|
|
||||||
|
*b[uffer]* <name>::
|
||||||
|
switch to buffer <name>
|
||||||
|
|
||||||
|
*d[el]b[uf]* [<name>]::
|
||||||
|
delete the buffer <name>, use d[el]b[uf]! to force deleting a modified buffer
|
||||||
|
|
||||||
|
*source* <filename>::
|
||||||
|
execute commands in <filename>
|
||||||
|
|
||||||
|
*runtime* <filename>::
|
||||||
|
execute commands in <filename>, <filename> is relative to kak executable path
|
||||||
|
|
||||||
|
*colorscheme* <name>::
|
||||||
|
load named colorscheme
|
||||||
|
|
||||||
|
*nameclient* <name>::
|
||||||
|
set current client name
|
||||||
|
|
||||||
|
*namebuf* <name>::
|
||||||
|
set current buffer name
|
||||||
|
|
||||||
|
*echo* <text>::
|
||||||
|
show <text> in status line
|
||||||
|
|
||||||
|
*nop*::
|
||||||
|
does nothing, but arguments will be evaluated (e.g. shell expansion)
|
||||||
|
|
||||||
|
*set* <scope> <name> <value>::
|
||||||
|
change the value of an option (c.f. the 'options' documentation page)
|
||||||
|
|
||||||
|
*alias* <scope> <name> <command>::
|
||||||
|
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
|
||||||
|
|
||||||
|
*decl* [-hidden] <type> <name> [<value>]::
|
||||||
|
declare a new option, the -hidden hides the option in completion suggestions (c.f. the 'options' documentation page)
|
||||||
|
|
||||||
|
*face* <name> <facespec>::
|
||||||
|
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)
|
||||||
|
|
||||||
|
*eval* [<flags>] <command> ...::
|
||||||
|
execute commands, as if they were entered in the command prompt (c.f. the 'execeval' documentation page)
|
||||||
|
|
||||||
|
*def* [<flags>] <name> <command>::
|
||||||
|
define a new command (c.f. the 'Declaring new commands' section below)
|
||||||
|
|
||||||
|
*map* <scope> <mode> <key> <keys>::
|
||||||
|
bind a combination of keys to another one (c.f. the 'commands' 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)
|
||||||
|
|
||||||
|
*rmhooks* <scope> <group>::
|
||||||
|
remove every hooks in *scope* that are part of the given *group* (c.f. the 'hooks' documentation page)
|
||||||
|
|
||||||
|
*addhl* [<flags>] <highlighter_name> <highlighter_parameters> ...::
|
||||||
|
add a highlighter to the current window (c.f. the 'highlighters' documentation page)
|
||||||
|
|
||||||
|
*rmhl* <highlighter_id>::
|
||||||
|
remove the highlighter whose id is *highlighter_id* (c.f. the 'highlighters' documentation page)
|
||||||
|
|
||||||
|
Helpers
|
||||||
|
-------
|
||||||
Kakoune provides some helper commands that can be used to define composite commands:
|
Kakoune provides some helper commands that can be used to define composite commands:
|
||||||
.TP
|
|
||||||
.BR prompt " <prompt> <register> <command>"
|
*prompt* <prompt> <register> <command>::
|
||||||
prompt the user for a string, when the user validates, store the result in given
|
prompt the user for a string, when the user validates, store the result in given *register* and run *commmand*. the *-init <str>* switch allows setting initial content
|
||||||
.IR <register> " and run " <commmand> "."
|
|
||||||
the
|
*onkey* <register> <command>::
|
||||||
.IR -init <str>
|
|
||||||
switch allows setting initial content
|
|
||||||
.TP
|
|
||||||
.BR onkey " <register> <command>"
|
|
||||||
wait for next key from user, writes it into given <register> and execute commands
|
wait for next key from user, writes it into given <register> and execute commands
|
||||||
.TP
|
|
||||||
.BR menu " <label1> <commands1> <label2> <commands2> …"
|
*menu* <label1> <commands1> <label2> <commands2> ...::
|
||||||
display a menu using labels, the selected label’s commands are executed. menu can take an
|
display a menu using labels, the selected label’s commands are executed. menu 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)
|
||||||
.IR -auto-single
|
|
||||||
argument, to automatically run commands when only one choice is provided, and a
|
*info* <text>::
|
||||||
.IR -select-cmds
|
display text in an information box, at can take an *-anchor* option, which accepts left, right and cursor as value, in order to specify where the info box should be anchored relative to the main selection
|
||||||
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)
|
|
||||||
.TP
|
*try* <commands> catch <on_error_commands>::
|
||||||
.BR info " <text>"
|
prevent an error in *commands* from aborting the whole commands execution, execute *on_error_commands* instead. If nothing is to be done on error, the catch part can be ommitted
|
||||||
display text in an information box, at can take an
|
|
||||||
.IR -anchor
|
*reg* <name> <content>::
|
||||||
option, which accepts left, right and cursor as value, in order to specify where the info box should be anchored relative to the main selection
|
set register *name* to *content*
|
||||||
.TP
|
|
||||||
.BR try " <commands> catch <on_error_commands>"
|
|
||||||
prevent an error in
|
|
||||||
.IR <commands>
|
|
||||||
from aborting the whole commands execution, execute
|
|
||||||
.IR <on_error_commands>
|
|
||||||
instead. If nothing is to be done on error, the catch part can be ommitted
|
|
||||||
.TP
|
|
||||||
.BR reg " <name> <content>"
|
|
||||||
set register
|
|
||||||
.IR <name> " to " <content>
|
|
||||||
.RE
|
|
||||||
|
|
||||||
Note that those commands are also available in the interactive mode, but are not really useful in that context.
|
Note that those commands are also available in the interactive mode, but are not really useful in that context.
|
||||||
|
|
||||||
.SS Multiple commands
|
Multiple commands
|
||||||
Commands (c.f. previous sections) can be chained, by being separated either by new lines or by semicolons, as such a
|
-----------------
|
||||||
semicolon must be escaped with a backslash (\;) to be considered as a literal semicolon argument
|
Commands (c.f. previous sections) can be chained, by being separated either by new lines or by semicolons, as such a semicolon must be escaped with a backslash (\;) to be considered as a literal semicolon argument
|
||||||
|
|
||||||
.SS Declaring new commands
|
Declaring new commands
|
||||||
|
----------------------
|
||||||
|
New commands can be defined using the *def* command:
|
||||||
|
|
||||||
New commands can be defined using the
|
*def* [flags] <command_name> <commands>::
|
||||||
.IR def
|
*commands* is a string containing the commands to execute, and *flags* can be any combination of the following parameters:
|
||||||
command:
|
|
||||||
|
|
||||||
.RS 3
|
*-params* <num>::
|
||||||
.TP
|
the command accepts a *num* parameter, which can be either a number, or of the form <min>..<max>, with both <min> and <max> omittable
|
||||||
.BR def " [flags] <command_name> <commands>"
|
|
||||||
.RE
|
|
||||||
|
|
||||||
.IR <commands>
|
*-file-completion*::
|
||||||
is a string containing the commands to execute, and
|
|
||||||
.IR flags
|
|
||||||
can be any combination of the following parameters:
|
|
||||||
|
|
||||||
.RS 3
|
|
||||||
.TP
|
|
||||||
.BR -params " <num>"
|
|
||||||
the command accepts a
|
|
||||||
.IR <num>
|
|
||||||
parameter, which can be either a number, or of the form <min>..<max>, with both <min> and <max> omittable
|
|
||||||
.TP
|
|
||||||
.BR -file-completion
|
|
||||||
try file completion on any parameter passed to this command
|
try file completion on any parameter passed to this command
|
||||||
.TP
|
|
||||||
.BR -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
|
||||||
.TP
|
|
||||||
.BR -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
|
||||||
.TP
|
|
||||||
.BR -shell-completion
|
*-shell-completion*::
|
||||||
following string is a shell command which takes parameters as positional params and output one completion candidate per line
|
following string is a shell command which takes parameters as positional params and output one completion candidate per line
|
||||||
.TP
|
|
||||||
.BR -allow-override
|
*-allow-override*::
|
||||||
allow the new command to replace an exisiting one with the same name
|
allow the new command to replace an exisiting one with the same name
|
||||||
.TP
|
|
||||||
.BR -hidden
|
*-hidden*::
|
||||||
do not show the command in command name completions
|
do not show the command in command name completions
|
||||||
.TP
|
|
||||||
.BR -docstring
|
*-docstring*::
|
||||||
define the documentation string for the command
|
define the documentation string for the command
|
||||||
.RE
|
|
||||||
|
|
||||||
Using shell expansion allows to define complex commands or to access Kakoune state:
|
Using shell expansion allows to define complex commands or to access Kakoune state:
|
||||||
|
|
||||||
.RS 3
|
--------------------------------------------------------
|
||||||
.TP
|
def " print_selection %{ echo %sh{ ${kak_selection} } }"
|
||||||
.BR def " print_selection %{ echo %sh{ ${kak_selection} } }"
|
--------------------------------------------------------
|
||||||
.RE
|
|
||||||
|
|
|
@ -1,53 +1,49 @@
|
||||||
.TH KAKOUNE 1 "" "" "EXEC & EVAL"
|
KAKOUNE(1)
|
||||||
|
==========
|
||||||
|
|
||||||
.TP
|
NAME
|
||||||
The
|
----
|
||||||
.IR exec " and " eval
|
execeval - a
|
||||||
commands can be used to run Kakoune commands, and should be used as follows:
|
|
||||||
|
|
||||||
.RS 3
|
Description
|
||||||
.TP
|
-----------
|
||||||
.BR exec " [<flags>] <key> …"
|
The *exec* and *eval* commands can be used to run Kakoune commands, and should be used as follows:
|
||||||
.TP
|
|
||||||
.BR eval " [<flags>] <command> …"
|
|
||||||
.RE
|
|
||||||
|
|
||||||
.IR exec
|
----------------------------
|
||||||
runs keys as if they were pressed, whereas
|
exec [<flags>] <key> ...
|
||||||
.IR eval
|
eval [<flags>] <command> ...
|
||||||
executes its given paremeters as if they were entered in the command prompt. \
|
----------------------------
|
||||||
By default, their execution happens within the context of the current client, \
|
|
||||||
and stops when the last key/command is reached, or an error is raised.
|
|
||||||
|
|
||||||
.SS Optional flags
|
*exec* runs keys as if they were pressed, whereas *eval* executes its given paremeters as if they were entered in
|
||||||
.TP
|
the command prompt. By default, their execution happens within the context of the current client, and stops when
|
||||||
.BR -client " <name>"
|
the last key/command is reached, or an error is raised.
|
||||||
execute in the context of the client named
|
|
||||||
.IR <name>
|
Optional flags
|
||||||
.TP
|
--------------
|
||||||
.BR -try-client " <name>"
|
*-client* <name>::
|
||||||
execute in the context of the client named
|
execute in the context of the client named *name*
|
||||||
.IR <name>
|
|
||||||
if such client exists, or else in the current context
|
*-try-client* <name>::
|
||||||
.TP
|
execute in the context of the client named *name* if such client exists, or else in the current context
|
||||||
.BR -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 user’s selection
|
*-draft*::
|
||||||
.TP
|
execute in a copy of the context of the selected client modifications to the selections or input state
|
||||||
.BR -itersel " (requires -draft)"
|
will not affect the client. This permits to make some modification to the buffer without modifying the
|
||||||
execute once per selection, in a context with only the considered selection. This permits to avoid cases where the selections may get merged
|
user’s selection
|
||||||
.TP
|
|
||||||
.BR -buffer " <names>"
|
*-itersel* (requires -draft)::
|
||||||
execute in the context of each buffers in the comma separated list
|
execute once per selection, in a context with only the considered selection. This permits to avoid cases
|
||||||
.IR <names> ", " *
|
where the selections may get merged
|
||||||
as a name can be used to iterate on all buffers
|
|
||||||
.TP
|
*-buffer* <names>::
|
||||||
.BR -no-hooks
|
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
|
||||||
.TP
|
|
||||||
.BR -with-maps
|
*-with-maps*::
|
||||||
use user key mapping in
|
use user key mapping in instead of built in keys (*exec* only)
|
||||||
.IR exec
|
|
||||||
instead of built in keys
|
*-save-regs* <regs>::
|
||||||
.TP
|
|
||||||
.BR -save-regs " <regs>"
|
|
||||||
regs is a string of registers to be restored after execution
|
regs is a string of registers to be restored after execution
|
||||||
|
|
|
@ -1,115 +1,102 @@
|
||||||
.TH KAKOUNE 1 "" "" "EXPANSIONS"
|
KAKOUNE(1)
|
||||||
|
==========
|
||||||
|
|
||||||
.SS Strings
|
NAME
|
||||||
.TP
|
----
|
||||||
.BR 'strings'
|
expansions - a
|
||||||
|
|
||||||
|
Strings
|
||||||
|
-------
|
||||||
|
\'strings'::
|
||||||
uninterpreted strings, use a backslash (\\') to escape the separator
|
uninterpreted strings, use a backslash (\\') to escape the separator
|
||||||
.TP
|
"strings"::
|
||||||
.BR "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
|
||||||
.TP
|
%\{strings\}::
|
||||||
.BR %{strings}
|
these strings are very useful when entering commands
|
||||||
these strings are very useful when entering commands the
|
+
|
||||||
.IR { " and " }
|
* the '{' and '}' delimiters are configurable, you can use any non alphanumeric character
|
||||||
delimiters are configurable, you can use any non 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 one is the matching '}])>' and the delimiters are not escapable but are nestable
|
----------------------------------------------------------
|
||||||
e.g.
|
* if the character following '%' is one of '{[(<', then the closing one is the matching '}])>' and the
|
||||||
.IR %{\ roger\ {};\ } " is a valid string
|
delimiters are not escapable but are nestable
|
||||||
|
+
|
||||||
|
-----------------------------------------------------------
|
||||||
|
e.g. %{ roger {}; } is a valid string, %{ marcel \} as well
|
||||||
|
-----------------------------------------------------------
|
||||||
|
|
||||||
.SS Typed expansions
|
Typed expansions
|
||||||
.TP
|
----------------
|
||||||
.BR sh
|
*sh*::
|
||||||
shell expansion, similar to posix shell $(…) construct (c.f. next section)
|
shell expansion, similar to posix shell '$(...)' construct (c.f. next section)
|
||||||
.TP
|
*reg*::
|
||||||
.BR reg
|
|
||||||
register expansion, will be replaced by the content of the given register
|
register expansion, will be replaced by the content of the given register
|
||||||
.TP
|
*opt*::
|
||||||
.BR opt
|
|
||||||
option expansion, will be replaced with the value of the given option
|
option expansion, will be replaced with the value of the given option
|
||||||
.TP
|
*val*::
|
||||||
.BR val
|
value expansion, gives access to the environment variable available to the Shell expansion. The 'kak_'
|
||||||
value expansion, gives access to the environment variable available to the Shell expansion. The kak_ prefix is not used there
|
prefix is not used there
|
||||||
.TP
|
*arg*::
|
||||||
.BR arg
|
argument expansion, gives access to the arguments of the current command, the content can be a number,
|
||||||
argument expansion, gives access to the arguments of the current command, the content can be a number, or @ for all arguments
|
or @ for all arguments
|
||||||
|
|
||||||
.SS Shell expansions
|
Shell expansions
|
||||||
The
|
----------------
|
||||||
.IR %sh{…}
|
The '%sh{...}' expansion replaces its content with the output of the shell commands in it. The following environment
|
||||||
expansion replaces its content with the output of the shell commands in it. The following environment variables are used to pass informations about Kakoune's state:
|
variables are used to pass informations about Kakoune's state:
|
||||||
|
|
||||||
.TP
|
*kak_selection*::
|
||||||
.BR kak_selection
|
|
||||||
content of the main selection
|
content of the main selection
|
||||||
.TP
|
*kak_selections*::
|
||||||
.BR kak_selections
|
content of the selection separated by colons, colons in the selection contents are escapted with a backslash
|
||||||
content of the selection separated by colons, colons in the selection contents are escapted with a backslash.
|
*kak_selection_desc*::
|
||||||
.TP
|
|
||||||
.BR 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
|
||||||
.TP
|
*kak_selections_desc*::
|
||||||
.BR kak_selections_desc
|
|
||||||
range of the selecations separated by colons
|
range of the selecations separated by colons
|
||||||
.TP
|
*kak_bufname*::
|
||||||
.BR kak_bufname
|
|
||||||
name of the current buffer
|
name of the current buffer
|
||||||
.TP
|
*kak_buffile*::
|
||||||
.BR kak_buffile
|
|
||||||
full path of the file or same as kak_bufname when there’s no associated file
|
full path of the file or same as kak_bufname when there’s no associated file
|
||||||
.TP
|
*kak_buflist*::
|
||||||
.BR kak_buflist
|
|
||||||
the current buffer list, each buffer seperated by a colon
|
the current buffer list, each buffer seperated by a colon
|
||||||
.TP
|
*kak_timestamp*::
|
||||||
.BR kak_timestamp
|
timestamp of the current buffer, the timestamp is an integer value which is incremented each time the
|
||||||
timestamp of the current buffer, the timestamp is an integer value which is incremented each time the buffer is modified.
|
buffer is modified
|
||||||
.TP
|
*kak_runtime*::
|
||||||
.BR kak_runtime
|
|
||||||
directory containing the kak binary
|
directory containing the kak binary
|
||||||
.TP
|
*kak_opt_<name>*::
|
||||||
.BR kak_opt_<name>
|
value of option *name*
|
||||||
value of option
|
*kak_reg_<r>*::
|
||||||
.IR <name>
|
value of register *r*
|
||||||
.TP
|
*kak_socket*::
|
||||||
.BR kak_reg_<r>
|
filename of session socket ('/tmp/kak-<session>')
|
||||||
value of register
|
*kak_session*::
|
||||||
.IR <r>
|
|
||||||
.TP
|
|
||||||
.BR kak_socket
|
|
||||||
filename of session socket (/tmp/kak-<session>)
|
|
||||||
.TP
|
|
||||||
.BR kak_session
|
|
||||||
name of the current session
|
name of the current session
|
||||||
.TP
|
*kak_client*::
|
||||||
.BR kak_client
|
|
||||||
name of current client
|
name of current client
|
||||||
.TP
|
*kak_cursor_line*::
|
||||||
.BR kak_cursor_line
|
|
||||||
line of the end of the main selection
|
line of the end of the main selection
|
||||||
.TP
|
*kak_cursor_column*::
|
||||||
.BR kak_cursor_column
|
|
||||||
column of the end of the main selection (in byte)
|
column of the end of the main selection (in byte)
|
||||||
.TP
|
*kak_cursor_char_column*::
|
||||||
.BR kak_cursor_char_column
|
|
||||||
column of the end of the main selection (in character)
|
column of the end of the main selection (in character)
|
||||||
.TP
|
*kak_window_width*::
|
||||||
.BR kak_window_width
|
|
||||||
width of the current kakoune window
|
width of the current kakoune window
|
||||||
.TP
|
*kak_window_height*::
|
||||||
.BR kak_window_height
|
|
||||||
height of the current kakoune window
|
height of the current kakoune window
|
||||||
.TP
|
*kak_hook_param*::
|
||||||
.BR kak_hook_param
|
|
||||||
filtering text passed to the currently executing hook
|
filtering text passed to the currently executing hook
|
||||||
.TP
|
*kak_client_env_<name>*::
|
||||||
.BR 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
|
|
||||||
.IR <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
|
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
|
||||||
|
|
||||||
.SS Markup strings
|
Markup strings
|
||||||
|
--------------
|
||||||
In certain contexts, Kakoune can take a markup string, which is a string containing formatting informations.
|
In certain contexts, Kakoune can take a markup string, which is a string containing formatting informations.
|
||||||
In these strings, the {facename} syntax will enable the face facename until another face gets activated, or the end of the string is reached.
|
In these strings, the {facename} syntax will enable the face facename until another face gets activated, or the
|
||||||
Literal '{' characters shall be written '\\{', and a literal backslash ('\\') that preceeds a '{' character shall be escaped as well ('\\\\')
|
end of the string is reached.
|
||||||
|
Literal '{' characters shall be written '\{', and a literal backslash ('\') that preceeds a '{' character shall
|
||||||
|
be escaped as well ('\\').
|
||||||
|
|
|
@ -1,100 +1,93 @@
|
||||||
.TH KAKOUNE 1 "" "" "FACES"
|
KAKOUNE(1)
|
||||||
|
==========
|
||||||
|
|
||||||
.SS Declaration
|
NAME
|
||||||
.TP
|
----
|
||||||
A "face" refers how the specified text is displayed, it has a foreground color, a background color, and some attributes. The value of a face has the following format:
|
faces - a
|
||||||
.IR fg_color[,bg_color][+attributes]
|
|
||||||
|
|
||||||
.TP
|
Declaration
|
||||||
.BR fg_color ", " bg_color
|
-----------
|
||||||
|
A 'face' refers how the specified text is displayed, it has a foreground color, a background color, and some
|
||||||
|
attributes. The value of a face has the following format:
|
||||||
|
|
||||||
|
--------------------------------
|
||||||
|
fg_color[,bg_color][+attributes]
|
||||||
|
--------------------------------
|
||||||
|
|
||||||
|
'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:
|
||||||
.RS 7
|
*black*, *red*, *green*, *yellow*, *blue*, *magenta*, *cyan*, *white*:::
|
||||||
.TP
|
|
||||||
.BR black ", " red ", " green ", " yellow ", " blue ", " magenta ", " cyan ", " white
|
|
||||||
a named color
|
a named color
|
||||||
.TP
|
*default*:::
|
||||||
.BR default
|
|
||||||
keep the existing color
|
keep the existing color
|
||||||
.TP
|
*rgb:RRGGBB*:::
|
||||||
.BR rgb:RRGGBB
|
|
||||||
hexadecimal value
|
hexadecimal value
|
||||||
.RE
|
|
||||||
.TP
|
|
||||||
.BR attributes
|
|
||||||
string whose individual letters set an attribute:
|
|
||||||
.RS 7
|
|
||||||
.TP
|
|
||||||
.BR u
|
|
||||||
underline
|
|
||||||
.TP
|
|
||||||
.BR r
|
|
||||||
reverse
|
|
||||||
.TP
|
|
||||||
.BR b
|
|
||||||
bold
|
|
||||||
.TP
|
|
||||||
.BR B
|
|
||||||
blink
|
|
||||||
.TP
|
|
||||||
.BR d
|
|
||||||
dim
|
|
||||||
.TP
|
|
||||||
.BR i
|
|
||||||
italic
|
|
||||||
.TP
|
|
||||||
.BR e
|
|
||||||
exclusive, override previous faces instead of merging with them
|
|
||||||
.RE
|
|
||||||
|
|
||||||
.SS Builtin faces
|
'attributes'::
|
||||||
.TP
|
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
|
||||||
|
-------------
|
||||||
The following default faces are used by color schemes to highlight certains areas of the user interface:
|
The following default faces are used by color schemes to highlight certains areas of the user interface:
|
||||||
|
|
||||||
.TP
|
*Default*::
|
||||||
.BR Default
|
|
||||||
default colors
|
default colors
|
||||||
.TP
|
|
||||||
.BR PrimarySelection
|
*PrimarySelection*::
|
||||||
main selection face for every selected character except the cursor
|
main selection face for every selected character except the cursor
|
||||||
.TP
|
|
||||||
.BR SecondarySelection
|
*SecondarySelection*::
|
||||||
secondary selection face for every selected character except the cursor
|
secondary selection face for every selected character except the cursor
|
||||||
.TP
|
|
||||||
.BR PrimaryCursor
|
*PrimaryCursor*::
|
||||||
cursor of the primary selection
|
cursor of the primary selection
|
||||||
.TP
|
|
||||||
.BR SecondaryCursor
|
*SecondaryCursor*::
|
||||||
cursor of the secondary selection
|
cursor of the secondary selection
|
||||||
.TP
|
|
||||||
.BR LineNumbers
|
*LineNumbers*::
|
||||||
face used by the number_lines highlighter
|
face used by the number_lines highlighter
|
||||||
.TP
|
|
||||||
.BR LineNumberAbsolute
|
*LineNumberAbsolute*::
|
||||||
face used to highlight the line number of the main selection
|
face used to highlight the line number of the main selection
|
||||||
.TP
|
|
||||||
.BR MenuForeground
|
*MenuForeground*::
|
||||||
face for the selected element in menus
|
face for the selected element in menus
|
||||||
.TP
|
|
||||||
.BR MenuBackground
|
*MenuBackground*::
|
||||||
face for the not selected elements in menus
|
face for the not selected elements in menus
|
||||||
.TP
|
|
||||||
.BR Information
|
*Information*::
|
||||||
face for the informations windows and information messages
|
face for the informations windows and information messages
|
||||||
.TP
|
|
||||||
.BR Error
|
*Error*::
|
||||||
face of error messages
|
face of error messages
|
||||||
.TP
|
|
||||||
.BR StatusLine
|
*StatusLine*::
|
||||||
face used for the status line
|
face used for the status line
|
||||||
.TP
|
|
||||||
.BR StatusCursor
|
*StatusCursor*::
|
||||||
face used for the status line cursor
|
face used for the status line cursor
|
||||||
.TP
|
|
||||||
.BR Prompt
|
*Prompt*::
|
||||||
face used prompt displayed on the status line
|
face used prompt displayed on the status line
|
||||||
.TP
|
|
||||||
.BR MatchingChar
|
*MatchingChar*::
|
||||||
face used by the show_matching highlighter
|
face used by the show_matching highlighter
|
||||||
.TP
|
|
||||||
.BR Search
|
*Search*::
|
||||||
face used to highlight search results
|
face used to highlight search results
|
||||||
|
|
|
@ -1,195 +1,173 @@
|
||||||
.TH KAKOUNE 1 "" "" "HIGHLIGHTERS"
|
KAKOUNE(1)
|
||||||
|
==========
|
||||||
|
|
||||||
.TP
|
NAME
|
||||||
Manipulation of the displayed text is done through highlighters, which can be added or removed with the following commands:
|
----
|
||||||
|
highlighters - a
|
||||||
|
|
||||||
.RS 3
|
Description
|
||||||
.TP
|
-----------
|
||||||
.BR addhl " <highlighter_name> <highlighter_parameters> …"
|
|
||||||
.RE
|
Manipulation of the displayed text is done through highlighters, which can be added or removed with the following
|
||||||
|
commands:
|
||||||
|
|
||||||
|
-------------------------------------------------------
|
||||||
|
addhl <highlighter_name> <highlighter_parameters> ...
|
||||||
|
-------------------------------------------------------
|
||||||
|
|
||||||
and
|
and
|
||||||
|
|
||||||
.RS 3
|
-----------------------
|
||||||
.TP
|
*rmhl* <highlighter_id>
|
||||||
.BR rmhl " <highlighter_id>"
|
-----------------------
|
||||||
.RE
|
|
||||||
|
|
||||||
.IR highlighter_id
|
*highlighter_id* is a name generated by the highlighter specified with *highlighter_name*, possibly dependent on
|
||||||
is a name generated by the highlighter specified with
|
the parameters. Use command completion in a prompt on the *rmhl* command to see the existing highlighters ids.
|
||||||
.IR highlighter_name ","
|
|
||||||
possibly dependent on the parameters. Use command completion in a prompt on the
|
|
||||||
.IR rmhl
|
|
||||||
command to see the existing highlighters ids.
|
|
||||||
|
|
||||||
.SH General highlighters
|
General highlighters
|
||||||
.TP
|
--------------------
|
||||||
.BR regex " <ex> <capture_id>:<face> …"
|
*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:
|
||||||
.IR addhl 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
|
|
||||||
.TP
|
|
||||||
.BR dynregex
|
|
||||||
Similar to regex, but expand (like a command paramater would) the given expression before building a regex from the result
|
|
||||||
.TP
|
|
||||||
.BR flag_lines " <flag> <option_name>"
|
|
||||||
add a column in front of text, and display the given flag in it for everly line contained in the int-list option named <option_name>
|
|
||||||
.TP
|
|
||||||
.BR show_matching
|
|
||||||
highlight matching char of the character under the selections cursor using MatchingChar face
|
|
||||||
.TP
|
|
||||||
.BR number_lines " <-relative> <-hlcursor> <-separator <separator text> >"
|
|
||||||
show line numbers, with the following options:
|
|
||||||
.RS 7
|
|
||||||
.TP
|
|
||||||
.BR -relative
|
|
||||||
show line numbers relative to the main cursor line
|
|
||||||
.TP
|
|
||||||
.BR -hlcursor
|
|
||||||
highlight the cursor line with a separate face
|
|
||||||
.TP
|
|
||||||
.BR -separator
|
|
||||||
specify a string to separate the line numbers column with the rest of the buffer (default is
|
|
||||||
.IR | ")"
|
|
||||||
.RE
|
|
||||||
.TP
|
|
||||||
.BR fill " <face>"
|
|
||||||
fill using the given
|
|
||||||
.IR face ","
|
|
||||||
mostly useful with regions highlighters
|
|
||||||
|
|
||||||
.SH Highlighting Groups
|
addhl regex //(\hTODO:)?[^\n] 0:cyan 1:yellow,red
|
||||||
|
|
||||||
|
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 paramater would) the given expression before building a regex from the result
|
||||||
|
|
||||||
|
*flag_lines* <flag> <option_name>::
|
||||||
|
add a column in front of text, and display the given flag in it for everly line contained in the int-list option named <option_name>
|
||||||
|
|
||||||
|
*show_matching*::
|
||||||
|
highlight matching char of the character under the selections cursor using MatchingChar face
|
||||||
|
|
||||||
|
*number_lines* [options]::
|
||||||
|
show line numbers, with the following *options*:
|
||||||
|
|
||||||
|
*-relative*:::
|
||||||
|
show line numbers relative to the main cursor line
|
||||||
|
|
||||||
|
*-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 '|')
|
||||||
|
|
||||||
|
*fill* <face>::
|
||||||
|
fill using the given *face*, mostly useful with regions highlighters
|
||||||
|
|
||||||
|
Highlighting Groups
|
||||||
|
-------------------
|
||||||
|
|
||||||
The group highlighter is a container for other highlighters. You can add a group to the current window using
|
The group highlighter is a container for other highlighters. You can add a group to the current window using
|
||||||
|
|
||||||
.RS 3
|
--------------------
|
||||||
.TP
|
addhl group <name>
|
||||||
.BR addhl " group <name>"
|
--------------------
|
||||||
.RE
|
|
||||||
|
|
||||||
The
|
The *-group* switch of the *addhl* command provides a mean to add highlighters inside this group:
|
||||||
.IR -group
|
|
||||||
switch of the
|
|
||||||
.IR addhl
|
|
||||||
command provides a mean to add highlighters inside this group:
|
|
||||||
|
|
||||||
.RS 3
|
----------------------------------------
|
||||||
.TP
|
addhl -group <name> <type> <params>...
|
||||||
.BR addhl " -group <name> <type> <params>..."
|
----------------------------------------
|
||||||
.RE
|
|
||||||
|
|
||||||
Groups can contain other groups, the
|
Groups can contain other groups, the *-group* switch can be used to define a path as follows:
|
||||||
.IR -group
|
|
||||||
switch can be used to define a path as follows:
|
|
||||||
|
|
||||||
.RS 3
|
--------------------------------------------------
|
||||||
.TP
|
addhl -group <name> group <subname>
|
||||||
.BR addhl " -group <name> group <subname>"
|
addhl -group <name>/<subname> <type> <params>...
|
||||||
.TP
|
--------------------------------------------------
|
||||||
.BR addhl " -group <name>/<subname> <type> <params>…"
|
|
||||||
.RE
|
|
||||||
|
|
||||||
.SH Regions highlighters
|
Regions highlighters
|
||||||
|
--------------------
|
||||||
|
|
||||||
A special highlighter provides a way to segment the buffer into regions, which are to be highlighted differently.
|
A special highlighter provides a way to segment the buffer into regions, which are to be highlighted differently.
|
||||||
|
|
||||||
A region is defined by 4 parameters:
|
*name*::
|
||||||
.TP
|
|
||||||
.BR name
|
|
||||||
user defined, used to identify the region
|
user defined, used to identify the region
|
||||||
.TP
|
*opening*::
|
||||||
.BR opening
|
|
||||||
regex that defines the region start text
|
regex that defines the region start text
|
||||||
.TP
|
*closing*::
|
||||||
.BR closing
|
|
||||||
regex that defines the region end text
|
regex that defines the region end text
|
||||||
.TP
|
*recurse*::
|
||||||
.BR 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
|
||||||
.RE
|
|
||||||
|
|
||||||
The
|
The *recurse* option is useful for regions that can be nested, for example the following contruct:
|
||||||
.IR recurse
|
|
||||||
option is useful for regions that can be nested, for example the
|
----------
|
||||||
.IR %sh{\ …\ }
|
%sh{ ... }
|
||||||
construct in kakoune accept nested
|
----------
|
||||||
.IR {\ …\ } " so " %sh{\ …\ {\ …\ }\ …\ }
|
|
||||||
is valid. This region can be defined with:
|
accepts nested braces scopes ('{ ... }') so the following string is valid:
|
||||||
.IR shell_expand\ %sh\\{\ \\}\ \\{
|
|
||||||
|
----------------------
|
||||||
|
%sh{ ... { ... } ... }
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
This region can be defined with:
|
||||||
|
|
||||||
|
------------------------
|
||||||
|
shell_expand %sh\{ \} \{
|
||||||
|
------------------------
|
||||||
|
|
||||||
Regions are used in the regions highlighter which can take any number of regions.
|
Regions are used in the regions highlighter which can take any number of regions.
|
||||||
|
|
||||||
The command:
|
The following command:
|
||||||
.RS 3
|
|
||||||
.TP
|
-----------------------------------------------------------------------
|
||||||
.BR addhl " regions <name> <region_name1> <opening1> <closing1> <recurse1>"
|
addhl regions <name> <region_name1> <opening1> <closing1> <recurse1>
|
||||||
<region_name2> <opening2> <closing2> <recurse2>…
|
<region_name2> <opening2> <closing2> <recurse2>...
|
||||||
.RE
|
-----------------------------------------------------------------------
|
||||||
|
|
||||||
defines multiple regions in which other highlighters can be added as follows:
|
defines multiple regions in which other highlighters can be added as follows:
|
||||||
|
|
||||||
.RS 3
|
---------------------------------------
|
||||||
.TP
|
addhl -group <name>/<region_name> ...
|
||||||
.BR addhl " -group <name>/<region_name> …"
|
---------------------------------------
|
||||||
.RE
|
|
||||||
|
|
||||||
Regions are matched using the left-most rule: the left-most region opening starts a new region. When a region closes, the closest next opening start another region.
|
Regions are matched using the left-most rule: the left-most region opening starts a new region. When a region closes, the closest next opening start another region.
|
||||||
|
|
||||||
That matches the rule governing most programming language parsing.
|
That matches the rule governing most programming language parsing.
|
||||||
|
|
||||||
Regions also supports a
|
Regions also supports a *-default <default_region>* switch to define the default region, when no other region matches the current buffer range.
|
||||||
.IR -default
|
|
||||||
switch to define the default region, when no other region matches the current buffer range:
|
|
||||||
.RS 3
|
|
||||||
.TP
|
|
||||||
.BR -default " <default_region>"
|
|
||||||
.RE
|
|
||||||
|
|
||||||
Most programming languages can then be properly highlighted using a regions highlighter as root:
|
Most programming languages can then be properly highlighted using a regions highlighter as root:
|
||||||
|
|
||||||
.RS 3
|
-----------------------------------------------------------------
|
||||||
.TP
|
addhl regions -default code <lang> \
|
||||||
.BR addhl " 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>
|
||||||
|
|
||||||
.TP
|
addhl -group <lang>/code ...
|
||||||
.BR addhl " -group <lang>/code …"
|
addhl -group <lang>/string ...
|
||||||
.TP
|
addhl -group <lang>/comment ...
|
||||||
.BR addhl " -group <lang>/string …"
|
-----------------------------------------------------------------
|
||||||
.TP
|
|
||||||
.BR addhl " -group <lang>/comment …"
|
|
||||||
.RE
|
|
||||||
|
|
||||||
.SH Shared Highlighters
|
Shared Highlighters
|
||||||
|
-------------------
|
||||||
|
|
||||||
Highlighters are often defined for a specific filetype, and it makes then sense to share the highlighters between all the windows on the same filetypes.
|
Highlighters are often defined for a specific filetype, and it makes then sense to share the highlighters between all the windows on the same filetypes.
|
||||||
|
|
||||||
A shared highlighter can be defined with the following command:
|
A shared highlighter can be defined with the following command:
|
||||||
|
|
||||||
.RS 3
|
--------------------------------
|
||||||
.TP
|
addhl -group /<group_name> ...
|
||||||
.BR addhl " -group /<group_name> …"
|
--------------------------------
|
||||||
.RE
|
|
||||||
|
|
||||||
When the group switch values starts with a
|
When the group switch values starts with a '/', it references a group in the shared highlighters, rather than the window highlighters.
|
||||||
.IR / ","
|
|
||||||
it references a group in the shared highlighters, rather than the window highlighters.
|
|
||||||
|
|
||||||
The common case would be to create a named shared group, and then fill it with highlighters:
|
The common case would be to create a named shared group, and then fill it with highlighters:
|
||||||
|
|
||||||
.RS 3
|
------------------------------
|
||||||
.TP
|
addhl -group / group <name>
|
||||||
.BR addhl " -group / group <name>"
|
addhl -group /name regex ...
|
||||||
.TP
|
------------------------------
|
||||||
.BR addhl " -group /name regex …"
|
|
||||||
.RE
|
|
||||||
|
|
||||||
It can then be referenced in a window using the ref highlighter.
|
It can then be referenced in a window using the ref highlighter.
|
||||||
|
|
||||||
.RS 3
|
------------------
|
||||||
.TP
|
addhl ref <name>
|
||||||
.BR addhl " ref <name>"
|
------------------
|
||||||
.RE
|
|
||||||
|
|
||||||
The ref can reference any named highlighter in the shared namespace.
|
The ref can reference any named highlighter in the shared namespace.
|
||||||
|
|
|
@ -1,127 +1,123 @@
|
||||||
.TH KAKOUNE 1 "" "" "HOOKS"
|
KAKOUNE(1)
|
||||||
|
==========
|
||||||
|
|
||||||
|
NAME
|
||||||
|
----
|
||||||
|
hooks - a
|
||||||
|
|
||||||
|
Description
|
||||||
|
-----------
|
||||||
|
|
||||||
.TP
|
|
||||||
Commands can be registred to be executed when certain events arise. To register a hook use the following command:
|
Commands can be registred to be executed when certain events arise. To register a hook use the following command:
|
||||||
|
|
||||||
.RS 3
|
----------------------------------------------------------------------
|
||||||
.TP
|
hook [-group <group>] <scope> <hook_name> <filtering_regex> <commands>
|
||||||
.BR hook " [-group <group>] <scope> <hook_name> <filtering_regex> <commands>"
|
----------------------------------------------------------------------
|
||||||
.RE
|
|
||||||
|
|
||||||
.IR <scope>
|
*scope* can be one of *global*, *buffer* or *window*.
|
||||||
can be one of
|
|
||||||
.IR global ", " buffer " or " window
|
|
||||||
|
|
||||||
.IR <command>
|
*command* is a string containing the commands to execute when the hook is called.
|
||||||
is a string containing the commands to execute when the hook is called
|
|
||||||
|
|
||||||
For example to automatically use line numbering with .cc files, use the following command:
|
For example to automatically use line numbering with .cc files, use the following command:
|
||||||
|
|
||||||
.RS 3
|
----------------------------------------------------
|
||||||
.TP
|
hook global WinCreate .*\.cc %{ addhl number_lines }
|
||||||
.BR hook " global WinCreate .*\.cc %{ addhl number_lines }"
|
----------------------------------------------------
|
||||||
.RE
|
|
||||||
|
|
||||||
if
|
if *group* is given, make this hook part of the named group. Groups are used for removing hooks with the following
|
||||||
.IR <group>
|
command:
|
||||||
is given, make this hook part of the named group. Groups are used for removing hooks with the following command:
|
|
||||||
|
|
||||||
.RS 3
|
-----------------------
|
||||||
.TP
|
rmhooks <scope> <group>
|
||||||
.BR rmhooks " <scope> <group>"
|
-----------------------
|
||||||
.RE
|
|
||||||
|
|
||||||
A call to the command above will remove every hooks in
|
A call to the command above will remove every hooks in *scope* that are part of the given *group*.
|
||||||
.IR <scope>
|
|
||||||
that are part of the given group.
|
|
||||||
|
|
||||||
.SS Default hooks
|
Default hooks
|
||||||
.TP
|
-------------
|
||||||
.BR 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
|
||||||
.TP
|
|
||||||
.BR NormalBegin
|
*NormalBegin*::
|
||||||
entering normal mode
|
entering normal mode
|
||||||
.TP
|
|
||||||
.BR NormalEnd
|
*NormalEnd*::
|
||||||
leaving normal mode
|
leaving normal mode
|
||||||
.TP
|
|
||||||
.BR 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
|
||||||
.TP
|
|
||||||
.BR 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
|
||||||
.TP
|
|
||||||
.BR InsertBegin
|
*InsertBegin*::
|
||||||
entering insert mode
|
entering insert mode
|
||||||
.TP
|
|
||||||
.BR InsertEnd
|
*InsertEnd*::
|
||||||
leaving insert mode
|
leaving insert mode
|
||||||
.TP
|
|
||||||
.BR 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
|
||||||
.TP
|
|
||||||
.BR InsertMove
|
*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
|
||||||
.TP
|
|
||||||
.BR WinCreate
|
*WinCreate*::
|
||||||
a window was created, the filtering text is the buffer name
|
a window was created, the filtering text is the buffer name
|
||||||
.TP
|
|
||||||
.BR WinClose
|
*WinClose*::
|
||||||
a window was detroyed, the filtering text is the buffer name
|
a window was detroyed, the filtering text is the buffer name
|
||||||
.TP
|
|
||||||
.BR 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
|
||||||
.TP
|
|
||||||
.BR 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>*
|
||||||
.IR <option_name>=<new_value>
|
|
||||||
.TP
|
*BufSetOption*::
|
||||||
.BR 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
|
|
||||||
.IR <option_name>=<new_value>
|
*BufNew*::
|
||||||
.TP
|
|
||||||
.BR BufNew
|
|
||||||
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
|
||||||
.TP
|
|
||||||
.BR BufOpen
|
*BufOpen*::
|
||||||
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
|
||||||
.TP
|
|
||||||
.BR BufCreate
|
*BufCreate*::
|
||||||
a buffer has been created, filename is used for filtering
|
a buffer has been created, filename is used for filtering
|
||||||
.TP
|
|
||||||
.BR BufWritePre
|
*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
|
||||||
.TP
|
|
||||||
.BR 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
|
||||||
.TP
|
|
||||||
.BR BufClose
|
*BufClose*::
|
||||||
executed when a buffer is deleted, while it is still valid
|
executed when a buffer is deleted, while it is still valid
|
||||||
.TP
|
|
||||||
.BR BufOpenFifo
|
*BufOpenFifo*::
|
||||||
executed when a buffer opens a fifo
|
executed when a buffer opens a fifo
|
||||||
.TP
|
|
||||||
.BR BufReadFifo
|
*BufReadFifo*::
|
||||||
executed after some data has been red from a fifo and inserted in the buffer
|
executed after some data has been red from a fifo and inserted in the buffer
|
||||||
.TP
|
|
||||||
.BR BufCloseFifo
|
*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,
|
||||||
.TP
|
or because the writing end has been closed
|
||||||
.BR RuntimeError
|
|
||||||
|
*RuntimeError*::
|
||||||
an error was encountered while executing an user command the error message is used for filtering
|
an error was encountered while executing an user command the error message is used for filtering
|
||||||
.TP
|
|
||||||
.BR KakBegin
|
*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
|
||||||
.TP
|
|
||||||
.BR KakEnd
|
*KakEnd*::
|
||||||
kakoune is quitting
|
kakoune is quitting
|
||||||
.TP
|
|
||||||
.BR FocusIn
|
*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
|
||||||
.TP
|
|
||||||
.BR FocusOut
|
*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
|
||||||
.RE
|
|
||||||
|
|
||||||
When not specified, the filtering text is an empty string.
|
When not specified, the filtering text is an empty string.
|
||||||
|
|
|
@ -1,181 +1,135 @@
|
||||||
.TH KAKOUNE 1 "" "" "OPTIONS"
|
KAKOUNE(1)
|
||||||
|
==========
|
||||||
|
|
||||||
.SS Types
|
NAME
|
||||||
.TP
|
----
|
||||||
.BR int
|
options - a
|
||||||
|
|
||||||
|
Types
|
||||||
|
-----
|
||||||
|
*int*::
|
||||||
an integer number
|
an integer number
|
||||||
.TP
|
*bool*::
|
||||||
.BR bool
|
|
||||||
a boolean value, yes/true or no/false
|
a boolean value, yes/true or no/false
|
||||||
.TP
|
*str*::
|
||||||
.BR str
|
|
||||||
a string, some freeform text
|
a string, some freeform text
|
||||||
.TP
|
*coord*::
|
||||||
.BR coord
|
|
||||||
a line, column pair (separated by comma)
|
a line, column pair (separated by comma)
|
||||||
.TP
|
*regex*::
|
||||||
.BR regex
|
|
||||||
as a string but the set commands will complain if the entered text is not a valid regex
|
as a string but the set commands will complain if the entered text is not a valid regex
|
||||||
.TP
|
*int-list*, *str-list*::
|
||||||
.BR int-list,\ str-list
|
a list, elements are separated by a colon (:) if an element needs to contain a colon, it can be escaped
|
||||||
a list, elements are separated by a colon (:) if an element needs to contain a colon, it can be escaped with a backslash
|
with a backslash
|
||||||
.TP
|
*enum(value1|value2|...)*::
|
||||||
.BR enum(value1|value2|…)
|
|
||||||
an enum, taking one of the given values
|
an enum, taking one of the given values
|
||||||
.TP
|
*flags(value1|value2|...)*::
|
||||||
.BR flags(value1|value2|…)
|
|
||||||
a set of flags, taking a combination of the given values joined by a '|' character
|
a set of flags, taking a combination of the given values joined by a '|' character
|
||||||
|
|
||||||
.SS Scopes
|
Scopes
|
||||||
.TP
|
------
|
||||||
.BR window
|
*window*::
|
||||||
context linked to the window displaying a buffer
|
context linked to the window displaying a buffer
|
||||||
.TP
|
*buffer*::
|
||||||
.BR buffer
|
|
||||||
context linked directly to the buffer
|
context linked directly to the buffer
|
||||||
.TP
|
*global*::
|
||||||
.BR global
|
|
||||||
global context linked to the instance of Kakoune
|
global context linked to the instance of Kakoune
|
||||||
.RE
|
|
||||||
|
|
||||||
Options can have individual values that change from one scope to the other, which will be considered one after another in the following order:
|
Options can have individual values that change from one scope to the other, which will be considered one after
|
||||||
.IR window " → "
|
another in the following order: *window* → *buffer* → *global*.
|
||||||
.IR buffer " → "
|
That means that two windows on the same buffer can use different options (e.g. different *filetype*).
|
||||||
.IR global "."
|
|
||||||
That means that two windows on the same buffer can use different options (e.g. different
|
|
||||||
.IR filetype ")."
|
|
||||||
However some options might end up being ignored if their scope is not in the command context.
|
However some options might end up being ignored if their scope is not in the command context.
|
||||||
For example, writing a file never uses the
|
For example, writing a file never uses the *window* scope when considering options, so any option related to
|
||||||
.IR window
|
writing won't be taken into account if set in the *window* scope (e.g. *BOM*, *eolformat*).
|
||||||
scope when considering options, so any option related to writing won't be taken into account if set in the
|
|
||||||
.IR window
|
|
||||||
scope (e.g.
|
|
||||||
.IR BOM ", "
|
|
||||||
.IR eolformat ")."
|
|
||||||
|
|
||||||
.SS Builtin options
|
Builtin options
|
||||||
.TP
|
---------------
|
||||||
.BR tabstop
|
|
||||||
.IR int
|
*tabstop* 'int'::
|
||||||
width of a tab character
|
width of a tab character
|
||||||
.TP
|
|
||||||
.BR indentwidth
|
|
||||||
.IR int
|
|
||||||
width (in spaces) used for indentation, 0 means a tab character
|
|
||||||
.TP
|
|
||||||
.BR scrolloff
|
|
||||||
.IR coord
|
|
||||||
number of lines, columns to keep visible around the cursor when scrolling
|
|
||||||
.TP
|
|
||||||
.BR eolformat
|
|
||||||
.IR enum(lf|crlf)
|
|
||||||
the format of end of lines when writing a buffer, this is autodetected on load
|
|
||||||
.TP
|
|
||||||
.BR BOM
|
|
||||||
.IR enum(none|utf8)
|
|
||||||
define if the file should be written with an unicode byte order mark
|
|
||||||
.TP
|
|
||||||
.BR complete_prefix
|
|
||||||
.IR bool
|
|
||||||
when completing in command line, and multiple candidates exist, enable completion with common prefix
|
|
||||||
.TP
|
|
||||||
.BR incsearch
|
|
||||||
.IR bool
|
|
||||||
execute search as it is typed
|
|
||||||
.TP
|
|
||||||
.BR aligntab
|
|
||||||
.IR bool
|
|
||||||
use tabs for alignement command
|
|
||||||
.TP
|
|
||||||
.BR autoinfo
|
|
||||||
.IR flags(command|onkey|normal)
|
|
||||||
display automatic information box in the enabled contexts
|
|
||||||
.TP
|
|
||||||
.BR autoshowcompl
|
|
||||||
.IR bool
|
|
||||||
automatically display possible completions when editing a prompt
|
|
||||||
.TP
|
|
||||||
.BR ignored_files
|
|
||||||
.IR regex
|
|
||||||
filenames matching this regex wont be considered as candidates on filename completion (except if the text being completed already matches it)
|
|
||||||
.TP
|
|
||||||
.BR disabled_hooks
|
|
||||||
.IR regex
|
|
||||||
hooks whose group matches this regex wont be executed. For example indentation hooks can be disabled with '.*-indent'
|
|
||||||
.TP
|
|
||||||
.BR filetype
|
|
||||||
.IR str
|
|
||||||
arbitrary string defining the type of the file filetype dependant actions should hook on this option changing for activation/deactivation
|
|
||||||
.TP
|
|
||||||
.BR path
|
|
||||||
.IR str-list
|
|
||||||
directories to search for gf command
|
|
||||||
.TP
|
|
||||||
.BR completers
|
|
||||||
.IR str-list
|
|
||||||
completion engines to use for insert mode completion (they are tried in order until one generates candidates). Existing completers are:
|
|
||||||
.TP
|
|
||||||
.BR word=all,\ word=buffer
|
|
||||||
which complete using words in all buffers (
|
|
||||||
.IR word=all " )"
|
|
||||||
or only the current one (
|
|
||||||
.IR word=buffer " )"
|
|
||||||
.TP
|
|
||||||
.BR filename
|
|
||||||
which tries to detect when a filename is being entered and provides completion based on local filesystem
|
|
||||||
.TP
|
|
||||||
.BR option=<opt-name>
|
|
||||||
where
|
|
||||||
.IR <opt-name>
|
|
||||||
is a
|
|
||||||
.IR str-list
|
|
||||||
option. The first element of the list should follow the format:
|
|
||||||
.IR <line>.<column>[+<length>]@<timestamp>
|
|
||||||
to define where the completion apply in the buffer, and the other strings are the candidates
|
|
||||||
.TP
|
|
||||||
.BR static_words
|
|
||||||
.IR str-list
|
|
||||||
list of words that are always added to completion candidates when completing words in insert mode
|
|
||||||
.TP
|
|
||||||
.BR autoreload
|
|
||||||
.IR enum(yes|no|ask)
|
|
||||||
auto reload the buffers when an external modification is detected
|
|
||||||
.TP
|
|
||||||
.BR debug
|
|
||||||
.IR flags(hooks|shell|profile)
|
|
||||||
dump various debug information in the `*debug*` buffer
|
|
||||||
.TP
|
|
||||||
.BR modelinefmt
|
|
||||||
.IR string
|
|
||||||
A format string used to generate the mode line, that string is first expanded as a command line would be (expanding
|
|
||||||
.IR %...{...}
|
|
||||||
strings), then markup tags are applied (c.f. Expansions documentation page)
|
|
||||||
.TP
|
|
||||||
.BR ui_options
|
|
||||||
colon separated list of key=value pairs that are forwarded to the user interface implementation. The NCurses UI support the following options:
|
|
||||||
|
|
||||||
.RS 7
|
*indentwidth* 'int'::
|
||||||
.BR ncurses_set_title
|
width (in spaces) used for indentation, 0 means a tab character
|
||||||
if
|
|
||||||
.IR yes
|
*scrolloff* 'coord'::
|
||||||
or
|
number of lines, columns to keep visible around the cursor when scrolling
|
||||||
.IR true ","
|
|
||||||
the terminal emulator title will be changed
|
*eolformat* 'enum(lf|crlf)'::
|
||||||
.TP
|
the format of end of lines when writing a buffer, this is autodetected on load
|
||||||
.BR ncurses_status_on_top
|
|
||||||
if
|
*BOM* 'enum(none|utf8)'::
|
||||||
.IR yes ","
|
define if the file should be written with an unicode byte order mark
|
||||||
or
|
|
||||||
.IR true
|
*complete_prefix* 'bool'::
|
||||||
the status line will be placed at the top of the terminal rather than at the bottom
|
when completing in command line, and multiple candidates exist, enable completion with common prefix
|
||||||
.TP
|
|
||||||
.BR ncurses_assistant
|
*incsearch* 'bool'::
|
||||||
specify the nice assistant you get in info boxes, can be
|
execute search as it is typed
|
||||||
.IR clippy
|
|
||||||
(the default),
|
*aligntab* 'bool'::
|
||||||
.IR cat
|
use tabs for alignement command
|
||||||
or
|
|
||||||
.IR none
|
*autoinfo* 'flags(command|onkey|normal)'::
|
||||||
.TP
|
display automatic information box in the enabled contexts
|
||||||
.BR ncurses_wheel_down_button,\ ncurses_wheel_up_button
|
|
||||||
|
*autoshowcompl* 'bool'::
|
||||||
|
automatically display possible completions when editing a prompt
|
||||||
|
|
||||||
|
*ignored_files* 'regex'::
|
||||||
|
filenames matching this regex wont be considered as candidates on filename completion (except if the text
|
||||||
|
being completed already matches it)
|
||||||
|
|
||||||
|
*disabled_hooks* 'regex'::
|
||||||
|
hooks whose group matches this regex wont be executed. For example indentation hooks can be disabled with '.*-indent'
|
||||||
|
|
||||||
|
*filetype* 'str'::
|
||||||
|
arbitrary string defining the type of the file filetype dependant actions should hook on this option
|
||||||
|
changing for activation/deactivation
|
||||||
|
|
||||||
|
*path* 'str-list'::
|
||||||
|
directories to search for gf command
|
||||||
|
|
||||||
|
*completers* 'str-list'::
|
||||||
|
completion engines to use for insert mode completion (they are tried in order until one generates
|
||||||
|
candidates). Existing completers are:
|
||||||
|
|
||||||
|
*word=all*, *word=buffer*:::
|
||||||
|
which complete using words in all buffers (*word=all*) or only the current one (*word=buffer*)
|
||||||
|
|
||||||
|
*filename*:::
|
||||||
|
which tries to detect when a filename is being entered and provides completion based on local filesystem
|
||||||
|
|
||||||
|
*option=<opt-name>*:::
|
||||||
|
where *opt-name* is a 'str-list' option. The first element of the list should follow the format:
|
||||||
|
|
||||||
|
<line>.<column>[+<length>]@<timestamp>
|
||||||
|
|
||||||
|
to define where the completion apply in the buffer, and the other strings are the candidates
|
||||||
|
|
||||||
|
*static_words* 'str-list':::
|
||||||
|
list of words that are always added to completion candidates when completing words in insert mode
|
||||||
|
|
||||||
|
*autoreload* 'enum(yes|no|ask)'::
|
||||||
|
auto reload the buffers when an external modification is detected
|
||||||
|
|
||||||
|
*debug* 'flags(hooks|shell|profile)'::
|
||||||
|
dump various debug information in the '\*debug*' buffer
|
||||||
|
|
||||||
|
*modelinefmt* 'string'::
|
||||||
|
A format string used to generate the mode line, that string is first expanded as a command line would be
|
||||||
|
(expanding '%...{...}' strings), then markup tags are applied (c.f. the 'Expansions' documentation page)
|
||||||
|
|
||||||
|
*ui_options*::
|
||||||
|
colon separated list of key=value pairs that are forwarded to the user interface implementation. The
|
||||||
|
NCurses UI support the following options:
|
||||||
|
|
||||||
|
*ncurses_set_title*:::
|
||||||
|
if *yes* or *true*, the terminal emulator title will be changed
|
||||||
|
|
||||||
|
*ncurses_status_on_top*:::
|
||||||
|
if *yes*, or *true* the status line will be placed at the top of the terminal rather than at the bottom
|
||||||
|
|
||||||
|
*ncurses_assistant*:::
|
||||||
|
specify the nice assistant you get in info boxes, can be *clippy* (the default), *cat* or *none*
|
||||||
|
|
||||||
|
*ncurses_wheel_down_button*, *ncurses_wheel_up_button*:::
|
||||||
specify which button send for wheel down/up events
|
specify which button send for wheel down/up events
|
||||||
|
|
|
@ -1,56 +1,49 @@
|
||||||
.TH KAKOUNE 1 "" "" "REGISTERS"
|
KAKOUNE(1)
|
||||||
|
==========
|
||||||
|
|
||||||
.SS Registers
|
NAME
|
||||||
.TP
|
----
|
||||||
Registers are named lists of text -instead of simply text- in order to interact well with multiselection. \
|
registers - a
|
||||||
They are used for various purposes, like storing the last yanked test, or the captured groups associated with the selections.
|
|
||||||
|
|
||||||
.SS Interacting
|
Description
|
||||||
.TP
|
-----------
|
||||||
.BR <c-r><c>
|
Registers are named lists of text -instead of simply text- in order to interact well with multiselection.
|
||||||
when in insert mode or in a prompt, insert the value stored in the
|
They are used for various purposes, like storing the last yanked test, or the captured groups associated with
|
||||||
.IR <c>
|
the selections.
|
||||||
register (single character)
|
|
||||||
.TP
|
|
||||||
.BR """<c>
|
|
||||||
in normal mode, select the
|
|
||||||
.IR <c>
|
|
||||||
register (single character)
|
|
||||||
|
|
||||||
.SS Default registers
|
Interacting
|
||||||
.TP
|
-----------
|
||||||
|
*<c-r><c>*::
|
||||||
|
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)
|
||||||
|
|
||||||
|
Default registers
|
||||||
|
-----------------
|
||||||
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:
|
||||||
|
|
||||||
.RS 7
|
*"*::
|
||||||
.TP
|
default yank, used by yanking and pasting commands like *y*, *p* and *R*
|
||||||
.BR """
|
|
||||||
default yank, used by yanking and pasting commands like
|
|
||||||
.IR y ", " p " and " R
|
|
||||||
.TP
|
|
||||||
.BR /
|
|
||||||
default search register, used by regex based commands like
|
|
||||||
.IR s ", " * " or " /
|
|
||||||
.TP
|
|
||||||
.BR @
|
|
||||||
default macro register, used by
|
|
||||||
.IR q " and " Q
|
|
||||||
.TP
|
|
||||||
.BR ^
|
|
||||||
default mark register, used by
|
|
||||||
.IR z " and " Z
|
|
||||||
|
|
||||||
.SS Special registers
|
*/*::
|
||||||
.TP
|
default search register, used by regex based commands like *s*, *\** or */*
|
||||||
|
|
||||||
|
*@*::
|
||||||
|
default macro register, used by *q* and *Q*
|
||||||
|
|
||||||
|
*^*::
|
||||||
|
default mark register, used by *z* and *Z*
|
||||||
|
|
||||||
|
Special registers
|
||||||
|
-----------------
|
||||||
Some registers are not general purposes, they cannot be written to, but they contain some special dat
|
Some registers are not general purposes, they cannot be written to, but they contain some special dat
|
||||||
|
|
||||||
.RS 7
|
*%*::
|
||||||
.TP
|
|
||||||
.BR %
|
|
||||||
current buffer name
|
current buffer name
|
||||||
.TP
|
|
||||||
.BR .
|
*.*::
|
||||||
current selection contents
|
current selection contents
|
||||||
.TP
|
|
||||||
.BR #
|
*#*::
|
||||||
selection indices (first selection has 1, second has 2, …)
|
selection indices (first selection has 1, second has 2, ...)
|
||||||
.RE
|
|
||||||
|
|
|
@ -1,580 +1,578 @@
|
||||||
.TH KAKOUNE 1 "" "" "SHORTCUTS"
|
KAKOUNE(1)
|
||||||
|
==========
|
||||||
|
|
||||||
.SS Insert mode
|
NAME
|
||||||
.TP
|
----
|
||||||
.BR <esc>
|
shortcuts - a
|
||||||
|
|
||||||
|
Insert mode
|
||||||
|
-----------
|
||||||
|
*<esc>*::
|
||||||
leave insert mode
|
leave insert mode
|
||||||
.TP
|
|
||||||
.BR <backspace>
|
*<backspace>*::
|
||||||
delete characters before cursors
|
delete characters before cursors
|
||||||
.TP
|
|
||||||
.BR <del>
|
*<del>*::
|
||||||
delete characters under cursors
|
delete characters under cursors
|
||||||
.TP
|
|
||||||
.BR <left>,\ <right>,\ <up>,\ <down>
|
*<left>*, *<right>*, *<up>*, *<down>*::
|
||||||
move the cursors in given direction
|
move the cursors in given direction
|
||||||
.TP
|
|
||||||
.BR <home>
|
*<home>*::
|
||||||
move cursors to line begin
|
move cursors to line begin
|
||||||
.TP
|
|
||||||
.BR <end>
|
*<end>*::
|
||||||
move cursors to end of line
|
move cursors to end of line
|
||||||
.TP
|
|
||||||
.BR <c-n>
|
*<c-n>*::
|
||||||
select next completion candidate
|
select next completion candidate
|
||||||
.TP
|
|
||||||
.BR <c-p>
|
*<c-p>*::
|
||||||
select previous completion candidate
|
select previous completion candidate
|
||||||
.TP
|
|
||||||
.BR <c-x>
|
*<c-x>*::
|
||||||
explicit insert completion query, followed by:
|
explicit insert completion query, followed by:
|
||||||
.RS 7
|
|
||||||
.TP
|
*f*:::
|
||||||
.BR f
|
|
||||||
explicit file completion
|
explicit file completion
|
||||||
.TP
|
|
||||||
.BR w
|
*w*:::
|
||||||
explicit word completion
|
explicit word completion
|
||||||
.TP
|
|
||||||
.BR l
|
*l*:::
|
||||||
explicit line completion
|
explicit line completion
|
||||||
.RE
|
|
||||||
.TP
|
*<c-o>*::
|
||||||
.BR <c-o>
|
|
||||||
disable automatic completion for this insert session
|
disable automatic completion for this insert session
|
||||||
.TP
|
|
||||||
.BR <c-r>
|
*<c-r>*::
|
||||||
insert contents of the register given by next key
|
insert contents of the register given by next key
|
||||||
.TP
|
|
||||||
.BR <c-v>
|
*<c-v>*::
|
||||||
insert next keystroke directly into the buffer, without interpreting it
|
insert next keystroke directly into the buffer, without interpreting it
|
||||||
.TP
|
|
||||||
.BR <c-u>
|
*<c-u>*::
|
||||||
commit changes up to now as a single undo group
|
commit changes up to now as a single undo group
|
||||||
.TP
|
|
||||||
.BR <a-;>
|
*<a-;>*::
|
||||||
escape to normal mode for a single command
|
escape to normal mode for a single command
|
||||||
|
|
||||||
.SS Movement
|
Movement
|
||||||
"word" is a sequence of alphanumeric characters or underscore, and "WORD" is a sequence of non whitespace characters
|
--------
|
||||||
|
'word' is a sequence of alphanumeric characters or underscore, and 'WORD' is a sequence of non whitespace characters
|
||||||
|
|
||||||
.TP
|
*h*::
|
||||||
.BR h
|
|
||||||
select the character on the left of selection end
|
select the character on the left of selection end
|
||||||
.TP
|
|
||||||
.BR j
|
*j*::
|
||||||
select the character below the selection end
|
select the character below the selection end
|
||||||
.TP
|
|
||||||
.BR k
|
*k*::
|
||||||
select the character above the selection end
|
select the character above the selection end
|
||||||
.TP
|
|
||||||
.BR l
|
*l*::
|
||||||
select the character on the right of selection end
|
select the character on the right of selection end
|
||||||
.TP
|
|
||||||
.BR 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
|
||||||
.TP
|
|
||||||
.BR 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
|
||||||
.TP
|
|
||||||
.BR 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
|
||||||
.TP
|
|
||||||
.BR <a-[wbe]>
|
*<a-[wbe]>*::
|
||||||
same as [wbe] but select WORD instead of word
|
same as [wbe] but select WORD instead of word
|
||||||
.TP
|
|
||||||
.BR f
|
*f*::
|
||||||
select to the next occurence of given character
|
select to the next occurence of given character
|
||||||
.TP
|
|
||||||
.BR t
|
*t*::
|
||||||
select until the next occurence of given character
|
select until the next occurence of given character
|
||||||
.TP
|
|
||||||
.BR <a-[ft]>
|
*<a-[ft]>*::
|
||||||
same as [ft] but in the other direction
|
same as [ft] but in the other direction
|
||||||
.TP
|
|
||||||
.BR m
|
*m*::
|
||||||
select to matching character
|
select to matching character
|
||||||
.TP
|
|
||||||
.BR M
|
*M*::
|
||||||
extend selection to matching character
|
extend selection to matching character
|
||||||
.TP
|
|
||||||
.BR x
|
*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)
|
||||||
.TP
|
|
||||||
.BR <a-x>
|
*<a-x>*::
|
||||||
expand selections to contain full lines (including end-of-lines)
|
expand selections to contain full lines (including end-of-lines)
|
||||||
.TP
|
|
||||||
.BR <a-X>
|
*<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)
|
||||||
.TP
|
|
||||||
.BR %
|
*%*::
|
||||||
select whole buffer
|
select whole buffer
|
||||||
.TP
|
|
||||||
.BR <a-h>
|
*<a-h>*::
|
||||||
select to line begin
|
select to line begin
|
||||||
.TP
|
|
||||||
.BR <a-l>
|
*<a-l>*::
|
||||||
select to line end
|
select to line end
|
||||||
.TP
|
|
||||||
.BR /
|
*/*::
|
||||||
search (select next match)
|
search (select next match)
|
||||||
.TP
|
|
||||||
.BR <a-/>
|
*<a-/>*::
|
||||||
search (select previous match)
|
search (select previous match)
|
||||||
.TP
|
|
||||||
.BR ?
|
*?*::
|
||||||
search (extend to next match)
|
search (extend to next match)
|
||||||
.TP
|
|
||||||
.BR <a-?>
|
*<a-?>*::
|
||||||
search (extend to previous match)
|
search (extend to previous match)
|
||||||
.TP
|
|
||||||
.BR n
|
*n*::
|
||||||
select next match
|
select next match
|
||||||
.TP
|
|
||||||
.BR N
|
*N*::
|
||||||
add a new selection with next match
|
add a new selection with next match
|
||||||
.TP
|
|
||||||
.BR <a-n>
|
*<a-n>*::
|
||||||
select previous match
|
select previous match
|
||||||
.TP
|
|
||||||
.BR <a-N>
|
*<a-N>*::
|
||||||
add a new selection with previous match
|
add a new selection with previous match
|
||||||
.TP
|
|
||||||
.BR pageup
|
*pageup*::
|
||||||
scroll up
|
scroll up
|
||||||
.TP
|
|
||||||
.BR pagedown
|
*pagedown*::
|
||||||
scroll down
|
scroll down
|
||||||
.TP
|
|
||||||
.BR '
|
*'*::
|
||||||
rotate selections (the main selection becomes the next one)
|
rotate selections (the main selection becomes the next one)
|
||||||
.TP
|
|
||||||
.BR ;
|
*;*::
|
||||||
reduce selections to their cursor
|
reduce selections to their cursor
|
||||||
.TP
|
|
||||||
.BR <a-;>
|
*<a-;>*::
|
||||||
flip the selections direction
|
flip the selections direction
|
||||||
.TP
|
|
||||||
.BR <a-:>
|
*<a-:>*::
|
||||||
ensure selections are in forward direction (cursor after anchor)
|
ensure selections are in forward direction (cursor after anchor)
|
||||||
|
|
||||||
.SS Changes
|
Changes
|
||||||
.TP
|
-------
|
||||||
.BR i
|
|
||||||
|
*i*::
|
||||||
enter insert mode before current selection
|
enter insert mode before current selection
|
||||||
.TP
|
|
||||||
.BR a
|
*a*::
|
||||||
enter insert mode after current selection
|
enter insert mode after current selection
|
||||||
.TP
|
|
||||||
.BR d
|
*d*::
|
||||||
yank and delete current selection
|
yank and delete current selection
|
||||||
.TP
|
|
||||||
.BR c
|
*c*::
|
||||||
yank and delete current selection and enter insert mode
|
yank and delete current selection and enter insert mode
|
||||||
.TP
|
|
||||||
.BR .
|
*.*::
|
||||||
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)
|
||||||
.TP
|
|
||||||
.BR I
|
*I*::
|
||||||
enter insert mode at current selection begin line start
|
enter insert mode at current selection begin line start
|
||||||
.TP
|
|
||||||
.BR A
|
*A*::
|
||||||
enter insert mode at current selection end line end
|
enter insert mode at current selection end line end
|
||||||
.TP
|
|
||||||
.BR o
|
*o*::
|
||||||
enter insert mode in a new line below current selection end
|
enter insert mode in a new line below current selection end
|
||||||
.TP
|
|
||||||
.BR O
|
*O*::
|
||||||
enter insert mode in a new line above current selection begin
|
enter insert mode in a new line above current selection begin
|
||||||
.TP
|
|
||||||
.BR y
|
*y*::
|
||||||
yank selections
|
yank selections
|
||||||
.TP
|
|
||||||
.BR p
|
*p*::
|
||||||
paste after current selection end
|
paste after current selection end
|
||||||
.TP
|
|
||||||
.BR P
|
*P*::
|
||||||
paste before current selection begin
|
paste before current selection begin
|
||||||
.TP
|
|
||||||
.BR <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
|
||||||
.TP
|
|
||||||
.BR <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
|
||||||
.TP
|
|
||||||
.BR R
|
*R*::
|
||||||
replace current selection with yanked text
|
replace current selection with yanked text
|
||||||
.TP
|
|
||||||
.BR r
|
*r*::
|
||||||
replace each character with the next entered one
|
replace each character with the next entered one
|
||||||
.TP
|
|
||||||
.BR <a-j>
|
*<a-j>*::
|
||||||
join selected lines
|
join selected lines
|
||||||
.TP
|
|
||||||
.BR <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
|
||||||
.TP
|
|
||||||
.BR >
|
*>*::
|
||||||
indent selected lines
|
indent selected lines
|
||||||
.TP
|
|
||||||
.BR <a->>
|
*<a->>*::
|
||||||
indent selected lines, including empty lines
|
indent selected lines, including empty lines
|
||||||
.TP
|
|
||||||
.BR <
|
*<*::
|
||||||
deindent selected lines
|
deindent selected lines
|
||||||
.TP
|
|
||||||
.BR <a-<>
|
*<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)
|
||||||
.TP
|
|
||||||
.BR !
|
*!*::
|
||||||
insert command output before selection
|
insert command output before selection
|
||||||
.TP
|
|
||||||
.BR a-!
|
*a-!*::
|
||||||
append command output after selection
|
append command output after selection
|
||||||
.TP
|
|
||||||
.BR u
|
*u*::
|
||||||
undo last change
|
undo last change
|
||||||
.TP
|
|
||||||
.BR U
|
*U*::
|
||||||
redo last change
|
redo last change
|
||||||
.TP
|
|
||||||
.BR &
|
*&*::
|
||||||
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
|
||||||
.TP
|
|
||||||
.BR <a-&>
|
*<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
|
||||||
.TP
|
|
||||||
.BR `
|
*`*::
|
||||||
to lower case
|
to lower case
|
||||||
.TP
|
|
||||||
.BR ~
|
*~*::
|
||||||
to upper case
|
to upper case
|
||||||
.TP
|
|
||||||
.BR <a-`>
|
*<a-`>*::
|
||||||
swap case
|
swap case
|
||||||
.TP
|
|
||||||
.BR @
|
*@*::
|
||||||
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
|
||||||
.TP
|
|
||||||
.BR <a-@>
|
*<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
|
||||||
.TP
|
|
||||||
.BR <a-'>
|
*<a-'>*::
|
||||||
rotate selections content, if specified, the count groups selections, so
|
rotate selections content, if specified, the count groups selections, so the following command
|
||||||
.IR 3<a-'>
|
|
||||||
|
3<a-'>
|
||||||
|
|
||||||
rotate (1, 2, 3) and (3, 4, 6) independently
|
rotate (1, 2, 3) and (3, 4, 6) independently
|
||||||
|
|
||||||
.SS Goto Commands
|
Goto Commands
|
||||||
If a count is given prior to hitting `g`, `g` will jump to the given line
|
-------------
|
||||||
|
If a count is given prior to hitting *g*, *g* will jump to the given line
|
||||||
|
|
||||||
.TP
|
*gh*::
|
||||||
.BR gh
|
|
||||||
select to line begin
|
select to line begin
|
||||||
.TP
|
|
||||||
.BR gl
|
*gl*::
|
||||||
select to line end
|
select to line end
|
||||||
.TP
|
|
||||||
.BR gg,\ gk
|
*gg*, *gk*::
|
||||||
go to the first line
|
go to the first line
|
||||||
.TP
|
|
||||||
.BR gj
|
*gj*::
|
||||||
go to the last line
|
go to the last line
|
||||||
.TP
|
|
||||||
.BR ge
|
*ge*::
|
||||||
go to last char of last line
|
go to last char of last line
|
||||||
.TP
|
|
||||||
.BR gt
|
*gt*::
|
||||||
go to the first displayed line
|
go to the first displayed line
|
||||||
.TP
|
|
||||||
.BR gc
|
*gc*::
|
||||||
go to the middle displayed line
|
go to the middle displayed line
|
||||||
.TP
|
|
||||||
.BR gb
|
*gb*::
|
||||||
go to the last displayed line
|
go to the last displayed line
|
||||||
.TP
|
|
||||||
.BR ga
|
*ga*::
|
||||||
go to the previous (alternate) buffer
|
go to the previous (alternate) buffer
|
||||||
.TP
|
|
||||||
.BR gf
|
*gf*::
|
||||||
open the file whose name is selected
|
open the file whose name is selected
|
||||||
.TP
|
|
||||||
.BR g.
|
*g.*::
|
||||||
go to last buffer modifiction position
|
go to last buffer modifiction position
|
||||||
|
|
||||||
.SS View commands
|
View commands
|
||||||
.TP
|
-------------
|
||||||
.BR V
|
|
||||||
|
*V*::
|
||||||
lock view mode until <esc> is hit
|
lock view mode until <esc> is hit
|
||||||
.TP
|
|
||||||
.BR vv,\ vc
|
*vv*, *vc*::
|
||||||
center the main selection in the window
|
center the main selection in the window
|
||||||
.TP
|
|
||||||
.BR vt
|
*vt*::
|
||||||
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
|
||||||
.TP
|
|
||||||
.BR vb
|
*vb*::
|
||||||
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
|
||||||
.TP
|
|
||||||
.BR vh
|
*vh*::
|
||||||
scroll the window count columns left
|
scroll the window count columns left
|
||||||
.TP
|
|
||||||
.BR vj
|
*vj*::
|
||||||
scroll the window count line downward
|
scroll the window count line downward
|
||||||
.TP
|
|
||||||
.BR vk
|
*vk*::
|
||||||
scroll the window count line upward
|
scroll the window count line upward
|
||||||
.TP
|
|
||||||
.BR vl
|
*vl*::
|
||||||
scroll the window count columns right
|
scroll the window count columns right
|
||||||
|
|
||||||
|
|
||||||
.SS Marks
|
Marks
|
||||||
Marks use the
|
-----
|
||||||
.IR ^
|
Marks use the *^* register by default.
|
||||||
register by default
|
|
||||||
.TP
|
*Z*::
|
||||||
.BR Z
|
|
||||||
will save the current selections to the register
|
will save the current selections to the register
|
||||||
.TP
|
|
||||||
.BR z
|
*z*::
|
||||||
will restore the selections from the register
|
will restore the selections from the register
|
||||||
.TP
|
|
||||||
.BR <a-z>
|
*<a-z>*::
|
||||||
will add the selections from the register to the existing ones
|
will add the selections from the register to the existing ones
|
||||||
|
|
||||||
.SS Macros
|
Macros
|
||||||
Macros use the
|
------
|
||||||
.IR @
|
Macros use the *@* register by default
|
||||||
register by default
|
|
||||||
.TP
|
*Q*::
|
||||||
.BR Q
|
|
||||||
record a macro
|
record a macro
|
||||||
.TP
|
|
||||||
.BR q
|
*q*::
|
||||||
play a recorded macro
|
play a recorded macro
|
||||||
|
|
||||||
.SS Searching
|
Searching
|
||||||
Searches use the
|
---------
|
||||||
.IR /
|
Searches use the */* register by default
|
||||||
register by default
|
|
||||||
.TP
|
***::
|
||||||
.BR *
|
|
||||||
set the search pattern to the current selection (automatically detects word boundaries)
|
set the search pattern to the current selection (automatically detects word boundaries)
|
||||||
.TP
|
|
||||||
.BR <a-*>
|
*<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)
|
||||||
|
|
||||||
.SS Jump list
|
Jump list
|
||||||
.TP
|
---------
|
||||||
.BR <c-i>
|
|
||||||
|
*<c-i>*::
|
||||||
Jump forward
|
Jump forward
|
||||||
.TP
|
|
||||||
.BR <c-o>
|
*<c-o>*::
|
||||||
Jump backward
|
Jump backward
|
||||||
.TP
|
|
||||||
.BR <c-s>
|
*<c-s>*::
|
||||||
save current selections
|
save current selections
|
||||||
|
|
||||||
.SS Multiple selections
|
Multiple selections
|
||||||
.TP
|
-------------------
|
||||||
.BR s
|
|
||||||
|
*s*::
|
||||||
create a selection
|
create a selection
|
||||||
.TP
|
|
||||||
.BR <a-s>
|
*<a-s>*::
|
||||||
split the current selections on line boundaries
|
split the current selections on line boundaries
|
||||||
.TP
|
|
||||||
.BR S
|
*S*::
|
||||||
split the current selection
|
split the current selection
|
||||||
.TP
|
|
||||||
.BR C
|
*C*::
|
||||||
copy the current selection to the next line
|
copy the current selection to the next line
|
||||||
.TP
|
|
||||||
.BR <a-C>
|
*<a-C>*::
|
||||||
copy the current selection to the previous line
|
copy the current selection to the previous line
|
||||||
.TP
|
|
||||||
.BR <space>
|
*<space>*::
|
||||||
clear a multiple selection
|
clear a multiple selection
|
||||||
.TP
|
|
||||||
.BR <a-space>
|
*<a-space>*::
|
||||||
clear the current selection
|
clear the current selection
|
||||||
.TP
|
|
||||||
.BR <a-k>
|
*<a-k>*::
|
||||||
keep the selections that match the given regex
|
keep the selections that match the given regex
|
||||||
.TP
|
|
||||||
.BR <a-K>
|
*<a-K>*::
|
||||||
clear selections that match the given regex
|
clear selections that match the given regex
|
||||||
.TP
|
|
||||||
.BR |
|
*|*::
|
||||||
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
|
||||||
.TP
|
|
||||||
.BR <a-|>
|
*<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
|
||||||
.TP
|
|
||||||
.BR $
|
*$*::
|
||||||
pipe each selection to the given shell command
|
pipe each selection to the given shell command
|
||||||
|
|
||||||
.SS Object Selection
|
Object Selection
|
||||||
.TP
|
----------------
|
||||||
.BR <a-a>
|
|
||||||
|
*<a-a>*::
|
||||||
selects the whole object
|
selects the whole object
|
||||||
.TP
|
|
||||||
.BR <a-i>
|
*<a-i>*::
|
||||||
selects the inner object, that is the object excluding it's surrounder
|
selects the inner object, that is the object excluding it's surrounder
|
||||||
.TP
|
|
||||||
.BR [
|
*[*::
|
||||||
selects to object start
|
selects to object start
|
||||||
.TP
|
|
||||||
.BR ]
|
*]*::
|
||||||
selects to object end
|
selects to object end
|
||||||
.TP
|
|
||||||
.BR {
|
*{*::
|
||||||
extends selections to object start
|
extends selections to object start
|
||||||
.TP
|
|
||||||
.BR }
|
*}*::
|
||||||
extends selections to object end
|
extends selections to object end
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
After this key, you need to enter a second key in order to specify which object you want
|
After this key, you need to enter a second key in order to specify which object you want
|
||||||
.TP
|
|
||||||
.BR b,\ (,\ )
|
*b*, *(*, *)*::
|
||||||
select the enclosing parenthesis
|
select the enclosing parenthesis
|
||||||
.TP
|
|
||||||
.BR B,\ {,\ }
|
*B*, *{*, *}*::
|
||||||
select the enclosing {} block
|
select the enclosing {} block
|
||||||
.TP
|
|
||||||
.BR r,\ [,\ ]
|
*r*, *[*, *]*::
|
||||||
select the enclosing [] block
|
select the enclosing [] block
|
||||||
.TP
|
|
||||||
.BR a,\ <,\ >
|
*a*, *<*, *>*::
|
||||||
select the enclosing <> block
|
select the enclosing <> block
|
||||||
.TP
|
|
||||||
.BR "
|
*"*::
|
||||||
select the enclosing double quoted string
|
select the enclosing double quoted string
|
||||||
.TP
|
|
||||||
.BR '
|
*'*::
|
||||||
select the enclosing single quoted string
|
select the enclosing single quoted string
|
||||||
.TP
|
|
||||||
.BR `
|
*`*::
|
||||||
select the enclosing grave quoted string
|
select the enclosing grave quoted string
|
||||||
.TP
|
|
||||||
.BR w
|
*w*::
|
||||||
select the whole word
|
select the whole word
|
||||||
.TP
|
|
||||||
.BR W
|
*W*::
|
||||||
select the whole WORD
|
select the whole WORD
|
||||||
.TP
|
|
||||||
.BR s
|
*s*::
|
||||||
select the sentence
|
select the sentence
|
||||||
.TP
|
|
||||||
.BR p
|
*p*::
|
||||||
select the paragraph
|
select the paragraph
|
||||||
.TP
|
|
||||||
.BR ␣
|
*␣*::
|
||||||
select the whitespaces
|
select the whitespaces
|
||||||
.TP
|
|
||||||
.BR i
|
*i*::
|
||||||
select the current indentation block
|
select the current indentation block
|
||||||
.TP
|
|
||||||
.BR n
|
*n*::
|
||||||
select the number
|
select the number
|
||||||
.TP
|
|
||||||
.BR :
|
*:*::
|
||||||
select user defined object, will prompt for open and close text
|
select user defined object, will prompt for open and close text
|
||||||
|
|
||||||
.SS Prompt Commands
|
Prompt Commands
|
||||||
.TP
|
---------------
|
||||||
.BR <ret>
|
|
||||||
|
*<ret>*::
|
||||||
validate prompt
|
validate prompt
|
||||||
.TP
|
|
||||||
.BR <esc>
|
*<esc>*::
|
||||||
abandon without
|
abandon without
|
||||||
.TP
|
|
||||||
.BR <left>,\ <a-h>
|
*<left>*, *<a-h>*::
|
||||||
move cursor to previous character
|
move cursor to previous character
|
||||||
.TP
|
|
||||||
.BR <right>,\ <a-l>
|
*<right>*, *<a-l>*::
|
||||||
move cursor to previous character
|
move cursor to previous character
|
||||||
.TP
|
|
||||||
.BR <home>
|
*<home>*::
|
||||||
move cursor to first character
|
move cursor to first character
|
||||||
.TP
|
|
||||||
.BR <end>
|
*<end>*::
|
||||||
move cursor to passed last character
|
move cursor to passed last character
|
||||||
.TP
|
|
||||||
.BR <backspace>,\ <a-x>
|
*<backspace>*, *<a-x>*::
|
||||||
erase character before cursor
|
erase character before cursor
|
||||||
.TP
|
|
||||||
.BR <del>,\ <a-d>
|
*<del>*, *<a-d>*::
|
||||||
erase character under cursor
|
erase character under cursor
|
||||||
.TP
|
|
||||||
.BR <c-w>
|
*<c-w>*::
|
||||||
avance to next word begin
|
avance to next word begin
|
||||||
.TP
|
|
||||||
.BR <c-a-w>
|
*<c-a-w>*::
|
||||||
advance to next WORD begin
|
advance to next WORD begin
|
||||||
.TP
|
|
||||||
.BR <c-b>
|
*<c-b>*::
|
||||||
go back to previous word begin
|
go back to previous word begin
|
||||||
.TP
|
|
||||||
.BR <c-a-b>
|
*<c-a-b>*::
|
||||||
go back to previous WORD begin
|
go back to previous WORD begin
|
||||||
.TP
|
|
||||||
.BR <c-e>
|
*<c-e>*::
|
||||||
advance to next word end
|
advance to next word end
|
||||||
.TP
|
|
||||||
.BR <c-a-e>
|
*<c-a-e>*::
|
||||||
advance to next word end
|
advance to next word end
|
||||||
.TP
|
|
||||||
.BR <up>,\ <c-p>
|
*<up>*, *<c-p>*::
|
||||||
select previous entry in history
|
select previous entry in history
|
||||||
.TP
|
|
||||||
.BR <down>,\ <c-n>
|
*<down>*, *<c-n>*::
|
||||||
select next entry in history
|
select next entry in history
|
||||||
.TP
|
|
||||||
.BR <tab>
|
*<tab>*::
|
||||||
select next completion candidate
|
select next completion candidate
|
||||||
.TP
|
|
||||||
.BR <backtab>
|
*<backtab>*::
|
||||||
select previous completion candidate
|
select previous completion candidate
|
||||||
.TP
|
|
||||||
.BR <c-r>
|
*<c-r>*::
|
||||||
insert then content of the register given by next key
|
insert then content of the register given by next key
|
||||||
.TP
|
|
||||||
.BR <c-v>
|
*<c-v>*::
|
||||||
insert next keystroke without interpretting it
|
insert next keystroke without interpretting it
|
||||||
.TP
|
|
||||||
.BR <c-o>
|
*<c-o>*::
|
||||||
disable auto completion for this prompt
|
disable auto completion for this prompt
|
||||||
|
|
||||||
.SS Key mapping
|
Key mapping
|
||||||
|
-----------
|
||||||
Mapping a combination of keys to another one (a.k.a. key mapping or binding) can be done with the following command:
|
Mapping a combination of keys to another one (a.k.a. key mapping or binding) can be done with the following command:
|
||||||
|
|
||||||
.TP
|
-------------------------------
|
||||||
.BR map " <scope> <mode> <key> <keys>"
|
map <scope> <mode> <key> <keys>
|
||||||
.RS 3
|
-------------------------------
|
||||||
.TP
|
|
||||||
.BR scope
|
|
||||||
can be one of
|
|
||||||
.IR global ", " window " or " buffer
|
|
||||||
.TP
|
|
||||||
.BR mode
|
|
||||||
can be one of
|
|
||||||
.IR insert ", " normal ", " prompt ", " menu ", " user
|
|
||||||
or a one character long arbitrary prefix (the
|
|
||||||
.IR user
|
|
||||||
mode uses the
|
|
||||||
.IR ,
|
|
||||||
prefix)
|
|
||||||
.TP
|
|
||||||
.BR key
|
|
||||||
the key to which the combination will be bound
|
|
||||||
.TP
|
|
||||||
.BR keys
|
|
||||||
string that lists the keys that will be executed when
|
|
||||||
.IR key
|
|
||||||
is hit
|
|
||||||
.RE
|
|
||||||
|
|
||||||
Keys are always executed within the
|
*scope*::
|
||||||
.IR normal
|
can be one of *global*, *window* or *buffer*
|
||||||
mode
|
|
||||||
|
*mode*::
|
||||||
|
can be one of *insert*, *normal*, *prompt*, *menu*, *user* or a one character long arbitrary prefix (the
|
||||||
|
*user* mode uses the *,* prefix)
|
||||||
|
|
||||||
|
*key*::
|
||||||
|
the key to which the combination will be bound
|
||||||
|
|
||||||
|
*keys*::
|
||||||
|
string that lists the keys that will be executed when *key* is hit
|
||||||
|
|
||||||
|
Keys are always executed within the *normal* mode.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user