Coder Social home page Coder Social logo

Cursors stop moving about evil-mc HOT 16 CLOSED

gabesoft avatar gabesoft commented on August 21, 2024
Cursors stop moving

from evil-mc.

Comments (16)

gabesoft avatar gabesoft commented on August 21, 2024

Are you using evil-local-mode, if so this could be the same problem as #5. I think it's fixed in the latest version (not on melpa yet).

from evil-mc.

halbtuerke avatar halbtuerke commented on August 21, 2024

No, I'm activating evil-mode via (evil-mode t) in my config, so it should not be using evil-local-mode.

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

I see. It could still be related though. I think it's some loading issue. I'm still working on it. But, just to get going if you do a C-h f evil-mc-execute-for and then in open the file that you see in the doc evil-mc-command-execute.el and eval it, then the cursors should start working.

from evil-mc.

halbtuerke avatar halbtuerke commented on August 21, 2024

Yes, this makes all the cursors move.

What does not seem to work is highlighting and then deleting something with d. Also highlighting and changing with c does not seem to work. dw and cw also do not work. Is this expected behavior?

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

No, there's definitely something wrong. I'm not sure what yet. It's quite strange because the tests pass. I still think it's some loading issue but I have to investigate more.

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

I think this is fixed on master. At least it was working fine for me in a sandbox. But melpa hasn't been updated for a while so you should try the github version if possible. .

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

This is still not fixed. The cursors work fine when loading the files directly, but not when using the compiled version from melpa.

from evil-mc.

halbtuerke avatar halbtuerke commented on August 21, 2024

I'm using the following code snippet to load and configure evil-mc and the cursor movement works:

(use-package evil-mc
    :load-path "~/.emacs.d/non-elpa/evil-mc"
    :config
    (global-evil-mc-mode 1))

What still does not work e.g. is using d or something likedw.

The use-package macro expands to the following:

(progn
    (eval-and-compile
      (push "~/.emacs.d/non-elpa/evil-mc" load-path))
    (if
        (not
         (require 'evil-mc nil 'noerror))
        (ignore
         (message
          (format "Could not load %s" 'evil-mc)))
      (condition-case-unless-debug err
          (global-evil-mc-mode 1)
        (error
         (ignore
          (display-warning 'use-package
                           (format "%s %s: %s" "evil-mc" ":config"
                                   (error-message-string err))
                           :error))))
      t))

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

Ok, so if you load it that way it should work. That's how I load it. It's strange that delete doesn't work. Do you get any errors at all?

from evil-mc.

halbtuerke avatar halbtuerke commented on August 21, 2024

No, there aren't any errors. Here's a log:

evil-mc Created 3 cursors matching "\_<some\_>"
evil-mc Command evil-backward-word-begin b
evil-mc Record-begin ((:undo-list-pointer-pre nil (1 . 78) (t . 0)) (:evil-state-begin . normal) (:keys-pre-with-count nil evil-backward-word-begin [98] nil) (:keys-pre . [98]) (:name . evil-backward-word-begin))
evil-mc Record-finish ((:undo-list-pointer-post nil (1 . 78) (t . 0)) (:keys-post-raw . [98]) (:keys-post . [98]) (:last-input . 98) (:evil-state-end . normal) (:undo-list-pointer-pre nil (1 . 78) (t . 0)) (:evil-state-begin . normal) (:keys-pre-with-count nil evil-backward-word-begin [98] nil) (:keys-pre . [98]) (:name . evil-backward-word-begin)) evil-backward-word-begin
evil-mc Record-done evil-backward-word-begin pre b post b keys-motion  keys-operator  count nil keys b
evil-mc Execute evil-backward-word-begin for all cursors
evil-mc Execute evil-backward-word-begin with evil-mc-execute-default-call-with-count [2 times]
evil-mc Command evil-backward-word-begin b
evil-mc Record-begin ((:undo-list-pointer-pre nil (1 . 78) (t . 0)) (:evil-state-begin . normal) (:keys-pre-with-count nil evil-backward-word-begin [98] nil) (:keys-pre . [98]) (:name . evil-backward-word-begin))
evil-mc Record-finish ((:undo-list-pointer-post nil (1 . 78) (t . 0)) (:keys-post-raw . [98]) (:keys-post . [98]) (:last-input . 98) (:evil-state-end . normal) (:undo-list-pointer-pre nil (1 . 78) (t . 0)) (:evil-state-begin . normal) (:keys-pre-with-count nil evil-backward-word-begin [98] nil) (:keys-pre . [98]) (:name . evil-backward-word-begin)) evil-backward-word-begin
evil-mc Record-done evil-backward-word-begin pre b post b keys-motion  keys-operator  count nil keys b
evil-mc Execute evil-backward-word-begin for all cursors
evil-mc Execute evil-backward-word-begin with evil-mc-execute-default-call-with-count [2 times]
evil-mc Command evil-forward-word-begin w
evil-mc Record-begin ((:undo-list-pointer-pre nil (1 . 78) (t . 0)) (:evil-state-begin . normal) (:keys-pre-with-count nil evil-forward-word-begin [119] nil) (:keys-pre . [119]) (:name . evil-forward-word-begin))
evil-mc Record-finish ((:undo-list-pointer-post nil (1 . 78) (t . 0)) (:keys-post-raw . [119]) (:keys-post . [119]) (:last-input . 119) (:evil-state-end . normal) (:undo-list-pointer-pre nil (1 . 78) (t . 0)) (:evil-state-begin . normal) (:keys-pre-with-count nil evil-forward-word-begin [119] nil) (:keys-pre . [119]) (:name . evil-forward-word-begin)) evil-forward-word-begin
evil-mc Record-done evil-forward-word-begin pre w post w keys-motion  keys-operator  count nil keys w
evil-mc Execute evil-forward-word-begin for all cursors
evil-mc Execute evil-forward-word-begin with evil-mc-execute-default-call-with-count [2 times]
evil-mc Command evil-visual-char v
evil-mc Record-begin ((:undo-list-pointer-pre nil (1 . 78) (t . 0)) (:evil-state-begin . normal) (:keys-pre-with-count nil evil-visual-char [118] nil) (:keys-pre . [118]) (:name . evil-visual-char))
evil-mc Record-finish ((:undo-list-pointer-post nil (1 . 78) (t . 0)) (:keys-post-raw . [118]) (:keys-post . [118]) (:last-input . 118) (:evil-state-end . visual) (:undo-list-pointer-pre nil (1 . 78) (t . 0)) (:evil-state-begin . normal) (:keys-pre-with-count nil evil-visual-char [118] nil) (:keys-pre . [118]) (:name . evil-visual-char)) evil-visual-char
evil-mc Record-done evil-visual-char pre v post v keys-motion  keys-operator  count nil keys v
evil-mc Execute evil-visual-char for all cursors
evil-mc Execute evil-visual-char with evil-mc-execute-visual-char [2 times]
evil-mc Command evil-forward-word-end e
evil-mc Record-begin ((:undo-list-pointer-pre nil (1 . 78) (t . 0)) (:evil-state-begin . visual) (:keys-pre-with-count nil evil-forward-word-end [101] nil) (:keys-pre . [101]) (:name . evil-forward-word-end))
evil-mc Record-finish ((:undo-list-pointer-post nil (1 . 78) (t . 0)) (:keys-post-raw . [101]) (:keys-post . [101]) (:last-input . 101) (:evil-state-end . visual) (:undo-list-pointer-pre nil (1 . 78) (t . 0)) (:evil-state-begin . visual) (:keys-pre-with-count nil evil-forward-word-end [101] nil) (:keys-pre . [101]) (:name . evil-forward-word-end)) evil-forward-word-end
evil-mc Record-done evil-forward-word-end pre e post e keys-motion  keys-operator  count nil keys e
evil-mc Execute evil-forward-word-end for all cursors
evil-mc Execute evil-forward-word-end with evil-mc-execute-visual-call-with-count [2 times]
evil-mc Command evil-cp-delete d [2 times]

I have 3 cursors but after pressing d only the selection of the "main" cursor gets deleted.

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

I think it's because when pressing d it's trying to run evil-cp-delete which I think it's coming from evil-cleverparens. Try disabling that mode temporarily just to see if that fixes it.

from evil-mc.

halbtuerke avatar halbtuerke commented on August 21, 2024

👍

That's it. Disabling evil-cleverparens solved the issue.

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

OK, I'll probably add evil-cleverparens to the incompatible modes so that it gets disabled automatically whenever there are active cursors.

from evil-mc.

bmag avatar bmag commented on August 21, 2024

@gabesoft I'd like to use evil-cleverparens together with evil-mc. What will it take to make them work together, and how can I help?
Basically evil-cleverparens replaces some evil commands with evil-cp commands, e.g. evil-cp-delete replaces evil-delete, so would using for evil-cp the same handler for the equivalent original evil command be enough? (e.g. using evil-mc-execute-default-evil-delete handler for evil-cp-delete)

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

Yes I think adding all relevant evil-cp commands to evil-mc-known-commands should be enough to make evil-cleverparens compatible with evil-mc. The handlers used for the default evil commands should work in theory.

from evil-mc.

bmag avatar bmag commented on August 21, 2024

Looks like it works in practice too 😄 at least for casual use, I haven't done comprehensive testing. I've started the work at #14 and will continue when I have some more free time. Meanwhile I've encountered #13 too.

from evil-mc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.