syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.58k stars 4.9k forks source link

Multicursor Layer Issue in Spacemacs #16182

Open Ghasak opened 8 months ago

Ghasak commented 8 months ago

Dear Spacemacs Team, Firstly, I would like to extend a heartfelt thank you from myself and the Spacemacs user community for your exceptional dedication to developing Spacemacs. Your hard work truly enriches all Spacemacs' users coding experience (me included), and for that, I am profoundly grateful.

However, I am currently encountering an issue with the multi-cursor layer that I hope to get some guidance on. I'm utilizing mc as the engine for multiple cursors, I'm facing a challenge with cursor behavior:

Steps to Reproduce the Issue

  1. I select multiple instances where I wish to have cursors.
  2. I create the cursors at these selected instances.
  3. Upon switching to insert mode and pressing Enter, I intend for all cursors to move to a new line. Unfortunately, only the first cursor is doing so, while the others remain static and I get Multiple-Cursors mode disabled in current buffer after hitting Enter.

Attachment: For better clarity, I've included a video that illustrates the problem in action.

https://github.com/syl20bnr/spacemacs/assets/27670946/f9ed0184-f671-4668-9175-9d9d92a61d4a

I would greatly appreciate any help or suggestions you could provide to resolve this issue. Your support is invaluable, Thank you for your attention and for maintaining such an incredible project.

Layer configures

     (multiple-cursors
      :variables
      multiple-cursors-backend  'mc;; other mode  'evil-mc (not support number)
      mc/cmds-to-run-once '(upcase-region)
      )

user-config


 ;; -------------------------------------------------------------
 ;;              MULTI- CURSOR MC ENGINE
 ;;              KEYBINDING SIMPLIFIED
 ;; -------------------------------------------------------------
 (define-key evil-normal-state-map (kbd "C-c i n") 'mc/insert-numbers)
 (define-key evil-visual-state-map (kbd "C-n") 'mc/mark-more-like-this-extended)
rawenous commented 1 month ago

Is this not working as intended? This is what the multiple-cursor README says

To get out of multiple-cursors-mode, press return or C-g. The latter will first disable multiple regions before disabling multiple cursors. If you want to insert a newline in multiple-cursors-mode, use C-j.