I want to use Emacs multiple cursors, but I don't know how to set it up.

Asked 2 years ago, Updated 2 years ago, 77 views

I was able to install the multiple cursors of emacs, but I'm having trouble because I don't know the settings after that.In which file should I write require?

I can't find a website that describes that area in detail.You may not know that, but I appreciate your cooperation.

The following is described in ~/.emacs

;; key bind(load-theme'manoj-darkt) (define-key global-map[(Sc)]
'kill-ring-save)

;; package init (require'package) (add-to-list'package-archives
) '("melpa"."https://melpa.org/packages/")t) (package-initialize)

(custom-set-variables;; custom-set-variables were added by Custom.
;; If you edit it by hand, you could message up, so be careful.;;
Your init file should contain only one such instance.;; If there is
more than one, they won't work right.' (package-selected-packages
) (quote(multiple-cursors))(custom-set-faces;; custom-set-faces
was added by Custom.;; If you edit it by hand, you could message up,
so be careful.;; Your init file should contain only one Such
instance.;; If there is more than one, they won't work right.)

(require' multiple-cursors)
(global-set-key(kbd "C-S-c C-S-c")'mc/edit-lines)
(global-set-key(kbd "C->")'mc/mark-next-like-this)
(global-set-key(kbd "C-<")'mc/mark-previous-like-this)
(global-set-key(kbd "C-c C-<")'mc/mark-all-like-this)

I don't know if it is required.
If you press ctrl+Shift+c→ctrl+Shift+c, nothing will respond

emacs

2022-09-30 21:35

1 Answers

Post Your Own

The environment is as follows

centros
GNU Emacs 25.3.1

To use multiple cursors, first write the following syntax in through /.emacs:Save it and restart emacs.

(require'package)
(add-to-list 'package-archives' ("melpa". "https://melpa.org/packages/")t)
(package-initialize)

Then, on the emacs screen, enter the following:The installation of multiple-cursors should begin.M is Meta Key

 M-x→package-install→enter→multiple-cursors→enter

Next, add the following syntax to the **-/.emacs** file

(require' multiple-cursors)
(global-set-key(kbd "C-S-c C-S-c")'mc/edit-lines)
(global-set-key(kbd "C->")'mc/mark-next-like-this)
(global-set-key(kbd "C-<")'mc/mark-previous-like-this)
(global-set-key(kbd "C-c C-<")'mc/mark-all-like-this)

However, I have confirmed that the keybind changes work.

Supplement

【 】Important ターミナルSome keybinds are not available for people using Emacs on the terminal, so please correct them accordingly.<

I'm not sure about the detailed structure, but the following site seems to be helpful.I hope people like me who don't know Emacs very well don't suffer.
Resolve emacs on iTerm2 that cannot enter C-;C-:C->C-.C-, symbolic keybinds


2022-09-30 21:35

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.