Compare commits
2 Commits
719e3d9e1e
...
eef8ab4666
Author | SHA1 | Date | |
---|---|---|---|
eef8ab4666 | |||
cabb400529 |
@ -1,6 +0,0 @@
|
||||
(define-package "multiple-cursors" "20191210.1759" "Multiple cursors for Emacs."
|
||||
'((cl-lib "0.5"))
|
||||
:commit "b880554d04b8f61165afba7d4de19ac9e39bb7ab")
|
||||
;; Local Variables:
|
||||
;; no-byte-compile: t
|
||||
;; End:
|
@ -88,7 +88,11 @@
|
||||
(cl-defun mc/cycle (next-cursor fallback-cursor loop-message)
|
||||
(when (null next-cursor)
|
||||
(when (eql 'stop (mc/handle-loop-condition loop-message))
|
||||
(return-from mc/cycle nil))
|
||||
(cond
|
||||
((fboundp 'cl-return-from)
|
||||
(cl-return-from mc/cycle nil))
|
||||
((fboundp 'return-from)
|
||||
(return-from mc/cycle nil))))
|
||||
(setf next-cursor fallback-cursor))
|
||||
(mc/create-fake-cursor-at-point)
|
||||
(mc/pop-state-from-overlay next-cursor)
|
Binary file not shown.
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
;;; mc-hide-unmatched-lines.el
|
||||
;;; mc-hide-unmatched-lines-mode.el
|
||||
|
||||
;; Copyright (C) 2014 Aleksey Fedotov
|
||||
|
||||
@ -103,5 +103,6 @@ mode. To leave this mode press <return> or \"C-g\""
|
||||
(defun hum/unhide-unmatched-lines ()
|
||||
(remove-overlays nil nil hum/invisible-overlay-name t))
|
||||
|
||||
(provide 'mc-hide-unmatched-lines-mode)
|
||||
(define-key mc/keymap (kbd "C-'") 'mc-hide-unmatched-lines-mode)
|
||||
|
||||
(provide 'mc-hide-unmatched-lines-mode)
|
Binary file not shown.
@ -190,7 +190,7 @@ With zero ARG, skip the last one and mark next."
|
||||
(defun mc/mark-next-word-like-this (arg)
|
||||
"Find and mark the next word of the buffer matching the currently active region
|
||||
The matching region must be a whole word to be a match
|
||||
If no region is active, mark the symbol at the point and find the next match
|
||||
If no region is active add a cursor on the next line
|
||||
With negative ARG, delete the last one instead.
|
||||
With zero ARG, skip the last one and mark next."
|
||||
(interactive "p")
|
||||
@ -201,7 +201,7 @@ With zero ARG, skip the last one and mark next."
|
||||
(defun mc/mark-next-symbol-like-this (arg)
|
||||
"Find and mark the next symbol of the buffer matching the currently active region
|
||||
The matching region must be a whole symbol to be a match
|
||||
If no region is active, mark the symbol at the point and find the next match
|
||||
If no region is active add a cursor on the next line
|
||||
With negative ARG, delete the last one instead.
|
||||
With zero ARG, skip the last one and mark next."
|
||||
(interactive "p")
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -32,14 +32,10 @@ other non-nil value will cause short lines to be padded.
|
||||
\(fn &optional ARG)" t nil)
|
||||
|
||||
(autoload 'mc/edit-ends-of-lines "mc-edit-lines" "\
|
||||
Add one cursor to the end of each line in the active region.
|
||||
|
||||
\(fn)" t nil)
|
||||
Add one cursor to the end of each line in the active region." t nil)
|
||||
|
||||
(autoload 'mc/edit-beginnings-of-lines "mc-edit-lines" "\
|
||||
Add one cursor to the beginning of each line in the active region.
|
||||
|
||||
\(fn)" t nil)
|
||||
Add one cursor to the beginning of each line in the active region." t nil)
|
||||
|
||||
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "mc-edit-lines" '("mc/edit-lines-empty-lines")))
|
||||
|
||||
@ -56,6 +52,11 @@ mode press \"C-'\" while multiple-cursor-mode is active. You can
|
||||
still edit lines while you are in mc-hide-unmatched-lines
|
||||
mode. To leave this mode press <return> or \"C-g\"
|
||||
|
||||
If called interactively, enable Mc-Hide-Unmatched-Lines mode if
|
||||
ARG is positive, and disable it if ARG is zero or negative. If
|
||||
called from Lisp, also enable the mode if ARG is omitted or nil,
|
||||
and toggle it if ARG is `toggle'; disable the mode otherwise.
|
||||
|
||||
\(fn &optional ARG)" t nil)
|
||||
|
||||
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "mc-hide-unmatched-lines-mode" '("hum/")))
|
||||
@ -84,7 +85,7 @@ With zero ARG, skip the last one and mark next.
|
||||
(autoload 'mc/mark-next-word-like-this "mc-mark-more" "\
|
||||
Find and mark the next word of the buffer matching the currently active region
|
||||
The matching region must be a whole word to be a match
|
||||
If no region is active, mark the symbol at the point and find the next match
|
||||
If no region is active add a cursor on the next line
|
||||
With negative ARG, delete the last one instead.
|
||||
With zero ARG, skip the last one and mark next.
|
||||
|
||||
@ -93,7 +94,7 @@ With zero ARG, skip the last one and mark next.
|
||||
(autoload 'mc/mark-next-symbol-like-this "mc-mark-more" "\
|
||||
Find and mark the next symbol of the buffer matching the currently active region
|
||||
The matching region must be a whole symbol to be a match
|
||||
If no region is active, mark the symbol at the point and find the next match
|
||||
If no region is active add a cursor on the next line
|
||||
With negative ARG, delete the last one instead.
|
||||
With zero ARG, skip the last one and mark next.
|
||||
|
||||
@ -144,39 +145,23 @@ With zero ARG, skip the last one and mark next.
|
||||
\(fn ARG)" t nil)
|
||||
|
||||
(autoload 'mc/unmark-next-like-this "mc-mark-more" "\
|
||||
Deselect next part of the buffer matching the currently active region.
|
||||
|
||||
\(fn)" t nil)
|
||||
Deselect next part of the buffer matching the currently active region." t nil)
|
||||
|
||||
(autoload 'mc/unmark-previous-like-this "mc-mark-more" "\
|
||||
Deselect prev part of the buffer matching the currently active region.
|
||||
|
||||
\(fn)" t nil)
|
||||
Deselect prev part of the buffer matching the currently active region." t nil)
|
||||
|
||||
(autoload 'mc/skip-to-next-like-this "mc-mark-more" "\
|
||||
Skip the current one and select the next part of the buffer matching the currently active region.
|
||||
|
||||
\(fn)" t nil)
|
||||
Skip the current one and select the next part of the buffer matching the currently active region." t nil)
|
||||
|
||||
(autoload 'mc/skip-to-previous-like-this "mc-mark-more" "\
|
||||
Skip the current one and select the prev part of the buffer matching the currently active region.
|
||||
|
||||
\(fn)" t nil)
|
||||
Skip the current one and select the prev part of the buffer matching the currently active region." t nil)
|
||||
|
||||
(autoload 'mc/mark-all-like-this "mc-mark-more" "\
|
||||
Find and mark all the parts of the buffer matching the currently active region
|
||||
Find and mark all the parts of the buffer matching the currently active region" t nil)
|
||||
|
||||
\(fn)" t nil)
|
||||
(autoload 'mc/mark-all-words-like-this "mc-mark-more" nil t nil)
|
||||
|
||||
(autoload 'mc/mark-all-words-like-this "mc-mark-more" "\
|
||||
|
||||
|
||||
\(fn)" t nil)
|
||||
|
||||
(autoload 'mc/mark-all-symbols-like-this "mc-mark-more" "\
|
||||
|
||||
|
||||
\(fn)" t nil)
|
||||
(autoload 'mc/mark-all-symbols-like-this "mc-mark-more" nil t nil)
|
||||
|
||||
(autoload 'mc/mark-all-in-region "mc-mark-more" "\
|
||||
Find and mark all the parts in the region matching the given search
|
||||
@ -205,9 +190,7 @@ If direction is 'down:
|
||||
<left> Remove the cursor furthest down
|
||||
<right> Skip past the cursor furthest down
|
||||
|
||||
The bindings for these commands can be changed. See `mc/mark-more-like-this-extended-keymap'.
|
||||
|
||||
\(fn)" t nil)
|
||||
The bindings for these commands can be changed. See `mc/mark-more-like-this-extended-keymap'." t nil)
|
||||
|
||||
(autoload 'mc/mark-all-like-this-dwim "mc-mark-more" "\
|
||||
Tries to guess what you want to mark all of.
|
||||
@ -230,19 +213,13 @@ If the region is inactive or on a single line, it will behave like
|
||||
\(fn ARG)" t nil)
|
||||
|
||||
(autoload 'mc/mark-all-like-this-in-defun "mc-mark-more" "\
|
||||
Mark all like this in defun.
|
||||
|
||||
\(fn)" t nil)
|
||||
Mark all like this in defun." t nil)
|
||||
|
||||
(autoload 'mc/mark-all-words-like-this-in-defun "mc-mark-more" "\
|
||||
Mark all words like this in defun.
|
||||
|
||||
\(fn)" t nil)
|
||||
Mark all words like this in defun." t nil)
|
||||
|
||||
(autoload 'mc/mark-all-symbols-like-this-in-defun "mc-mark-more" "\
|
||||
Mark all symbols like this in defun.
|
||||
|
||||
\(fn)" t nil)
|
||||
Mark all symbols like this in defun." t nil)
|
||||
|
||||
(autoload 'mc/toggle-cursor-on-click "mc-mark-more" "\
|
||||
Add a cursor where you click, or remove a fake cursor that is
|
||||
@ -253,11 +230,9 @@ already there.
|
||||
(defalias 'mc/add-cursor-on-click 'mc/toggle-cursor-on-click)
|
||||
|
||||
(autoload 'mc/mark-sgml-tag-pair "mc-mark-more" "\
|
||||
Mark the tag we're in and its pair for renaming.
|
||||
Mark the tag we're in and its pair for renaming." t nil)
|
||||
|
||||
\(fn)" t nil)
|
||||
|
||||
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "mc-mark-more" '("mc/" "mc--")))
|
||||
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "mc-mark-more" '("mc--" "mc/")))
|
||||
|
||||
;;;***
|
||||
|
||||
@ -266,9 +241,7 @@ Mark the tag we're in and its pair for renaming.
|
||||
|
||||
(autoload 'mc/mark-pop "mc-mark-pop" "\
|
||||
Add a cursor at the current point, pop off mark ring and jump
|
||||
to the popped mark.
|
||||
|
||||
\(fn)" t nil)
|
||||
to the popped mark." t nil)
|
||||
|
||||
;;;***
|
||||
|
||||
@ -288,15 +261,9 @@ Insert increasing letters for each cursor, starting at 0 or ARG.
|
||||
|
||||
\(fn ARG)" t nil)
|
||||
|
||||
(autoload 'mc/reverse-regions "mc-separate-operations" "\
|
||||
(autoload 'mc/reverse-regions "mc-separate-operations" nil t nil)
|
||||
|
||||
|
||||
\(fn)" t nil)
|
||||
|
||||
(autoload 'mc/sort-regions "mc-separate-operations" "\
|
||||
|
||||
|
||||
\(fn)" t nil)
|
||||
(autoload 'mc/sort-regions "mc-separate-operations" nil t nil)
|
||||
|
||||
(autoload 'mc/vertical-align "mc-separate-operations" "\
|
||||
Aligns all cursors vertically with a given CHARACTER to the one with the
|
||||
@ -306,11 +273,9 @@ Might not behave as intended if more than one cursors are on the same line.
|
||||
\(fn CHARACTER)" t nil)
|
||||
|
||||
(autoload 'mc/vertical-align-with-space "mc-separate-operations" "\
|
||||
Aligns all cursors with whitespace like `mc/vertical-align' does
|
||||
Aligns all cursors with whitespace like `mc/vertical-align' does" t nil)
|
||||
|
||||
\(fn)" t nil)
|
||||
|
||||
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "mc-separate-operations" '("mc/insert-numbers-default" "mc--")))
|
||||
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "mc-separate-operations" '("mc--" "mc/insert-numbers-default")))
|
||||
|
||||
;;;***
|
||||
|
||||
@ -321,9 +286,14 @@ Aligns all cursors with whitespace like `mc/vertical-align' does
|
||||
(autoload 'multiple-cursors-mode "multiple-cursors-core" "\
|
||||
Mode while multiple cursors are active.
|
||||
|
||||
If called interactively, enable Multiple-Cursors mode if ARG is
|
||||
positive, and disable it if ARG is zero or negative. If called
|
||||
from Lisp, also enable the mode if ARG is omitted or nil, and
|
||||
toggle it if ARG is `toggle'; disable the mode otherwise.
|
||||
|
||||
\(fn &optional ARG)" t nil)
|
||||
|
||||
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "multiple-cursors-core" '("multiple-cursors-mode" "unsupported-cmd" "deactivate-cursor-after-undo" "activate-cursor-for-undo")))
|
||||
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "multiple-cursors-core" '("activate-cursor-for-undo" "deactivate-cursor-after-undo" "multiple-cursors-mode" "unsupported-cmd")))
|
||||
|
||||
;;;***
|
||||
|
||||
@ -335,13 +305,16 @@ Mode while multiple cursors are active.
|
||||
Anchors the rectangular region at point.
|
||||
|
||||
Think of this one as `set-mark' except you're marking a rectangular region. It is
|
||||
an exceedingly quick way of adding multiple cursors to multiple lines.
|
||||
|
||||
\(fn)" t nil)
|
||||
an exceedingly quick way of adding multiple cursors to multiple lines." t nil)
|
||||
|
||||
(autoload 'rectangular-region-mode "rectangular-region-mode" "\
|
||||
A mode for creating a rectangular region to edit
|
||||
|
||||
If called interactively, enable Rectangular-Region mode if ARG is
|
||||
positive, and disable it if ARG is zero or negative. If called
|
||||
from Lisp, also enable the mode if ARG is omitted or nil, and
|
||||
toggle it if ARG is `toggle'; disable the mode otherwise.
|
||||
|
||||
\(fn &optional ARG)" t nil)
|
||||
|
||||
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "rectangular-region-mode" '("rectangular-region-mode" "rrm/")))
|
@ -40,6 +40,18 @@
|
||||
"The face used for fake cursors if the cursor-type is bar"
|
||||
:group 'multiple-cursors)
|
||||
|
||||
(defcustom mc/match-cursor-style t
|
||||
"If non-nil, attempt to match the cursor style that the user
|
||||
has selected. Namely, use vertical bars the user has configured
|
||||
Emacs to use that cursor.
|
||||
|
||||
If nil, just use standard rectangle cursors for all fake cursors.
|
||||
|
||||
In some modes/themes, the bar fake cursors are either not
|
||||
rendered or shift text."
|
||||
:type '(boolean)
|
||||
:group 'multiple-cursors)
|
||||
|
||||
(defface mc/region-face
|
||||
'((t :inherit region))
|
||||
"The face used for fake regions"
|
||||
@ -125,7 +137,7 @@
|
||||
(defun mc/make-cursor-overlay-at-eol (pos)
|
||||
"Create overlay to look like cursor at end of line."
|
||||
(let ((overlay (make-overlay pos pos nil nil nil)))
|
||||
(if (mc/cursor-is-bar)
|
||||
(if (and mc/match-cursor-style (mc/cursor-is-bar))
|
||||
(overlay-put overlay 'before-string (propertize "|" 'face 'mc/cursor-bar-face))
|
||||
(overlay-put overlay 'after-string (propertize " " 'face 'mc/cursor-face)))
|
||||
overlay))
|
||||
@ -133,7 +145,7 @@
|
||||
(defun mc/make-cursor-overlay-inline (pos)
|
||||
"Create overlay to look like cursor inside text."
|
||||
(let ((overlay (make-overlay pos (1+ pos) nil nil nil)))
|
||||
(if (mc/cursor-is-bar)
|
||||
(if (and mc/match-cursor-style (mc/cursor-is-bar))
|
||||
(overlay-put overlay 'before-string (propertize "|" 'face 'mc/cursor-bar-face))
|
||||
(overlay-put overlay 'face 'mc/cursor-face))
|
||||
overlay))
|
||||
@ -844,6 +856,8 @@ for running commands with multiple cursors."
|
||||
"Commands to run for all cursors in multiple-cursors-mode")
|
||||
|
||||
(provide 'multiple-cursors-core)
|
||||
(require 'mc-cycle-cursors)
|
||||
(require 'mc-hide-unmatched-lines-mode)
|
||||
|
||||
;; Local Variables:
|
||||
;; coding: utf-8
|
Binary file not shown.
12
elpa/multiple-cursors-20210323.1128/multiple-cursors-pkg.el
Normal file
12
elpa/multiple-cursors-20210323.1128/multiple-cursors-pkg.el
Normal file
@ -0,0 +1,12 @@
|
||||
(define-package "multiple-cursors" "20210323.1128" "Multiple cursors for Emacs."
|
||||
'((cl-lib "0.5"))
|
||||
:commit "616fbdd3696f99d85660ad57ebbb0c44d6c7f426" :authors
|
||||
'(("Magnar Sveen" . "magnars@gmail.com"))
|
||||
:maintainer
|
||||
'("Magnar Sveen" . "magnars@gmail.com")
|
||||
:keywords
|
||||
'("editing" "cursors")
|
||||
:url "https://github.com/magnars/multiple-cursors.el")
|
||||
;; Local Variables:
|
||||
;; no-byte-compile: t
|
||||
;; End:
|
@ -5,6 +5,7 @@
|
||||
;; Author: Magnar Sveen <magnars@gmail.com>
|
||||
;; Version: 1.4.0
|
||||
;; Keywords: editing cursors
|
||||
;; Homepage: https://github.com/magnars/multiple-cursors.el
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
@ -191,12 +192,10 @@
|
||||
:group 'editing)
|
||||
|
||||
(require 'mc-edit-lines)
|
||||
(require 'mc-cycle-cursors)
|
||||
(require 'mc-mark-more)
|
||||
(require 'mc-mark-pop)
|
||||
(require 'rectangular-region-mode)
|
||||
(require 'mc-separate-operations)
|
||||
(require 'mc-hide-unmatched-lines-mode)
|
||||
|
||||
(provide 'multiple-cursors)
|
||||
|
Binary file not shown.
Binary file not shown.
3
init.el
3
init.el
@ -131,6 +131,7 @@
|
||||
|
||||
;Atajos de teclas
|
||||
(global-set-key (kbd "C-a") 'mark-whole-buffer); Seleccionar todo con CTRL+A.
|
||||
(global-set-key (kbd "C-h") 'replace-string); Buscar y reemplazar
|
||||
(global-set-key [f9] 'neotree-toggle) ;Abrir/Cerrar neotree.
|
||||
;(global-set-key (kbd "C-<f9>") 'shell) ;Abrir terminal.
|
||||
;Cursores múltiples
|
||||
@ -138,7 +139,7 @@
|
||||
(global-set-key (kbd "C-d") 'mc/edit-lines) ;Cursor en todas las lineas seleccionadas.
|
||||
(global-set-key (kbd "C->") 'mc/mark-next-like-this) ;Cursor en siguiente como el actual seleccionado.
|
||||
(global-set-key (kbd "C-<") 'mc/mark-previous-like-this) ;Cursor en anteriores como el actual seleccionado.
|
||||
(global-set-key (kbd "C-S-d") 'mc/mark-all-like-this) ;Cursor en todos como el actual selecionado.
|
||||
(global-set-key (kbd "C-S-d") 'mc/mark-all-like-this) ;Cursor en todos como el actual seleccionado.
|
||||
(global-set-key (kbd "C-S-<mouse-1>") 'mc/add-cursor-on-click) ;Añadir cursor con clics (Shift+CTRL+Clic).
|
||||
|
||||
;Mejorando el scroll
|
||||
|
Loading…
Reference in New Issue
Block a user