update VIMTOKAK

This commit is contained in:
Maxime Coste 2013-12-24 01:46:08 +00:00
parent 22102951e2
commit 10fb96011e

View File

@ -1,11 +1,16 @@
Vi(m) to Kakoune:
=================
Most operations in Kakoune are reversed compared to Vim: In kak, you first
select the text you want to act on, then you edit it. This way, things are
much more consistent, as for example, kak does not need a key for delete
character, the delete key handles this just fine as long as you did not
select more than a character (but clearing selection is only one space away).
Kakoune is inspired heavily by Vim, it strives to be as efficient as Vim,
more consistent and simpler. A big differences is that a lot of special
features in Vim just become regular interaction of basic features in
Kakoune.
Operations and moves are reversed in Kakoune. First select whatever text
you want to operate on, and then use an modifying operation. That makes
things more consistent (Vim needs a separate x and d operation because
of the operator -> move order, Kakoune only needs the d operation). That
also allows more complex selections.
delete a word:
* vim: dw
@ -23,6 +28,22 @@ global replace:
* vim: :%s/word/replacement<ret>
* kak: %sword<ret>creplacement<esc>
Explanation: '%' selects the entire buffer, 's' opens a prompt for a
regex, <ret> validates the regex and replace the selection with one
per matches (hence, all occurences of word are selected). 'c' deletes
the selection contents and enter insert mode, replacement is typed
and <esc> goes back to normal mode.
Note that the Kakoune version is one key less, and is not a special
feature per se, but just a nice way Kakoune features work together.
replace in current curly braces block:
* vim: viB:s/word/replacement<ret>
* kak: <a-i>Bsword<ret>creplacement<esc>
Here again, we need to rely on another Vim special feature, visual
mode.
join line with next:
* vim: J
* kak: alt-J