Coder Social home page Coder Social logo

Can't type at cursors about evil-mc HOT 23 CLOSED

gabesoft avatar gabesoft commented on August 21, 2024
Can't type at cursors

from evil-mc.

Comments (23)

gabesoft avatar gabesoft commented on August 21, 2024

What major mode do you have enabled?

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

Some modes use a different command for inserting than self-insert-command. If you want to know what command is used run evil-mc-recording-command-on interactively and then check the Messages buffer

from evil-mc.

justmytwospence avatar justmytwospence commented on August 21, 2024

This is in any/all modes (emacs-lisp-mode, for example). I don't actually have an evil-mc-recording-command-on function. When I run evil-mc-recording-debug-on, and then run, say, evil-mc-make-all-cursors on the word ":config" from the normal state, a bunch of cursors appear in the appropriate positions, and I get the message:

evil-mc Created 90 cursors matching "\_<:config\_>"

After that point, everything seems to operate any differently. I've got a bunch of cursors all over the place, but only the real one inserts text. No messages appear in the message buffer either.

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

Sorry, yea the correct function is evil-mc-recording-debug-on. After calling that function, and assuming you have some active cursors, you should see some messages every time you do something. For example, what happens when you just try to move the cursors back and forth with b and w? In my messages buffer I see statements like evil-mc Command evil-forward-word-begin.

from evil-mc.

justmytwospence avatar justmytwospence commented on August 21, 2024

Nope, nada. Just to confirm, b is bound to evil-backward-word-begin, and w to evil-forward-word-begin.

Enabled minor modes:

Enabled minor modes: Anzu Async-Bytecomp-Package Auto-Composition
Auto-Compression Auto-Encryption Blink-Cursor Column-Number Company
Company-Quickhelp Company-Statistics Diff-Auto-Refine Eldoc
Electric-Indent Erc-Autojoin Erc-Button Erc-Fill Erc-Hl-Nicks
Erc-Irccontrols Erc-List Erc-Log Erc-Match Erc-Menu Erc-Move-To-Prompt
Erc-Netsplit Erc-Networks Erc-Noncommands Erc-Pcomplete Erc-Readonly
Erc-Ring Erc-Spelling Erc-Stamp Erc-Track Erc-Track Evil-Commentary
Evil-Leader Evil-Local Evil-Mc Evil-Smartparens Evil-Surround
Evil-Visualstar File-Name-Shadow Flx-Ido Font-Lock Git-Gutter
Global-Anzu Global-Evil-Visualstar Global-Font-Lock Global-Git-Commit
Global-Undo-Tree Helm-Autoresize Hl-Line Hs Ido-Everywhere
Ido-Ubiquitous Keyfreq Keyfreq-Autosave Linum Menu-Bar Mouse-Wheel
On-Screen-Global Override-Global Persp Prettify-Symbols Projectile
Projectile-Global Pyvenv Rainbow-Delimiters Recentf Savehist
Shell-Dirtrack Show-Smartparens Smartparens Tooltip Transient-Mark
Undo-Tree Visual-Line Which-Key

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

Would you mind trying it in the scratch buffer with the fundamental-mode. If you still get nothing, I'll look at it tonight with the minor modes that you have.
Yes b should be bound to evil-backward-word-begin and w to evil-forward-word-begin.

from evil-mc.

justmytwospence avatar justmytwospence commented on August 21, 2024

Same results in fundamental mode. I'll also try to bisect through this when I get a chance.

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

I don't see Evil in your list of minor modes. evil-mode must be enabled for evil-mc to work.

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

smartparens and evil-smartparens may interfere slightly just because it evil-mc does not account for their commands. Try disabling both just to see if it will make a difference.

from evil-mc.

justmytwospence avatar justmytwospence commented on August 21, 2024

Hmm, its not smartparens. You are right its very strange that evil is not in my minor most list. I have a feeling this might be because I use evil-local-mode instead of evil-mode.

from evil-mc.

justmytwospence avatar justmytwospence commented on August 21, 2024

Aha, thats it. evil-mc works when you activate evil with evil-mode, but not with evil-local-mode. Its the only evil plugin I've ever had this problem with.

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

Interesting. I think it's because in the evil-mc initialization I check whether the evil-mode is enabled. There's a method in the evil-mc.el file called evil-mc-initialize-keys where I check for evil-mode before setting up the key maps. I think I should find a better way of doing that.

from evil-mc.

justmytwospence avatar justmytwospence commented on August 21, 2024

I've updated the package, but nothing has changed regarding behavior or messages.

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

Maybe there are other issues then. This fix removed all checks for evil-mode when doing the evil-mc mode initialization. Does it make any difference if you use (evil-mc-mode 1) vs (global-evil-mc-mode 1) ?

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

After making this changes I've noticed that it takes a few seconds from the moment I enable evil-mc-mode until the key bindings take effect.

from evil-mc.

justmytwospence avatar justmytwospence commented on August 21, 2024

gloal-evil-mc-mode doesn't seem to fix it. I currently have this set up:

(add-hook 'evil-local-mode-hook #'evil-mc-mode)

Which successfully enables evil-mc-mode, albeit with the behavior laid out above.

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

Ok, I'll try to reproduce your setup

from evil-mc.

zovt avatar zovt commented on August 21, 2024

I'm also having the same problem

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

I think this is fixed in the master branch, but melpa doesn't seem to get updated for some reason. It would be great if one of you guys could try it out.

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

Actually, this is not fixed yet. I can still reproduce it

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

Ok, this is fixed now on Melpa. I just verified it in a sandbox.

from evil-mc.

justmytwospence avatar justmytwospence commented on August 21, 2024

This does indeed seem to be fixed :)

from evil-mc.

zovt avatar zovt commented on August 21, 2024

Fixed for me as well! Thanks :)

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.