mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-22 22:55:26 +03:00
48 lines
1.4 KiB
Plaintext
48 lines
1.4 KiB
Plaintext
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).
|
|
|
|
delete a word:
|
|
* vim: dw
|
|
* kak: wd
|
|
|
|
delete a character:
|
|
* vim: x
|
|
* kak: d or <space>d
|
|
|
|
copy a line:
|
|
* vim: yy
|
|
* kak: xy
|
|
|
|
global replace:
|
|
* vim: :%s/word/replacement<ret>
|
|
* kak: %sword<ret>creplacement<esc>
|
|
|
|
join line with next:
|
|
* vim: J
|
|
* kak: alt-J
|
|
|
|
delete to line end:
|
|
* vim: d$
|
|
* kak: alt-ld or gld
|
|
|
|
some classic vim moves are not bound to the same key, this is due to Kakoune
|
|
using shifted moves to append to selection, so moves that were bound to non
|
|
alphabetic chars had to change.
|
|
|
|
* % become m (for matching), however m will replace selection with the next
|
|
block, if you want to get a selection from current point to next block end,
|
|
you should use <space>M (<space> clears the trim to one character)
|
|
|
|
* 0 and $ became alt-h and alt-l. Another binding is gh and gl.
|
|
|
|
:[gv]/re/cmd
|
|
to emulate :g or :v, use % to select the whole buffer, alt-s to get
|
|
one selection by line, and then alt-k or alt-K in order to keep only the
|
|
selections matching (or not matching) the entered regex.
|