Coder Social home page Coder Social logo

Comments (23)

gabesoft avatar gabesoft commented on August 21, 2024

I think that would be ok, as long as supporting those commands doesn't introduce too much complexity. If you do want to submit pulls don't forget to add tests for every command introduced.

from evil-mc.

aaronjensen avatar aaronjensen commented on August 21, 2024

Maybe I'm dong something wrong, but the tests don't pass locally on emacs 25.1

The first to fail is "Scenario: Copy paste a word with count"

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

Did you do a make test-install and then a make test?

from evil-mc.

aaronjensen avatar aaronjensen commented on August 21, 2024

Yep. I can repro the issue in my environment as well. If you have two cursors and you do a 3yw only the last cursor yanks 3 words, the first only yanked 1.

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

I wonder if this is related to #23

from evil-mc.

aaronjensen avatar aaronjensen commented on August 21, 2024

I don't think I'm seeing any of those errors. Here is my debug output https://gist.github.com/aaronjensen/08453fcc498a1244d44b

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

Then the only thing that seems to be different for you is your version of emacs, I use 24.5.1 and I'm on a mac. I'm not sure whether that should make a difference though.

from evil-mc.

aaronjensen avatar aaronjensen commented on August 21, 2024

I'm on a mac as well, I installed with: brew install emacs --with-cocoa
--with-librsvg --with-gnutls --with-imagemagick --HEAD

On Mon, Mar 7, 2016 at 1:25 PM Gabriel Adomnicai [email protected]
wrote:

Then the only thing that seems to be different for you is your version of
emacs, I use 24.5.1 and I'm on a mac. I'm not sure whether that should make
a difference though.


Reply to this email directly or view it on GitHub
#24 (comment).

Aaron

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

Ok, I'll try to install emacs with the same options as you when I get home and hopefully I'll be able to reproduce the problem.

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

Is your version of emacs 25.1? I tried installing exactly as you but I always get 24.5.1

from evil-mc.

aaronjensen avatar aaronjensen commented on August 21, 2024

You may need to brew link emacs after

On Mar 7, 2016, 2:31 PM -0800, Gabriel [email protected], wrote:

Is your version of emacs 25.1? I tried installing exactly as you but I always get 24.5.1


Reply to this email directly orview it on GitHub(#24 (comment)).

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

Oh, I wonder if I have to uninstall my current version first. I always get this output from brew

Warning: emacs-24.5 already installed

from evil-mc.

aaronjensen avatar aaronjensen commented on August 21, 2024

Ah yeah. Or brew reinstall with the same args

On Mar 7, 2016, 2:53 PM -0800, Gabriel [email protected], wrote:

Oh, I wonder if I have to uninstall my current version first. I always get this output from brew

Warning: emacs-24.5 already installed


Reply to this email directly orview it on GitHub(#24 (comment)).

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

Yea I can reproduce the problem now.

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

I can reproduce the problem but I'm not sure I'll have too much time to spend on this since 25.1 is not really a stable version

from evil-mc.

aaronjensen avatar aaronjensen commented on August 21, 2024

Ok, no worries. I will say it's quite stable other than this issue and quite a bit faster. It's what I recommend people install now a days on a mac.

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

Cool, I'll take a look when I have some time. But, from what I can tell commands that contain a number don't work due to the number not being read during a command input. Not sure what the reason is but the relevant code is in evil-mc-command-record.el

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

I finally got around to fixing the tests for emacs 25.1 via this commit efc5e13

from evil-mc.

aaronjensen avatar aaronjensen commented on August 21, 2024

Wow, that looks involved. I'm not familiar enough with it to tell what the change is that emacs 25 actually forced. Was it a breaking change in emacs 25 that caused it, not a bug?

from evil-mc.

gabesoft avatar gabesoft commented on August 21, 2024

Well, I took advantage of this opportunity to add some more tests and do some minor refactoring. The changes relevant to emacs 25 are only in evil-mc-command-record.el

from evil-mc.

Compro-Prasad avatar Compro-Prasad commented on August 21, 2024

Any progress on this? I am using normal Emacs. The thing I don't like about multiple-cursors package is that it doesn't give me functionality of evil-mc-make-and-goto-next-match. But since I am a normal Emacs user jumping into normal mode isn't beneficial to me. I am okay with evil being installed. But I don't want it to be enabled. I know that is not possible. Still, do you have any solution to using evil-mc-make-and-goto-next-match without jumping to normal mode? I don't want evil to be enabled.

from evil-mc.

Compro-Prasad avatar Compro-Prasad commented on August 21, 2024

https://github.com/magnars/multiple-cursors.el/issues/335

from evil-mc.

jackkamm avatar jackkamm commented on August 21, 2024

The following configuration gets evil-mc mostly working with hybrid-style editing:

(require 'cl-lib)
(require 'multiple-cursors)
(customize-set-variable
 'evil-mc-custom-known-commands
 (cl-loop for cmd in mc--default-cmds-to-run-for-all
          if (not (assoc cmd evil-mc-known-commands))
          collect `(,cmd . ((:default
                             . evil-mc-execute-default-call-with-count)))))

That is, I'm just taking all the commands that multiple-cursors.el deems safe and are not known by evil-mc-known-commands, and adding them to evil-mc-custom-known-commands with the standard executor.

For reference, below is the list of the commands added. I think it would be good to add most of these to evil-mc-known-commands so hybrid editing could be better supported out of the box. Though it might be quite a bit of work to create tests for all of them...

mc/keyboard-quit
quoted-insert
previous-line
next-line
open-line
delete-blank-lines
transpose-lines
transpose-paragraphs
transpose-regions
join-line
right-char
right-word
forward-char
forward-word
left-char
left-word
backward-char
backward-word
forward-paragraph
backward-paragraph
upcase-word
downcase-word
forward-list
backward-list
hippie-expand-lines
yank-pop
append-next-kill
kill-word
kill-line
kill-whole-line
backward-kill-word
delete-char
py-electric-backspace
cperl-electric-backspace
autopair-backspace
just-one-space
zap-to-char
end-of-line
set-mark-command
cua-set-mark
cua-replace-region
cua-delete-region
move-end-of-line
beginning-of-line
move-beginning-of-line
kill-ring-save
back-to-indentation
subword-forward
subword-backward
subword-mark
subword-kill
subword-backward-kill
subword-transpose
subword-capitalize
subword-upcase
subword-downcase
er/expand-region
er/contract-region
smart-forward
smart-backward
smart-up
smart-down

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.