readme: Finalize marking rationale

This commit is contained in:
Pierre Neidhardt 2018-02-24 15:42:28 +01:00
parent 114b2ae5fc
commit 09fade374c
1 changed files with 14 additions and 18 deletions

View File

@ -171,7 +171,7 @@ The rules are more-or-less sorted by priority.
- ~.~ - ~.~
** Rationale (Work in progress) ** Rationale
Many special modes share the same set of similar actions. Those actions should Many special modes share the same set of similar actions. Those actions should
share the same bindings across all modes whenever feasible. share the same bindings across all modes whenever feasible.
@ -242,36 +242,32 @@ not seem to be any existing use of it, we leave the binding free for other uses.
*** Marking *** Marking
Emacs inconsistently uses ~u~ and ~U~ to unmark. Since in Vim those keys are
usually bound to "undo", they are probably best left to commands that undo
actions in the buffer and not undo marks.
~m~ defaults to ~evil-set-marker~ which might not be very useful in special ~m~ defaults to ~evil-set-marker~ which might not be very useful in special
modes. This is somewhat debatable though. modes.
~'~ can still be used as it can jump to other buffers.
Suggested mark bindings:
- ~m~: Mark or toggle mark, depending on what the mode offers. - ~m~: Mark or toggle mark, depending on what the mode offers.
In visual mode, always mark.
With a numeric argument, toggle mark on that many following lines.
- ~u~: Unmark current selection.
- ~U~: Unmark all.
- =~=: Toggle all marks. This mirrors the "invert-char" Vim command bound to =~= - =~=: Toggle all marks. This mirrors the "invert-char" Vim command bound to =~=
by default. by default.
- ~M~: Remove all marks. - ~M~: Mark all, if available. Otherwise use =U~=.
- ~*~: Mark-prefix or mark all if current mode has no prefix. ~*~ is traditionally a wildcard.
- ~%~: Mark regexp. - ~%~: Mark regexp.
- ~x~: Execute action on marks. This mirrors Dired's binding of ~x~. - ~x~: Execute action on marks. This mirrors Dired's binding of ~x~.
While ~m~ won't be available for setting marks (in the Vim sense), ~'~ can still If ~*~ is used for marking, then ~#~ is free.
be used as it can jump to other buffers.
Optionally: Also note that Emacs inconsistently uses ~u~ and ~U~ to unmark.
- ~*~: Mark all, because ~*~ is traditionally a wild card.
- ~#~: Remove mark. This is useful when we want to unmark a region having both
marked and unmarked entries. But ~M~ could also be made to remove all marks on
region, making this binding useless.
*** Selecting / Filtering / Narrowing / Searching *** Selecting / Filtering / Narrowing / Searching