update README
This commit is contained in:
parent
2159fc9563
commit
5b3233184e
|
@ -4,20 +4,25 @@ Kakoune
|
||||||
Introduction:
|
Introduction:
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
Kakoune is a code editor heavily inspired by vim, as such most of it's
|
Kakoune is a code editor heavily inspired by Vim, as such most of it's
|
||||||
commands are similar to vi's ones.
|
commands are similar to vi's ones.
|
||||||
|
|
||||||
Kakoune can operate in two modes, normal and insertion. In insertion mode,
|
Kakoune can operate in two modes, normal and insertion. In insertion mode,
|
||||||
keys are directly inserted into the current buffer. In normal mode, keys
|
keys are directly inserted into the current buffer. In normal mode, keys
|
||||||
are used to manipulate the current selection and to enter insertion mode.
|
are used to manipulate the current selection and to enter insertion mode.
|
||||||
|
|
||||||
There is no concept of cursor in kakoune, only selections, a single character
|
Kakoune has a strong focus on interactivity, most commands provide immediate
|
||||||
selection can be seen as a cursor but there is no difference internally. A
|
and incremental results, while still being competitive (as in keystroke count)
|
||||||
selection is an oriented, inclusive range of characters.
|
with Vim.
|
||||||
|
|
||||||
|
Kakoune works on selections, which are oriented, inclusive range of characters,
|
||||||
|
selections have an anchor and a cursor character. Most commands move both of
|
||||||
|
them, except when extending selection where the anchor character stays fixed
|
||||||
|
and the cursor one moves around.
|
||||||
|
|
||||||
see http://vimeo.com/82711574
|
see http://vimeo.com/82711574
|
||||||
|
|
||||||
Join us on freenode IRC +#kakoune+
|
Join us on freenode IRC +#Kakoune+
|
||||||
|
|
||||||
Features
|
Features
|
||||||
--------
|
--------
|
||||||
|
@ -25,8 +30,7 @@ Features
|
||||||
* Multiple selection as a central way of interacting
|
* Multiple selection as a central way of interacting
|
||||||
* Powerful selection manipulation primitives
|
* Powerful selection manipulation primitives
|
||||||
- Select all regex matches in current selections
|
- Select all regex matches in current selections
|
||||||
- Keep selections containing/not containing a
|
- Keep selections containing/not containing a match for a given regex
|
||||||
match for a given regex
|
|
||||||
- Split current selections with a regex
|
- Split current selections with a regex
|
||||||
- Text objects (paragraph, sentence, nestable blocks)
|
- Text objects (paragraph, sentence, nestable blocks)
|
||||||
* Powerful text manipulation primitives
|
* Powerful text manipulation primitives
|
||||||
|
@ -36,6 +40,8 @@ Features
|
||||||
- Indentation
|
- Indentation
|
||||||
- Piping each selection to external filter
|
- Piping each selection to external filter
|
||||||
* Simple interaction with external programs
|
* Simple interaction with external programs
|
||||||
|
* Automatic contextual help
|
||||||
|
* Automatic as you type completion
|
||||||
* Macros
|
* Macros
|
||||||
* Hooks
|
* Hooks
|
||||||
* Syntax Highlighting
|
* Syntax Highlighting
|
||||||
|
@ -200,10 +206,11 @@ Changes
|
||||||
* _U_: redo last change
|
* _U_: redo last change
|
||||||
|
|
||||||
* _r_: replace each character with the next entered one
|
* _r_: replace each character with the next entered one
|
||||||
* _&_: align selection, align the last character of selections by
|
* _&_: align selection, align the cursor of selections by inserting
|
||||||
inserting spaces the last character
|
spaces before the first character of the selection
|
||||||
* _alt-&_: align selection, align the last character of selections by
|
* _alt-&_: align indent, copy the indentation of the main selection
|
||||||
inserting spaces before the selection begin
|
(or the count one if a count is given) to all other ones
|
||||||
|
|
||||||
* _`_: to lower case
|
* _`_: to lower case
|
||||||
* _~_: to upper case
|
* _~_: to upper case
|
||||||
* _alt-`_: swap case
|
* _alt-`_: swap case
|
||||||
|
@ -352,7 +359,7 @@ This tries to be intelligent. It will for example detect if current selection
|
||||||
begins and/or end at word boundaries, and set the search pattern accordingly.
|
begins and/or end at word boundaries, and set the search pattern accordingly.
|
||||||
|
|
||||||
with _alt-*_ you can set the search pattern to the current seletion without
|
with _alt-*_ you can set the search pattern to the current seletion without
|
||||||
kakoune trying to be smart.
|
Kakoune trying to be smart.
|
||||||
|
|
||||||
Basic Commands
|
Basic Commands
|
||||||
--------------
|
--------------
|
||||||
|
@ -380,14 +387,14 @@ Commands are entered using +:+.
|
||||||
* +nop+: does nothing, but as with every other commands, arguments may be
|
* +nop+: does nothing, but as with every other commands, arguments may be
|
||||||
evaluated. So nop can be used for example to execute a shell command
|
evaluated. So nop can be used for example to execute a shell command
|
||||||
while being sure that it's output will not be interpreted by kak.
|
while being sure that it's output will not be interpreted by kak.
|
||||||
+:%sh{ echo echo tchou }+ will echo tchou in kakoune, whereas
|
+:%sh{ echo echo tchou }+ will echo tchou in Kakoune, whereas
|
||||||
+:nop %sh{ echo echo tchou }+ will not, but both will execute the
|
+:nop %sh{ echo echo tchou }+ will not, but both will execute the
|
||||||
shell command.
|
shell command.
|
||||||
|
|
||||||
Exec and Eval
|
Exec and Eval
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
the +:exec+ and +:eval+ commands can be used for running kakoune commands.
|
the +:exec+ and +:eval+ commands can be used for running Kakoune commands.
|
||||||
+:exec+ keys as if they were pressed, whereas +:eval+ executes it's given
|
+:exec+ keys as if they were pressed, whereas +:eval+ executes it's given
|
||||||
paremeters as if they were entered in the command prompt. By default,
|
paremeters as if they were entered in the command prompt. By default,
|
||||||
they do their execution in the context of the current client.
|
they do their execution in the context of the current client.
|
||||||
|
@ -481,7 +488,7 @@ New options can be declared using the +:decl+ command:
|
||||||
the +-hidden+ parameter makes the option invisible in completion, but
|
the +-hidden+ parameter makes the option invisible in completion, but
|
||||||
still modifiable.
|
still modifiable.
|
||||||
|
|
||||||
Some options are built in kakoune, and can be used to control it's behaviour:
|
Some options are built in Kakoune, and can be used to control it's behaviour:
|
||||||
|
|
||||||
* +tabstop+ _int_: width of a tab character.
|
* +tabstop+ _int_: width of a tab character.
|
||||||
* +indentwidth+ _int_: width (in spaces) used for indentation.
|
* +indentwidth+ _int_: width (in spaces) used for indentation.
|
||||||
|
@ -567,7 +574,7 @@ existing highlighters are:
|
||||||
given flag in it for everly lines contained in the int-list option named
|
given flag in it for everly lines contained in the int-list option named
|
||||||
<option_name>.
|
<option_name>.
|
||||||
* +show_matching+: highlight matching char of the character under the selections
|
* +show_matching+: highlight matching char of the character under the selections
|
||||||
last char using +MatchingChar+ color alias.
|
cursor using +MatchingChar+ color alias.
|
||||||
|
|
||||||
Shared Highlighters
|
Shared Highlighters
|
||||||
~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -684,11 +691,11 @@ afterward.
|
||||||
there are some builtins color aliases:
|
there are some builtins color aliases:
|
||||||
|
|
||||||
* +PrimarySelection+: main selection color for every selected character except
|
* +PrimarySelection+: main selection color for every selected character except
|
||||||
the last one
|
the cursor
|
||||||
* +SecondarySelection+: secondary selection color for every selected character
|
* +SecondarySelection+: secondary selection color for every selected character
|
||||||
except the last one
|
except the cursor
|
||||||
* +PrimaryCursor+: last character of the primary selection
|
* +PrimaryCursor+: cursor of the primary selection
|
||||||
* +SecondaryCursor+: last character of the secondary selection
|
* +SecondaryCursor+: cursor of the secondary selection
|
||||||
* +LineNumbers+: colors used by the number_lines highlighter
|
* +LineNumbers+: colors used by the number_lines highlighter
|
||||||
* +MenuForeground+: colors for the selected element in menus
|
* +MenuForeground+: colors for the selected element in menus
|
||||||
* +MenuBackground+: colors for the not selected elements in menus
|
* +MenuBackground+: colors for the not selected elements in menus
|
||||||
|
@ -706,7 +713,7 @@ output of the shell commands in it, it is similar to the shell $(...)
|
||||||
syntax and is evaluated only when needed.
|
syntax and is evaluated only when needed.
|
||||||
for example: %sh{ ls } is replaced with the output of the ls command.
|
for example: %sh{ ls } is replaced with the output of the ls command.
|
||||||
|
|
||||||
Some of kakoune state is available through environment variables:
|
Some of Kakoune state is available through environment variables:
|
||||||
|
|
||||||
* +kak_selection+: content of the main selection
|
* +kak_selection+: content of the main selection
|
||||||
* +kak_selections+: content of the selection separated by colons, colons in
|
* +kak_selections+: content of the selection separated by colons, colons in
|
||||||
|
@ -775,7 +782,7 @@ def can also takes some flags:
|
||||||
* +-hidden+: do not show the command in command name completions
|
* +-hidden+: do not show the command in command name completions
|
||||||
|
|
||||||
Using shell expansion permits to define complex commands or to access
|
Using shell expansion permits to define complex commands or to access
|
||||||
kakoune state:
|
Kakoune state:
|
||||||
|
|
||||||
------------------------------------------------------
|
------------------------------------------------------
|
||||||
:def print_selection %{ echo %sh{ ${kak_selection} } }
|
:def print_selection %{ echo %sh{ ${kak_selection} } }
|
||||||
|
|
Loading…
Reference in New Issue
Block a user