Skip to content

Commit

Permalink
Doc (#76)
Browse files Browse the repository at this point in the history
Co-authored-by: tianshu <[email protected]>
  • Loading branch information
DogLooksGood and tianshu authored Nov 28, 2021
1 parent 5a8a6dd commit 821b986
Show file tree
Hide file tree
Showing 20 changed files with 1,184 additions and 1,497 deletions.
285 changes: 285 additions & 0 deletions COMMANDS.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,285 @@
#+title: COMMANDS

All commands used in NORMAL state

* Movements

More than half of commands are about movement, they can be classified into 4 groups.

** CHAR & WORD movement
Char & Word movement have explicit direction.
Current selection's direction will always be ignored.

*** meow-left

Move cursor left.

*** meow-left-expand

Selection type: ~expand char~

Move cursor left and select, the selection can be expand by other char movements.

*** meow-right

Move cursor right.

*** meow-right-expand

Selection type: ~expand char~

Move cursor right and select, the selection can be expand by other char movements.

*** meow-prev

Move cursor to previous line.

*** meow-prev-expand

Selection type: ~expand char~

Move cursor prev and select, the selection can be expand by other char movements.

*** meow-next

Move cursor to next line.

*** meow-next-expand

Selection type: ~expand char~

Move cursor next and select, the selection can be expand by other char movements.

*** meow-mark-word

Selection Type: ~expand word~

Select current word(from its beginning to end), push the content into ~regexp-search-ring~.

*** meow-mark-symbol

Selection Type: ~expand word~

Select current symbol(from its beginning to end), push the content into ~regexp-search-ring~.

*** meow-next-word

Selection Type: ~no-expand word~

Select to the back of next word.

*** meow-back-word

Selection type: ~no-expand word~

Select to the front of previous word.

*** meow-next-symbol

Selection Type: ~no-expand word~

Select to the back of next symbol.

*** meow-back-symbol

Selection type: ~no-expand word~

Select to the front of previous symbol.

** common movements
For command in these group, reverse movement can be done with negative argument.
Command will respect the direction if current selection has the same selection type(e.g. ~line~ vs ~line~)

*** meow-expand-N

*N*: number from 0 to 9.

After each movement(except char movement), further position hint will be displayed inline.
Use this command to expand quickly.

*** meow-visit

Selection type: ~no-expand visit~

Read the text from minibuffer, search and select.
The input will be pushed into ~regexp-search-ring~.

The search should be a regexp, by default the list will be displayed as sanitized text.
If you preper to see them in regexp format, ~(setq meow-visit-sanitize-completion nil)~.

*** meow-search

Selection type: ~no-expand visit~

Search and select with the head of current ~regexp-search-ring~.

*** meow-line

Selection type: ~expand line~

Select current line.

*** meow-block

Selection type: ~expand block~

Select current block. Block means a matched parens(usually ~(...)~, ~[...]~ or ~{...}~).

*** meow-to-block

Selection type: ~expand block~

Select from current point, to the next block.

*** meow-find

Selection type: ~no-expand find~

Select from current point, to the back of a specific character.

*** meow-till

Selection type: ~no-expand till~

Select from current point, to the front of a specific charater.

*** meow-join

Selection type: ~expand join~

Select from previous non-empty line's end to this line's indentation.

** thing-based selection

These commands are thing-based, each commands will prompt you a single key input.

Selection type: ~transient~, means no way to expand.

| thing | key |
|--------------+-----|
| round paren | r |
| square paren | s |
| curly paren | c |
| string | g |
| paragraph | p |
| line | l |
| defun | d |
| buffer | b |

*** meow-inner-of-thing
Select the inner part of thing. e.g. A Lisp expression without parentheses.

*** meow-bounds-of-thing
Select the whole thing.

*** meow-beginning-of-thing
Select from current point to the beginning of thing.

*** meow-end-of-thing
Select from current point to the end of thing.

* Other Commands

** toggle state

*** meow-insert

Switch to INSERT state at the beginning of region

*** meow-append

Switch to INSERT state at the end of region

*** meow-change

Delete current region and switch to INSERT state. When exit from INSERT state, inserted content will be selected.

This command support fallback behaviour, default to ~meow-change-char~.

*** meow-change-char

Delete current character and switch to INSERT state.

*** meow-open-above

Insert a new line above, switch to INSERT state at that line.

*** meow-open-below

Insert a new line below, switch to INSERT state at that line.

** modification

*** meow-kill

Kill current region.

This command support fallback behaviour, default to ~meow-C-k~.

*** meow-C-k

Call the command on ~C-k~.

*** meow-C-d (meow-delete)

Call the command on ~C-d~.

*** meow-save

Copy.

This command support fallback behaviour.

*** meow-yank

Yank.

*** meow-replace

Replace current region with current kill.

This command support fallback behaviour.

** other commands

*** meow-cancel-selection

Cancel selection.

This command support fallback behaviour, default to ~keyboard-quit~.

*** meow-reverse

Reverse current selection.

This command support fallback behaviour.

*** meow-undo

Undo. Unlike built-in, this command will always cancel selection.

*** meow-undo-in-selection

Undo in current selection.

*** meow-pop-selection

Pop one selection

This command support fallback behaviour, default to ~meow-pop-grab~.

*** meow-grab

Turn current selection into secondary selection.

*** meow-sync-grab

Sync secondary selection with current selection.

*** meow-swap-grab

Swap secondary selection with current selection.

*** meow-pop-grab

Pop secondary selection.
Loading

0 comments on commit 821b986

Please sign in to comment.