Skip to content

Latest commit

 

History

History
240 lines (152 loc) · 4.99 KB

CUSTOMIZATIONS.org

File metadata and controls

240 lines (152 loc) · 4.99 KB

CUSTOMIZATIONS

Helper Functions

meow-normal-define-key

Define key in NORMAL state.

(meow-normal-define-key
 ;; bind command
 '("a" . meow-append)
 ;; bind keymap
 (cons "h" help-map)
 ;; bind key translation
 '("x" . "C-x C-x")
 ...)

meow-leader-define-key

Like meow-normal-define-key, but for leader keymap.

The default keybindings in leader keymap:

  • x, c, h, m and g is bound to meow-keypad-start, which can start KEYPAD state.
  • SPC will execute the original command which bound to SPC.

meow-motion-overwrite-define-key

Use like meow-motion-overwrite-define-key. Meow will remap overwrited command to a keybinding with HYPER modifier.

For example, if you define j as C-N , the original command on j will be bound to H-j.

meow-setup-indicator

A helper function that puts an indicator at the beginning of mode-line. If you want customize mode-line by hand, see `meow-indicator`.

Example usage:

(meow-setup-indicator)

meow-indicator

Return an indicator string that you can use in your `mode-line-format`.

Example usage:

(setq-default mode-line-format '((:eval (meow-indicator)) ...))

meow-thing-register

Register a thing which can be used for meow-beginning/end/inner/bounds-of-thing. To bind it to a key, check variable meow-char-thing-table.

Check function’s documentation for usage examples.

Variables

meow-mode-state-list

Default:

((fundamental-mode . normal)
 (text-mode . normal)
 (prog-mode . normal)
 (conf-mode . normal)
 (json-mode . normal)
 ...)

A list of rules to specify the initial Meow state for major mode.

Value should be a list, each item is (major-mode . init-state). The init-state can only be motion or normal.

By Default, Meow will use motion for special modes, and normal for other modes.

meow-expand-exclude-mode-list

Default: (markdown-mode org-mode)

A list of major modes where expand feature should be disabled.

The expand feature use overlay for display, and it may not work well with texts with inconsistent sizes.

meow-expand-hint-counts

Default:

((word . 30)
 (line . 30)
 (block . 30)
 (find . 30)
 (till . 30))

The maximum numbers for expand hints of each type.

meow-expand-hint-remove-delay

Default: 1.0

The delay before the position hint disappears.

meow-selection-command-fallback

Default:

((meow-change . meow-change-char)
 (meow-kill . meow-C-k)
 (meow-cancel-selection . keyboard-quit)
 (meow-pop-selection . meow-pop-grab)
 (meow-beacon-change . meow-beacon-change-char))

Fallback behaviours for selection-only commands when there’s no selection.

meow-keypad-message

Default: t

Whether to log keypad messages in minibuffer.

meow-char-thing-table

Default:

((?r . round)
 (?s . square)
 (?c . curly)
 (?g . string)
 (?e . symbol)
 (?w . window)
 (?b . buffer)
 (?p . paragraph)
 (?l . line)
 (?d . defun)
 (?. . sentence))

Mapping from char to thing.

Used by meow-beginning-of-thing, meow-end-of-thing, meow-inner-of-thing and meow-bounds-of-thing.

meow-replace-state-name-list

Default:

((normal . "NORMAL")
 (motion . "MOTION")
 (keypad . "KEYPAD")
 (insert . "INSERT")
 (beacon . "BEACON"))

A list of mappings for how state is displayed in modeline indicator.

meow-display-thing-help

Default: t

Whether to display the help prompt for meow-inner/bounds/begin/end-of-thing.

meow-keypad-describe-delay

Default: 0.5

The delay in seconds before popup keybinding descriptions appear.

meow-grab-fill-commands

Default: (meow-query-replace meow-query-replace-regexp)

A list of commands that meow will auto fill with grabbed content.

meow-visit-collect-min-length

Default: 1

Minimal length when collecting symbols for meow-visit.

meow-visit-sanitize-completion

Default: t

Whether let meow-visit display symbol regexps in a sanitized format.

meow-use-clipboard

Default: nil

Whether to use system clipboard. Not recommended.

meow-use-keypad-when-execute-kbd

Default: t

Whether to use KEYPAD when the result of executing kbd string is a keymap.

meow-keypad-meta-prefix

Default: ?m

The prefix represent M- in KEYPAD state.

meow-keypad-ctrl-meta-prefix

Default: ?g

The prefix represent C-M- in KEYPAD state.

meow-keypad-literal-prefix

Default: 32 (SPC character)

The prefix represent no modifier in KEYPAD state.

meow-expand-selection-type

Default: select

The type of selection activated by meow-expand-* commands.

meow-motion-remap-prefix

Default: “H-”

The prefix string used when remapping an occupied key in MOTION state.

For examples:

"C-x C-v" will remap the occupied j to C-x C-v j.
"C-M-" will remap the occupied j to C-M-j.