1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-24 20:13:00 +03:00
mawww's experiment for a better code editor
Go to file
2011-11-09 14:06:05 +00:00
src Filters: code cleanup 2011-11-09 14:06:05 +00:00
.gitignore gitignore: ignore tags file 2011-09-09 13:04:02 +00:00
GOALS Initial commit 2011-09-02 16:51:20 +00:00
IDEAS Initial commit 2011-09-02 16:51:20 +00:00
README.asciidoc README: document filters 2011-11-08 14:30:10 +00:00
TODO Add TODO file 2011-11-08 19:03:52 +00:00

Kakoune
=======

Introduction:
-------------

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. 

Building
--------

Kakoune dependencies are:

 * GCC >= 4.6
 * boost
 * ncurses

To build, just type *make* in the src directory

Basic Movement
--------------

 * _space_: select the character under selection end

 * _h_: select the character on the right of selection end
 * _j_: select the character below the selection end
 * _k_: select the character above the selection end
 * _l_: select the character on the left of selection end

 * _w_: select the word and following whitespaces  on the right of selection end 
 * _b_: select preceding whitespaces and the word on the left of selection end
 * _e_: select preceding whitespaces and the word on the right of selection end

 * _x_: select line on which selection end lies
 * _%_: select whole buffer

 * _alt-H_: select to line begin
 * _alt-L_: select to line end

Appending
---------

for most selection commands, using shift permits to add to current selection
instead of replacing it. for example, _wWW_ selects 3 consecutive words

Using Counts
------------

Most selection commands also support counts, which are entered before the
command itself.

for example, _3W_ selects 3 consecutive words and _3w_ select the third word on
the right of selection end.

Changes
-------

 * _i_: insert before current selection
 * _a_: insert after current selection
 * _d_: yank and delete current selection
 * _c_: yank and delete current selection and insert

 * _I_: insert at current selection begin line start
 * _A_: insert at current selection end line end
 * _o_: insert in a new line below current selection end
 * _O_: insert in a new line above current selection begin

 * _p_: paste after current selection end
 * _P_: paste before current selection begin

Filters
-------

Manipulation of the displayed text is done through filters, which can be added or
removed with the command :addfilter <filter_name> <filter_parameters...>

existing filters are:

* *hlcpp*: takes no parameters, highlight c++ code
* *line_numbers*: takes no parameters, display line numbers on the left of the window

Windows also contains two filters by default, which are not currently addable
(but they are removable)

* *show_tabs*: which expand tabs to next 8 multiple column
* *show_selection*: which underlines the current selections