I’ve written before about the wonderful multiple-cursors package. Usually I use it by hitting
M-. (defined using the setup below) to fire off multiple cursors on successive lines or on successive occurrences of the current string (if some text is selected). I also use
M-, if I want to remove some of those cursors. This covers 99% of my use of multiple cursors.
However, occasionally, the best way to get the cursors where you want them is with the mouse. With the following code,
C-S-<left mouse click> adds a new cursor.
(use-package multiple-cursors :ensure t :bind (("M-." . mc/mark-next-like-this) ("M-," . mc/unmark-next-like-this) ("C-S-<mouse-1>" . mc/add-cursor-on-click)))