Comments (16)
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
👍
That's it. Disabling evil-cleverparens solved the issue.
from evil-mc.
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.
@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.
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.
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)
- fake cursors not visible right after selection to cursors HOT 2
- Appending when in org-mode with evil-org-append-line does not work as expected HOT 1
- error: (wrong-type-argument listp evil-mc-make-all-cursors) on load HOT 4
- Is there ex command? HOT 1
- Support prefix numerical arguments
- Choose default behavior for unknown commands HOT 2
- Select each matched pattern after creating cursors
- evil-digit-argument-or-evil-org-beginning-of-line is a function alias and I can't figure out how to make it a known command HOT 4
- `ys` executes `evil-yank` rather than `evil-surround-edit`
- Feature Req: Add cursors to regex matches HOT 1
- evil-undo (`u`) hides fake cursors until they are moved
- evil-undo (`u`) unaligns the cursors
- `esc` unaligns the cursors, when real cursor on first column HOT 1
- [Question] how to make this function work for multiple cursors?
- Does not insert control characters on other cursors except current cursor inserted via `quoted insert`
- set evil-mc-enable-bar-cursor to nil when in terminal environment
- wrong location for substitution on fake cursors when `evil-move-cursor-back` is `nil`
- Multi Select and surround
- Can't execute "change". HOT 2
- Unbind evil-mc-cursors-map from "gr" keybindings
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from evil-mc.