From 5b3233184e847f877b9312bab3ad92de38887fdd Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 28 Jan 2014 13:53:44 +0000 Subject: [PATCH] update README --- README.asciidoc | 51 ++++++++++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/README.asciidoc b/README.asciidoc index 734102a8..36e750af 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -4,20 +4,25 @@ Kakoune 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. Kakoune can operate in two modes, normal and insertion. In insertion mode, keys are directly inserted into the current buffer. In normal mode, keys 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 -selection can be seen as a cursor but there is no difference internally. A -selection is an oriented, inclusive range of characters. +Kakoune has a strong focus on interactivity, most commands provide immediate +and incremental results, while still being competitive (as in keystroke count) +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 -Join us on freenode IRC +#kakoune+ +Join us on freenode IRC +#Kakoune+ Features -------- @@ -25,8 +30,7 @@ Features * Multiple selection as a central way of interacting * Powerful selection manipulation primitives - Select all regex matches in current selections - - Keep selections containing/not containing a - match for a given regex + - Keep selections containing/not containing a match for a given regex - Split current selections with a regex - Text objects (paragraph, sentence, nestable blocks) * Powerful text manipulation primitives @@ -36,6 +40,8 @@ Features - Indentation - Piping each selection to external filter * Simple interaction with external programs + * Automatic contextual help + * Automatic as you type completion * Macros * Hooks * Syntax Highlighting @@ -200,10 +206,11 @@ Changes * _U_: redo last change * _r_: replace each character with the next entered one - * _&_: align selection, align the last character of selections by - inserting spaces the last character - * _alt-&_: align selection, align the last character of selections by - inserting spaces before the selection begin + * _&_: align selection, align the cursor of selections by inserting + spaces before the first character of the selection + * _alt-&_: align indent, copy the indentation of the main selection + (or the count one if a count is given) to all other ones + * _`_: to lower case * _~_: to upper 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. 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 -------------- @@ -380,14 +387,14 @@ Commands are entered using +:+. * +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 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 shell command. 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 paremeters as if they were entered in the command prompt. By default, 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 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. * +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 . * +show_matching+: highlight matching char of the character under the selections - last char using +MatchingChar+ color alias. + cursor using +MatchingChar+ color alias. Shared Highlighters ~~~~~~~~~~~~~~~~~~~ @@ -684,11 +691,11 @@ afterward. there are some builtins color aliases: * +PrimarySelection+: main selection color for every selected character except - the last one + the cursor * +SecondarySelection+: secondary selection color for every selected character - except the last one - * +PrimaryCursor+: last character of the primary selection - * +SecondaryCursor+: last character of the secondary selection + except the cursor + * +PrimaryCursor+: cursor of the primary selection + * +SecondaryCursor+: cursor of the secondary selection * +LineNumbers+: colors used by the number_lines highlighter * +MenuForeground+: colors for the selected element 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. 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_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 Using shell expansion permits to define complex commands or to access -kakoune state: +Kakoune state: ------------------------------------------------------ :def print_selection %{ echo %sh{ ${kak_selection} } }