Despite being another modal editing scheme, meow is not very similar to Vim, but instead tends to be more like kakoune.
The primary difference to Vim are that there is no dedicated visual mode in meow, since it’s essentially built into normal mode. Almost every movement in normal mode creates a visual selection on which some command can act on.
The other main difference is that the language grammar you use in Vim is flipped in meow.
In Vim, you might use something like 4w
to move 4 words forward. 4
acts as a quantifier, and w
is the so called “verb.” In meow, we think
about commands the opposite way. We’d first select a single word, with
meow-next-word
(which, critically, both moves the point and creates a
selection), and then press 3
to select three more words. This process
can be indefinitely extended. For example, if you say 2 and 6
afterwards you select another 8 words forward.
Once you have a selection, you can decide to execute an action (“verb”) representing what you want to do on this selection.
In vim, to change (delete and enter insert mode) 3 words, you might
press c3w
. In meow, this would be e3c
since the grammar is inverted.
Meow has the clear advantage that when you create the selection, you get visual feedback on what your target selection is, and then can decide which verb to execute. You can choose to abort if you selected something wrong, or better, revert your selection to make a new one. In Vim on the other hand, you commit on the verb right away, then guess at your selection target (which is harder the more things you want to act on). If you mess up, you have no choice but to undo everything and try again.
Since many people who want to give meow a try, come from a Vim / Evil background, here is an overview of typical Vim keybindings for common actions and how they can be achieved in meow.
Please note that we provide only command names here, this is because meow has no built-in keybind set (yet?). If you decide to use the suggested QWERTY keybindings, you can look up the default binding to each command there.
Vim | Meow | Description |
---|---|---|
h | meow-left | character left |
j | meow-next | next line |
k | meow-prev | previous line |
l | meow-right | character right |
w | meow-next-word | next word |
W | meow-next-symbol | next symbol (as determined by the syntax table) |
b | meow-back-word | last word |
B | meow-back-symbol | last symbol |
e | meow-mark-word | end of word |
E | meow-mark-symbol | end of symbol |
ge | meow-previous-word - 1 - meow-next-word | end of previous word |
gE | meow-previous-symbol - 1 - meow-next-word | end of previous symbol |
0 | negative-argument - meow-line | beginning of line |
0 | meow-line - meow-reverse | beginning of line |
^ | meow-join | first none whitespace character |
$ | meow-line | EOL |
f - <symbol> | meow-find - <symbol> | forward to next symbol |
F - <symbol> | negative argument - meow-find - <symbol> | backward to last symbol |
t - <symbol> | meow-till - <symbol> | till next symbol |
% | meow-block | jump to matching paren; not one to one replacement can jump from anywhere inside the block to end |
; | meow-find / meow-till - <number> | repeat last f or t movement |
C-u | meow-page-up | page up |
C-d | meow-page-down | page down |
gg | meow-beginning-of-thing - b | beginning of file |
G | meow-end-of-thing - b | end of file |
:<num> | meow-goto-line | go to line number |
C-o | last position in jumplist | |
C-i | next position in jumplist |
Vim | Meow | Description |
---|---|---|
/ | meow-visit | forward forward |
? | negative-argument - meow-visit | backward search |
n | meow-search | next match |
p | last match |
Vim | Meow | Description |
---|---|---|
i | meow-insert | insert |
a | meow-append | append (needs (setq meow-use-cursor-position-hack t) ) |
I | meow-join - meow-append | insert before first character in line |
A | meow-line - meow-insert | append end of line |
o | meow-open-below | insert into line beneath |
O | meow-open-above | insert into line above |
Vim | Meow | Description |
---|---|---|
c <num> <noun> | <noun> <num> meow-change | change |
r <char> | replace a single character and go back to normal mode |
Vim | Meow | Description |
---|---|---|
. | meow-repeat | repeat last command |
~ (on lowercase) | C-x C-u (upcase-region) | uppercase char under cursor |
~ (on uppercase) | C-x C-l (downcase-region) | lowercase char under cursor |
C-x | Not implemented see here | decrement number under cursor. |
C-a | Not implemented see here | increment number under cursor |
gUw | meow-word C-x C-u | uppercase word (works with all nouns) |
guw | meow-word C-x C-l | lowercase word (works with all nouns) |
x | meow-delete | delete under cursor |
D | meow-kill | delete to end of line |
dd | meow-line - meow-kill | delete line |
d <num> <noun> | <noun> <num> meow-kill | |
u | meow-undo | undo |
C-r | meow-cancel - meow-undo | redo; Emacs has a different undo system with a stack, so to undo the undo, you do some action which has no effect and afterwards meow-undo works in the other way |
Vim uses registers to store macros. Meow only has a key to start a macro and afterwards play it. When a new macro is recorded the old one will be overridden. The reason is that meow just wraps the default Emacs Macro behavior.
If you want to store more than macro you can store the last recorded macro under a name with the kmacro-name-last-macro
command. You can afterwards execute that command from the M-x
menu.
Vim | Meow | Description |
---|---|---|
q <register> | meow-start-kmacro-or-insert-counter | start a macro |
q | meow-end-or-call-kmacro | stop a macro |
@ <register> | meow-end-or-call-kmacro | play a macro |
Except for some cases, namely meow-word
, meow-line
and meow-block
,
meow generalizes the idea of selection in and around “things”. You may
select inside any “thing” by first calling meow-inner-of-thing
and
then following the onscreen prompts. Meow makes it easy to define your
own “things” as well, all it takes is a pair of regular expressions!
Vim | Meow | Description |
---|---|---|
<action> iw | meow-mark-word <action> | current word |
<action> iW | meow-mark-symbol <action> | current symbol |
<action> i[ | meow-inner-of-thing <action> | inside square brackets) |
<action> ci[ | meow-bounds-of-thing <action> | around square brackets) |
Generally there is no mode in meow similar to command mode. But there is Keypad Mode (entered with space) which let’s you execute normal emacs commands without holding modifier keys. Many things done in command mode can be achieved via this mode and some common and useful examples are given here.
Vim | Meow | Description |
---|---|---|
:w | SPC x s | (save buffer) |
:qa | SPC m x “kill-emacs” | close vim / emacs |
:wq | SPC x c | save and close emacs |
Vim | Meow | Description |
---|---|---|
commentary.vim | meow-comment | |
vim-surround | ? |