docs: add command aliases

Fix #1556
This commit is contained in:
Delapouite 2017-09-09 13:47:45 +02:00
parent 8e3e5b10c1
commit 221e19251c

View File

@ -10,51 +10,62 @@ Primitives
Some commands take an exclamation mark (*!*), which can be used to force Some commands take an exclamation mark (*!*), which can be used to force
the execution of the command (i.e. to quit a modified buffer, the the execution of the command (i.e. to quit a modified buffer, the
command *q!* has to be used). command *q!* has to be used). Aliases are mentionned below each commands.
*cd* [<directory>]:: *change-directory* [<directory>]::
*alias* cd +
change the current directory to *directory*, or the home directory if change the current directory to *directory*, or the home directory if
unspecified unspecified
*doc* <topic>:: *doc* <topic>::
*alias* help +
display documentation about a topic. The completion list displays the display documentation about a topic. The completion list displays the
available topics available topics
*e[dit][!]* <filename> [<line> [<column>]]:: *edit[!]* <filename> [<line> [<column>]]::
*alias* e +
open buffer on file, go to given line and column. If file is already open buffer on file, go to given line and column. If file is already
opened, just switch to this file. Use edit! to force reloading opened, just switch to this file. Use edit! to force reloading
*w[rite][!]* [<filename>]:: *write[!]* [<filename>]::
*alias* w +
write buffer to <filename> or use its name if filename is not write buffer to <filename> or use its name if filename is not
given. If the file is write-protected, its permissions are temporarily given. If the file is write-protected, its permissions are temporarily
changed to allow saving the buffer and restored afterwards when changed to allow saving the buffer and restored afterwards when
the write! command is used. the write! command is used.
*w[rite]a[ll]*:: *write-all*::
*alias* wa +
write all buffers that are associated to a file write all buffers that are associated to a file
*q[uit][!]* [<exit status>]:: *quit!* [<exit status>]::
*alias* q +
exit Kakoune, use quit! to force quitting even if there is some exit Kakoune, use quit! to force quitting even if there is some
unsaved buffers remaining. If specified, the client exit status unsaved buffers remaining. If specified, the client exit status
will be set to <exit status> will be set to <exit status>
*w[a]q[!]* [<exit status>]:: *write-all-quit* [<exit status>]::
write the current buffer (or all buffers when *waq* is used) and quit. *alias* waq +
If specified, the client exit status will be set to <exit status> write all buffers and quit. If specified, the client exit status
will be set to <exit status>
*kill*:: *kill[!]*::
terminate the current session, all the clients as well as the server terminate the current session, all the clients as well as the server
*b[uffer]* <name>:: *buffer* <name>::
*alias* b +
switch to buffer <name> switch to buffer <name>
*b[uffer]n[ext]*:: *buffer-next*::
*alias* bn +
switch to the next buffer switch to the next buffer
*b[uffer]p[rev]*:: *buffer-prev*::
*alias* bp +
switch to the previous buffer switch to the previous buffer
*d[el]b[uf][!]* [<name>]:: *delete-buffer[!]* [<name>]::
*alias* db +
delete the buffer <name> delete the buffer <name>
*source* <filename>:: *source* <filename>::
@ -64,6 +75,7 @@ command *q!* has to be used).
load named colorscheme load named colorscheme
*rename-client* <name>:: *rename-client* <name>::
*alias* nc +
set current client name set current client name
*rename-buffer* <name>:: *rename-buffer* <name>::
@ -85,10 +97,12 @@ command *q!* has to be used).
does nothing, but arguments will be evaluated (e.g. shell expansion) does nothing, but arguments will be evaluated (e.g. shell expansion)
*declare-option* [-hidden] <type> <name> [<value>]:: *declare-option* [-hidden] <type> <name> [<value>]::
*alias* decl +
declare a new option, the -hidden hides the option in completion declare a new option, the -hidden hides the option in completion
suggestions (c.f. the 'options' documentation page) suggestions (c.f. the 'options' documentation page)
*set-option* <scope> <name> <value>:: *set-option* <scope> <name> <value>::
*alias* set +
change the value of an option (c.f. the 'options' documentation page), change the value of an option (c.f. the 'options' documentation page),
note that the name of a particular buffer can be specified when the note that the name of a particular buffer can be specified when the
target *scope* is 'buffer', e.g. set buffer=/path/to/buffer foo "bar"; target *scope* is 'buffer', e.g. set buffer=/path/to/buffer foo "bar";
@ -96,6 +110,7 @@ command *q!* has to be used).
point to the narrowest scope available in the current context point to the narrowest scope available in the current context
*unset-option* <scope> <name>:: *unset-option* <scope> <name>::
*alias* unset +
unset the value of an option (c.f. the 'options' documentation page) unset the value of an option (c.f. the 'options' documentation page)
*update-option* <scope> <name>:: *update-option* <scope> <name>::
@ -109,7 +124,8 @@ command *q!* has to be used).
remove an alias if its current value is the same as the one passed remove an alias if its current value is the same as the one passed
as an optional parameter, remove it unconditionally otherwise as an optional parameter, remove it unconditionally otherwise
*face* <name> <facespec>:: *set-face* <name> <facespec>::
*alias* face +
define a face (c.f. the 'faces' documentation page) define a face (c.f. the 'faces' documentation page)
*exec* [<flags>] <key> ...:: *exec* [<flags>] <key> ...::
@ -121,6 +137,7 @@ command *q!* has to be used).
(c.f. the 'execeval' documentation page) (c.f. the 'execeval' documentation page)
*define-command* [<flags>] <name> <command>:: *define-command* [<flags>] <name> <command>::
*alias* def +
define a new command (c.f. the 'Declaring new commands' section below) define a new command (c.f. the 'Declaring new commands' section below)
*map* <scope> <mode> <key> <keys>:: *map* <scope> <mode> <key> <keys>::
@ -135,14 +152,17 @@ command *q!* has to be used).
documentation page) documentation page)
*remove-hooks* <scope> <group>:: *remove-hooks* <scope> <group>::
*alias* rmhooks +
remove every hooks in *scope* that are part of the given *group* remove every hooks in *scope* that are part of the given *group*
(c.f. the 'hooks' documentation page) (c.f. the 'hooks' documentation page)
*add-highlighter* [<flags>] <highlighter_name> <highlighter_parameters> ...:: *add-highlighter* [<flags>] <highlighter_name> <highlighter_parameters> ...::
*alias* addhl +
add a highlighter to the current window (c.f. the 'highlighters' add a highlighter to the current window (c.f. the 'highlighters'
documentation page) documentation page)
*remove-highlighter* <highlighter_id>:: *remove-highlighter* <highlighter_id>::
*alias* rmhl +
remove the highlighter whose id is *highlighter_id* (c.f. the remove the highlighter whose id is *highlighter_id* (c.f. the
'highlighters' documentation page) 'highlighters' documentation page)
@ -194,7 +214,8 @@ commands:
execution, execute *on_error_commands* instead. If nothing is to be execution, execute *on_error_commands* instead. If nothing is to be
done on error, the catch part can be omitted done on error, the catch part can be omitted
*reg* <name> <content>:: *set-register* <name> <content>::
*alias* reg +
set register *name* to *content* set register *name* to *content*
*select* <anchor_line>.<anchor_column>,<cursor_line>.<cursor_column>:...:: *select* <anchor_line>.<anchor_column>,<cursor_line>.<cursor_column>:...::