Less is more
Document still WIP.
- Semantic but still effective layout on Dvorak and Colemak. Not only care about positions for single keys, but also for frequently used key sequences.
- A complete modal editing plays well with special modes, like dired, etc. Never pay for compatibility.
- Combine navigation and selection, rarely use a command to activate selection.
- Use kbd macros when calling underlying commands, drop-in replacement will work out-of-box.
- A
keypad
state allows you execute commands from C-x and C-c keymaps without modifiers.
If you use package.el, clone this repo, make sure dash, cl-lib is available in your Emacs.
In project directory:
make test
Coming soon.
(use-package rime
:quelpa (rime :fetcher github
:repo "DogLooksGood/meow")
:config
(meow-global-mode 1))
(use-package rime
:straight (rime :type git
:host github
:repo "DogLooksGood/meow")
:config
(meow-global-mode 1))
Just vanilla Emacs, the only difference is that you can switch to NORMAL
state with ESC.
Default state for text editing buffers.
Cheatsheet on Dvorak
Cheatsheet on Colemak
Press key with Shift to use the command in parentheses. e.g. b is block
and B is page down
.
Use -, ' and 0 to 9.
With i, a, o, x.
The Concept: Meow steals the idea from kakoune, except h/t/p/n, every navigation command will mark something. And you can enter INSERT
state at beginning of region with i or at end of region with a or use r to reverse the direction of selection.
Benefits:
- By one navigation, you get two position, both of them are pretty meaningful.
- Make it much easier to quick mark something before copy or kill.
Simple
Use h (Head, left), t (Tail, right), p (Prev), n (Next) for single char navigation.
These commands will cancel all selection except those with char
type, and use with Shift will activate selection with char
type.
Word
Use m (Mark or Back Word) to mark current word with selection type word-mark
.
When selection type is word-mark
, m will move to the previous word.
Use w (Forward Word) to mark the next word with selection type word
.
When selection type is word-mark
, w will expand selection by word and change selection type to word-expand
, this type of selection will be cancelled by m.
Line
Use l (Line) to mark the whole line with selection type line
.
When selection type is line
, l will expand selection by line.
Block
Use b (Block) to expand selection to current block. By default the block is identified with a pair of parentheses. This is useful in Lisp dialects. However languages like python, haskell don't wrap everything with parentheses, so there's a fallback behavior which identify block with indentation.
Press b multiple times will expand the region. Expanding will stop at top-level form, so hold b to mark the whole top-level block.
b will also work in string or comment.
Exp
Use e (Exp) to mark current sexp with selection type exp
.
When selection type is exp
, e will mark the next one. During the movement, cursor will not escape from the current block, if current sexp is the last sexp in this block, e will reverse the direction of selection.
Flip
Use f (Flip) to make a selection from current point(as mark) to the end of furthest sexp in current line or current block.
Press again will firstly back to the mark, then do the same to another direction.
Use k to kill region.
Use d to delete char.
Use j to join current line to the previous line.
Use z to shrink multiple whitespaces into one, if there's a region, it will be deleted first.
Use x to kill region then switch to INSERT
state.
u (Undo) undo the changes, but will only pop to the previous selection when region is active.
Default state for special-mode buffers. There are only two additional bindings in MOTION
state.
SPC is used as LEADER
key, the original command on SPC is bound to SPC SPC.
ESC is used to switch to previous buffer.
This is inspired by god-mode. You can activate KEYPAD
state with SPC x or SPC c in NORMAL
and MOTION
state.
In this state, every single key is considered with Control, x means C-x; If you want a single x, use SPC x; If you want a M-x, use m x.
To call a command on C-c M-j, use SPC c m j.
To call a command on C-c C-x RET, use SPC c x SPC RET. If there's no command on C-c C-x C-RET, it is okay to omit the second SPC, just use SPC c x RET.
Use meow-leader-define-key
and meow-leader-define-mode-key
to customize leader keymap.
;; Put these in the :config section in use-package
(meow-leader-define-key
'("k" . kill-buffer)
'("l" . goto-line)
'("h" . other-window)
'("o" . delete-other-windows)
'("-" . split-window-below)
'("/" . swiper)
'("\\" . split-window-right)
'("m" . magit-status)
'("f" . find-file)
'("F" . find-file-literally))
(meow-leader-define-mode-key
'emacs-lisp-mode
'("RET" . eval-buffer)
'("SPC" . eval-defun))
License under GPL v3.