meow-edit / meow

Yet another modal editing on Emacs / 猫态编辑
GNU General Public License v3.0
1.09k stars 127 forks source link

Example Wording Beacon #459

Open jgarte opened 1 year ago

jgarte commented 1 year ago

Hi, does this example need F3 and F4 in order to work?

https://github.com/meow-edit/meow/blob/master/meow-tutor.el#L534

The wording is a bit confusing because it doesn't mention using F3 and F4 in the 8 steps but I think it is needed:

 1. Move the cursor to the line below marked -->
 2. Select the whole symbol with [meow-mark-symbol]
 3. Press [meow-grab] to activate secondary selection
 4. Press [negative-argument] [meow-find] and - to backward search for
    character -, will create fake cursor at each -
 5. Meow will start recording. Press [meow-change] to switch to Insert mode
    (character under current cursor is deleted)
 6. type _
 7. Press ESC to go back to NORMAL, then the macro will
    be applied to all fake cursors.
 8. Press [meow-grab] again to cancel the grab

 --> x-y-foo-bar-baz
     x_y_foo_bar_baz
DogLooksGood commented 1 year ago

No, you don't in this case.

jgarte commented 1 year ago

No, you don't in this case.

Hmmm, in that case it doesn't seem to be working for me. It only works if I use F3/F4 but this feels like too much work.

I'll try again and report back if anything changes.

jgarte commented 1 year ago

These are the exact sequence of commands that I ran according to keycast-mode (I'm using a qwerty layout where the f key is assign to meow-find):

meow-line meow-grab meow-find (- f -) meow-beacon-change self-insert-command meow-insert-exit

On this line:

'emacs-update-environment-variables-on-sway-start

But I end up only with this:

'emacs-update-environment-variables-on-sway_start

🦆

DogLooksGood commented 1 year ago

Screencast from 2023-05-14 08-46-22.webm

jgarte commented 1 year ago

Does this meow config look buggy at all?

        (defun meow-setup ()
          (setq meow-cheatsheet-layout meow-cheatsheet-layout-qwerty)
          (meow-motion-overwrite-define-key
           '("j" . meow-next)
           '("k" . meow-prev)
           '("<escape>" . ignore))

          (meow-leader-define-key
           ;; SPC j/k will run the original command in MOTION state.
           '("j" . "H-j")
           '("k" . "H-k")
           ;; Use SPC (0-9) for digit arguments.
           '("1" . meow-digit-argument)
           '("2" . meow-digit-argument)
           '("3" . meow-digit-argument)
           '("4" . meow-digit-argument)
           '("5" . meow-digit-argument)
           '("6" . meow-digit-argument)
           '("7" . meow-digit-argument)
           '("8" . meow-digit-argument)
           '("9" . meow-digit-argument)
           '("0" . meow-digit-argument)
           '("/" . meow-keypad-describe-key)
           '("?" . meow-cheatsheet))

          (meow-normal-define-key
           '("0" . meow-expand-0)
           '("9" . meow-expand-9)
           '("8" . meow-expand-8)
           '("7" . meow-expand-7)
           '("6" . meow-expand-6)
           '("5" . meow-expand-5)
           '("4" . meow-expand-4)
           '("3" . meow-expand-3)
           '("2" . meow-expand-2)
           '("1" . meow-expand-1)
           '("-" . negative-argument)
           '(";" . meow-reverse)
           '("," . meow-inner-of-thing)
           '("." . meow-bounds-of-thing)
           '("[" . meow-beginning-of-thing)
           '("]" . meow-end-of-thing)
           '("a" . meow-append)
           '("A" . meow-open-below)
           '("b" . meow-back-word)
           '("B" . meow-back-symbol)
           '("c" . meow-change)
           '("d" . meow-delete)
           '("D" . meow-backward-delete)
           '("e" . meow-next-word)
           '("E" . meow-next-symbol)
           '("f" . meow-find)
           '("=" . meow-till)
           '("g" . meow-cancel-selection)
           '("G" . meow-grab)
           '("h" . meow-left)
           '("H" . meow-left-expand)
           '("i" . meow-insert)
           '("I" . meow-open-above)
           '("j" . meow-next)
           '("J" . meow-next-expand)
           '("k" . meow-prev)
           '("K" . meow-prev-expand)
           '("l" . meow-right)
           '("L" . meow-right-expand)
           '("m" . meow-join)
           '("n" . meow-search)
           '("o" . meow-block)
           '("O" . meow-to-block)
           '("p" . meow-yank)
           '("q" . meow-quit)
           '("Q" . meow-goto-line)
           '("r" . meow-replace)
           '("R" . meow-swap-grab)
           '("s" . meow-kill)
           '("u" . meow-undo)
           '("U" . meow-undo-in-selection)
           '("v" . meow-visit)
           '("w" . meow-mark-word)
           '("W" . meow-mark-symbol)
           '("x" . meow-line)
           '("X" . meow-goto-line)
           '("y" . meow-save)
           '("Y" . meow-sync-grab)
           '("z" . meow-pop-selection)
           '("'" . repeat)
           '("<escape>" . ignore))

          ;; misc keys
          (meow-normal-define-key
           '("`" . shell-command+)
           '("/" . avy-goto-word-1)
           '("t" . xref-find-definitions)
           '("T" . xref-go-back)
           '("<escape>" . ignore)))

        (setq meow-paren-keymap (make-keymap))
        (meow-define-state paren
                           "paren state"
                           :lighter " [P]"
                           :keymap meow-paren-keymap)
        (setq meow-cursor-type-paren 'hollow)
        (meow-define-keys 'paren
                          '("<escape>" . meow-normal-mode)
                          '("r" . sp-raise-sexp))

        (require 'meow)
        (setq meow-expand-hint-remove-delay 2.0)
        (meow-setup)
        (meow-global-mode 1)
DogLooksGood commented 1 year ago

Anything weird found in Messages buffer?

DogLooksGood commented 1 year ago

Anything weird found in Messages buffer?

jgarte commented 1 year ago

Anything weird found in Messages buffer?

Keyboard macro defined
meow--selection-fallback: No selectionPNG warning: iCCP: known incorrect sRGB profile
previous-line: Beginning of buffer

WDYT

I triggered the above with same actions I mentioned above.

jgarte commented 1 year ago

I think I might have figured it out. I'll report with more details tomorrow.