Merge branch 'docs' of git://github.com/Delapouite/kakoune
This commit is contained in:
commit
c5a874e689
|
@ -585,7 +585,7 @@ saved in the command history.
|
||||||
Basic Commands
|
Basic Commands
|
||||||
~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Some commands take an esclamation 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).
|
||||||
|
|
||||||
|
|
|
@ -73,10 +73,10 @@ j<a-gt> # 3. go back to next line and indent it even if it is empty
|
||||||
|
|
||||||
Note that if no previous lines end with a +{+ or +(+, the +<a-k>+ command will
|
Note that if no previous lines end with a +{+ or +(+, the +<a-k>+ command will
|
||||||
raise an error, and stop the execution. This is what we want: it is similar to
|
raise an error, and stop the execution. This is what we want: it is similar to
|
||||||
what would happend if we would continue with no selections; the following
|
what would happen if we would continue with no selections; the following
|
||||||
commands would have no effects.
|
commands would have no effects.
|
||||||
|
|
||||||
However, the error would end up being catched by the hook execution code, and
|
However, the error would end up being caught by the hook execution code, and
|
||||||
it will write informations about it in the debug buffer, which we do not want,
|
it will write informations about it in the debug buffer, which we do not want,
|
||||||
as this is actually expected. In order to prevent that, the exec should be
|
as this is actually expected. In order to prevent that, the exec should be
|
||||||
wrapped in a try command. So we would have:
|
wrapped in a try command. So we would have:
|
||||||
|
|
|
@ -13,7 +13,7 @@ Kakoune is written in C++11, here are the main coding style points:
|
||||||
|
|
||||||
* public interface before private methods/data when defining a class
|
* public interface before private methods/data when defining a class
|
||||||
|
|
||||||
* use +override+ keyword for overriden virtual methods
|
* use +override+ keyword for overridden virtual methods
|
||||||
|
|
||||||
* opening brackets on their own lines by default, except when declaring
|
* opening brackets on their own lines by default, except when declaring
|
||||||
an object where the opening bracket follows the equal sign.
|
an object where the opening bracket follows the equal sign.
|
||||||
|
@ -65,7 +65,7 @@ Kakrc coding style
|
||||||
as executed by a POSIX shell. Avoid non posix extensions to common
|
as executed by a POSIX shell. Avoid non posix extensions to common
|
||||||
tools.
|
tools.
|
||||||
|
|
||||||
* Avoid too much comlexity/logic in kak scripts. They are not meant
|
* Avoid too much complexity/logic in kak scripts. They are not meant
|
||||||
to implement generic tools, only to transform a general tool output
|
to implement generic tools, only to transform a general tool output
|
||||||
to Kakoune commands.
|
to Kakoune commands.
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ things easier to understand, bugs easier to fix, and code easier to change.
|
||||||
|
|
||||||
- Either we want a direct result, and we need to be synchronous with
|
- Either we want a direct result, and we need to be synchronous with
|
||||||
the user, so getting a 4x speed up is meaningless, we need to have an
|
the user, so getting a 4x speed up is meaningless, we need to have an
|
||||||
algorithm which appears instantaneous the the user.
|
algorithm which appears instantaneous the user.
|
||||||
|
|
||||||
- Or we want an asynchronous result, and then the processing is best left
|
- Or we want an asynchronous result, and then the processing is best left
|
||||||
to a helper command which can be reused with other Unix tools.
|
to a helper command which can be reused with other Unix tools.
|
||||||
|
|
|
@ -8,7 +8,7 @@ commands - a
|
||||||
Primitives
|
Primitives
|
||||||
----------
|
----------
|
||||||
|
|
||||||
Some commands take an esclamation 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).
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ commands:
|
||||||
*try* <commands> catch <on_error_commands>::
|
*try* <commands> catch <on_error_commands>::
|
||||||
prevent an error in *commands* from aborting the whole commands
|
prevent an error in *commands* from aborting the whole 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 ommitted
|
done on error, the catch part can be omitted
|
||||||
|
|
||||||
*reg* <name> <content>::
|
*reg* <name> <content>::
|
||||||
set register *name* to *content*
|
set register *name* to *content*
|
||||||
|
@ -212,7 +212,7 @@ New commands can be defined using the *def* command:
|
||||||
positional params and output one completion candidate per line
|
positional params and output one completion candidate per line
|
||||||
|
|
||||||
*-allow-override*:::
|
*-allow-override*:::
|
||||||
allow the new command to replace an exisiting one with the same name
|
allow the new command to replace an existing one with the same name
|
||||||
|
|
||||||
*-hidden*:::
|
*-hidden*:::
|
||||||
do not show the command in command name completions
|
do not show the command in command name completions
|
||||||
|
|
|
@ -16,7 +16,7 @@ eval [<flags>] <command> ...
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
*exec* runs keys as if they were pressed, whereas *eval* executes its given
|
*exec* runs keys as if they were pressed, whereas *eval* executes its given
|
||||||
paremeters as if they were entered in the command prompt. By default, their
|
parameters as if they were entered in the command prompt. By default, their
|
||||||
execution happens within the context of the current client, and stops when
|
execution happens within the context of the current client, and stops when
|
||||||
the last key/command is reached, or an error is raised.
|
the last key/command is reached, or an error is raised.
|
||||||
|
|
||||||
|
|
|
@ -56,19 +56,19 @@ informations about Kakoune's state:
|
||||||
content of the main selection
|
content of the main selection
|
||||||
*kak_selections*::
|
*kak_selections*::
|
||||||
content of the selection separated by colons, colons in the selection
|
content of the selection separated by colons, colons in the selection
|
||||||
contents are escapted with a backslash
|
contents are escaped with a backslash
|
||||||
*kak_selection_desc*::
|
*kak_selection_desc*::
|
||||||
range of the main selection, represented as anchor,cursor; anchor
|
range of the main selection, represented as anchor,cursor; anchor
|
||||||
and cursor are in this format: line.column
|
and cursor are in this format: line.column
|
||||||
*kak_selections_desc*::
|
*kak_selections_desc*::
|
||||||
range of the selecations separated by colons
|
range of the selections separated by colons
|
||||||
*kak_bufname*::
|
*kak_bufname*::
|
||||||
name of the current buffer
|
name of the current buffer
|
||||||
*kak_buffile*::
|
*kak_buffile*::
|
||||||
full path of the file or same as kak_bufname when there’s no
|
full path of the file or same as kak_bufname when there’s no
|
||||||
associated file
|
associated file
|
||||||
*kak_buflist*::
|
*kak_buflist*::
|
||||||
the current buffer list, each buffer seperated by a colon
|
the current buffer list, each buffer separated by a colon
|
||||||
*kak_timestamp*::
|
*kak_timestamp*::
|
||||||
timestamp of the current buffer, the timestamp is an integer value
|
timestamp of the current buffer, the timestamp is an integer value
|
||||||
which is incremented each time the buffer is modified
|
which is incremented each time the buffer is modified
|
||||||
|
@ -111,4 +111,4 @@ syntax will enable the face facename until another face gets activated,
|
||||||
or the end of the string is reached.
|
or the end of the string is reached.
|
||||||
|
|
||||||
Literal '{' characters shall be written '\{', and a literal backslash ('\')
|
Literal '{' characters shall be written '\{', and a literal backslash ('\')
|
||||||
that preceeds a '{' character shall be escaped as well ('\\').
|
that precedes a '{' character shall be escaped as well ('\\').
|
||||||
|
|
|
@ -44,7 +44,7 @@ fg_color[,bg_color][+attributes]
|
||||||
|
|
||||||
Builtin faces
|
Builtin faces
|
||||||
-------------
|
-------------
|
||||||
The following default faces are used by color schemes to highlight certains
|
The following default faces are used by color schemes to highlight certain
|
||||||
areas of the user interface:
|
areas of the user interface:
|
||||||
|
|
||||||
*Default*::
|
*Default*::
|
||||||
|
|
|
@ -40,12 +40,12 @@ General highlighters
|
||||||
in yellow on red background
|
in yellow on red background
|
||||||
|
|
||||||
*dynregex*::
|
*dynregex*::
|
||||||
Similar to regex, but expand (like a command paramater would) the
|
Similar to regex, but expand (like a command parameter would) the
|
||||||
given expression before building a regex from the result
|
given expression before building a regex from the result
|
||||||
|
|
||||||
*flag_lines* <flag> <option_name>::
|
*flag_lines* <flag> <option_name>::
|
||||||
add a column in front of text, and display the given flag in it for
|
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>
|
every line contained in the int-list option named <option_name>
|
||||||
|
|
||||||
*show_matching*::
|
*show_matching*::
|
||||||
highlight matching char of the character under the selections cursor
|
highlight matching char of the character under the selections cursor
|
||||||
|
|
|
@ -8,7 +8,7 @@ hooks - a
|
||||||
Description
|
Description
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
Commands can be registred to be executed when certain events arise. To
|
Commands can be registered to be executed when certain events arise. To
|
||||||
register a hook use the following command:
|
register a hook use the following command:
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
@ -71,7 +71,7 @@ Default hooks
|
||||||
a window was created, the filtering text is the buffer name
|
a window was created, the filtering text is the buffer name
|
||||||
|
|
||||||
*WinClose*::
|
*WinClose*::
|
||||||
a window was detroyed, the filtering text is the buffer name
|
a window was destroyed, the filtering text is the buffer name
|
||||||
|
|
||||||
*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
|
||||||
|
|
|
@ -70,7 +70,7 @@ Builtin options
|
||||||
execute search as it is typed
|
execute search as it is typed
|
||||||
|
|
||||||
*aligntab* 'bool'::
|
*aligntab* 'bool'::
|
||||||
use tabs for alignement command
|
use tabs for alignment command
|
||||||
|
|
||||||
*autoinfo* 'flags(command|onkey|normal)'::
|
*autoinfo* 'flags(command|onkey|normal)'::
|
||||||
display automatic information box in the enabled contexts
|
display automatic information box in the enabled contexts
|
||||||
|
|
|
@ -88,10 +88,10 @@ is a sequence of non whitespace characters
|
||||||
same as [wbe] but select WORD instead of word
|
same as [wbe] but select WORD instead of word
|
||||||
|
|
||||||
*f*::
|
*f*::
|
||||||
select to the next occurence of given character
|
select to the next occurrence of given character
|
||||||
|
|
||||||
*t*::
|
*t*::
|
||||||
select until the next occurence of given character
|
select until the next occurrence of given character
|
||||||
|
|
||||||
*<a-[ft]>*::
|
*<a-[ft]>*::
|
||||||
same as [ft] but in the other direction
|
same as [ft] but in the other direction
|
||||||
|
@ -325,7 +325,7 @@ If a count is given prior to hitting *g*, *g* will jump to the given line
|
||||||
open the file whose name is selected
|
open the file whose name is selected
|
||||||
|
|
||||||
*g.*::
|
*g.*::
|
||||||
go to last buffer modifiction position
|
go to last buffer modification position
|
||||||
|
|
||||||
View commands
|
View commands
|
||||||
-------------
|
-------------
|
||||||
|
@ -566,7 +566,7 @@ Prompt Commands
|
||||||
insert then content of the register given by next key
|
insert then content of the register given by next key
|
||||||
|
|
||||||
*<c-v>*::
|
*<c-v>*::
|
||||||
insert next keystroke without interpretting it
|
insert next keystroke without interpreting it
|
||||||
|
|
||||||
*<c-o>*::
|
*<c-o>*::
|
||||||
disable auto completion for this prompt
|
disable auto completion for this prompt
|
||||||
|
|
Loading…
Reference in New Issue
Block a user