Compare commits

...

2 Commits

Author SHA1 Message Date
kj
eef8ab4666 Agregado atajo para buscar y reemplazar. 2021-06-12 14:57:34 -04:00
kj
cabb400529 Actualización del plugin multiple-cursors 2021-06-12 14:56:46 -04:00
22 changed files with 80 additions and 82 deletions

View File

@ -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:

View File

@ -88,7 +88,11 @@
(cl-defun mc/cycle (next-cursor fallback-cursor loop-message) (cl-defun mc/cycle (next-cursor fallback-cursor loop-message)
(when (null next-cursor) (when (null next-cursor)
(when (eql 'stop (mc/handle-loop-condition loop-message)) (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)) (setf next-cursor fallback-cursor))
(mc/create-fake-cursor-at-point) (mc/create-fake-cursor-at-point)
(mc/pop-state-from-overlay next-cursor) (mc/pop-state-from-overlay next-cursor)

View File

@ -1,4 +1,4 @@
;;; mc-hide-unmatched-lines.el ;;; mc-hide-unmatched-lines-mode.el
;; Copyright (C) 2014 Aleksey Fedotov ;; Copyright (C) 2014 Aleksey Fedotov
@ -103,5 +103,6 @@ mode. To leave this mode press <return> or \"C-g\""
(defun hum/unhide-unmatched-lines () (defun hum/unhide-unmatched-lines ()
(remove-overlays nil nil hum/invisible-overlay-name t)) (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) (define-key mc/keymap (kbd "C-'") 'mc-hide-unmatched-lines-mode)
(provide 'mc-hide-unmatched-lines-mode)

View File

@ -190,7 +190,7 @@ With zero ARG, skip the last one and mark next."
(defun mc/mark-next-word-like-this (arg) (defun mc/mark-next-word-like-this (arg)
"Find and mark the next word of the buffer matching the currently active region "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 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 negative ARG, delete the last one instead.
With zero ARG, skip the last one and mark next." With zero ARG, skip the last one and mark next."
(interactive "p") (interactive "p")
@ -201,7 +201,7 @@ With zero ARG, skip the last one and mark next."
(defun mc/mark-next-symbol-like-this (arg) (defun mc/mark-next-symbol-like-this (arg)
"Find and mark the next symbol of the buffer matching the currently active region "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 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 negative ARG, delete the last one instead.
With zero ARG, skip the last one and mark next." With zero ARG, skip the last one and mark next."
(interactive "p") (interactive "p")

View File

@ -32,14 +32,10 @@ other non-nil value will cause short lines to be padded.
\(fn &optional ARG)" t nil) \(fn &optional ARG)" t nil)
(autoload 'mc/edit-ends-of-lines "mc-edit-lines" "\ (autoload 'mc/edit-ends-of-lines "mc-edit-lines" "\
Add one cursor to the end of each line in the active region. Add one cursor to the end of each line in the active region." t nil)
\(fn)" t nil)
(autoload 'mc/edit-beginnings-of-lines "mc-edit-lines" "\ (autoload 'mc/edit-beginnings-of-lines "mc-edit-lines" "\
Add one cursor to the beginning of each line in the active region. Add one cursor to the beginning of each line in the active region." t nil)
\(fn)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "mc-edit-lines" '("mc/edit-lines-empty-lines"))) (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 still edit lines while you are in mc-hide-unmatched-lines
mode. To leave this mode press <return> or \"C-g\" 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) \(fn &optional ARG)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "mc-hide-unmatched-lines-mode" '("hum/"))) (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" "\ (autoload 'mc/mark-next-word-like-this "mc-mark-more" "\
Find and mark the next word of the buffer matching the currently active region 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 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 negative ARG, delete the last one instead.
With zero ARG, skip the last one and mark next. 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" "\ (autoload 'mc/mark-next-symbol-like-this "mc-mark-more" "\
Find and mark the next symbol of the buffer matching the currently active region 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 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 negative ARG, delete the last one instead.
With zero ARG, skip the last one and mark next. 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) \(fn ARG)" t nil)
(autoload 'mc/unmark-next-like-this "mc-mark-more" "\ (autoload 'mc/unmark-next-like-this "mc-mark-more" "\
Deselect next part of the buffer matching the currently active region. Deselect next part of the buffer matching the currently active region." t nil)
\(fn)" t nil)
(autoload 'mc/unmark-previous-like-this "mc-mark-more" "\ (autoload 'mc/unmark-previous-like-this "mc-mark-more" "\
Deselect prev part of the buffer matching the currently active region. Deselect prev part of the buffer matching the currently active region." t nil)
\(fn)" t nil)
(autoload 'mc/skip-to-next-like-this "mc-mark-more" "\ (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. Skip the current one and select the next part of the buffer matching the currently active region." t nil)
\(fn)" t nil)
(autoload 'mc/skip-to-previous-like-this "mc-mark-more" "\ (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. Skip the current one and select the prev part of the buffer matching the currently active region." t nil)
\(fn)" t nil)
(autoload 'mc/mark-all-like-this "mc-mark-more" "\ (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" "\ (autoload 'mc/mark-all-symbols-like-this "mc-mark-more" nil t nil)
\(fn)" t nil)
(autoload 'mc/mark-all-symbols-like-this "mc-mark-more" "\
\(fn)" t nil)
(autoload 'mc/mark-all-in-region "mc-mark-more" "\ (autoload 'mc/mark-all-in-region "mc-mark-more" "\
Find and mark all the parts in the region matching the given search 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 <left> Remove the cursor furthest down
<right> Skip past 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'. The bindings for these commands can be changed. See `mc/mark-more-like-this-extended-keymap'." t nil)
\(fn)" t nil)
(autoload 'mc/mark-all-like-this-dwim "mc-mark-more" "\ (autoload 'mc/mark-all-like-this-dwim "mc-mark-more" "\
Tries to guess what you want to mark all of. 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) \(fn ARG)" t nil)
(autoload 'mc/mark-all-like-this-in-defun "mc-mark-more" "\ (autoload 'mc/mark-all-like-this-in-defun "mc-mark-more" "\
Mark all like this in defun. Mark all like this in defun." t nil)
\(fn)" t nil)
(autoload 'mc/mark-all-words-like-this-in-defun "mc-mark-more" "\ (autoload 'mc/mark-all-words-like-this-in-defun "mc-mark-more" "\
Mark all words like this in defun. Mark all words like this in defun." t nil)
\(fn)" t nil)
(autoload 'mc/mark-all-symbols-like-this-in-defun "mc-mark-more" "\ (autoload 'mc/mark-all-symbols-like-this-in-defun "mc-mark-more" "\
Mark all symbols like this in defun. Mark all symbols like this in defun." t nil)
\(fn)" t nil)
(autoload 'mc/toggle-cursor-on-click "mc-mark-more" "\ (autoload 'mc/toggle-cursor-on-click "mc-mark-more" "\
Add a cursor where you click, or remove a fake cursor that is 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) (defalias 'mc/add-cursor-on-click 'mc/toggle-cursor-on-click)
(autoload 'mc/mark-sgml-tag-pair "mc-mark-more" "\ (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" "\ (autoload 'mc/mark-pop "mc-mark-pop" "\
Add a cursor at the current point, pop off mark ring and jump Add a cursor at the current point, pop off mark ring and jump
to the popped mark. to the popped mark." t nil)
\(fn)" t nil)
;;;*** ;;;***
@ -288,15 +261,9 @@ Insert increasing letters for each cursor, starting at 0 or ARG.
\(fn ARG)" t nil) \(fn ARG)" t nil)
(autoload 'mc/reverse-regions "mc-separate-operations" "\ (autoload 'mc/reverse-regions "mc-separate-operations" nil t nil)
(autoload 'mc/sort-regions "mc-separate-operations" nil t nil)
\(fn)" t nil)
(autoload 'mc/sort-regions "mc-separate-operations" "\
\(fn)" t nil)
(autoload 'mc/vertical-align "mc-separate-operations" "\ (autoload 'mc/vertical-align "mc-separate-operations" "\
Aligns all cursors vertically with a given CHARACTER to the one with the 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) \(fn CHARACTER)" t nil)
(autoload 'mc/vertical-align-with-space "mc-separate-operations" "\ (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--" "mc/insert-numbers-default")))
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "mc-separate-operations" '("mc/insert-numbers-default" "mc--")))
;;;*** ;;;***
@ -321,9 +286,14 @@ Aligns all cursors with whitespace like `mc/vertical-align' does
(autoload 'multiple-cursors-mode "multiple-cursors-core" "\ (autoload 'multiple-cursors-mode "multiple-cursors-core" "\
Mode while multiple cursors are active. 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) \(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. Anchors the rectangular region at point.
Think of this one as `set-mark' except you're marking a rectangular region. It is 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. an exceedingly quick way of adding multiple cursors to multiple lines." t nil)
\(fn)" t nil)
(autoload 'rectangular-region-mode "rectangular-region-mode" "\ (autoload 'rectangular-region-mode "rectangular-region-mode" "\
A mode for creating a rectangular region to edit 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) \(fn &optional ARG)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "rectangular-region-mode" '("rectangular-region-mode" "rrm/"))) (if (fboundp 'register-definition-prefixes) (register-definition-prefixes "rectangular-region-mode" '("rectangular-region-mode" "rrm/")))

View File

@ -40,6 +40,18 @@
"The face used for fake cursors if the cursor-type is bar" "The face used for fake cursors if the cursor-type is bar"
:group 'multiple-cursors) :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 (defface mc/region-face
'((t :inherit region)) '((t :inherit region))
"The face used for fake regions" "The face used for fake regions"
@ -125,7 +137,7 @@
(defun mc/make-cursor-overlay-at-eol (pos) (defun mc/make-cursor-overlay-at-eol (pos)
"Create overlay to look like cursor at end of line." "Create overlay to look like cursor at end of line."
(let ((overlay (make-overlay pos pos nil nil nil))) (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 'before-string (propertize "|" 'face 'mc/cursor-bar-face))
(overlay-put overlay 'after-string (propertize " " 'face 'mc/cursor-face))) (overlay-put overlay 'after-string (propertize " " 'face 'mc/cursor-face)))
overlay)) overlay))
@ -133,7 +145,7 @@
(defun mc/make-cursor-overlay-inline (pos) (defun mc/make-cursor-overlay-inline (pos)
"Create overlay to look like cursor inside text." "Create overlay to look like cursor inside text."
(let ((overlay (make-overlay pos (1+ pos) nil nil nil))) (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 'before-string (propertize "|" 'face 'mc/cursor-bar-face))
(overlay-put overlay 'face 'mc/cursor-face)) (overlay-put overlay 'face 'mc/cursor-face))
overlay)) overlay))
@ -844,6 +856,8 @@ for running commands with multiple cursors."
"Commands to run for all cursors in multiple-cursors-mode") "Commands to run for all cursors in multiple-cursors-mode")
(provide 'multiple-cursors-core) (provide 'multiple-cursors-core)
(require 'mc-cycle-cursors)
(require 'mc-hide-unmatched-lines-mode)
;; Local Variables: ;; Local Variables:
;; coding: utf-8 ;; coding: utf-8

View 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:

View File

@ -5,6 +5,7 @@
;; Author: Magnar Sveen <magnars@gmail.com> ;; Author: Magnar Sveen <magnars@gmail.com>
;; Version: 1.4.0 ;; Version: 1.4.0
;; Keywords: editing cursors ;; Keywords: editing cursors
;; Homepage: https://github.com/magnars/multiple-cursors.el
;; This program is free software; you can redistribute it and/or modify ;; 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 ;; it under the terms of the GNU General Public License as published by
@ -191,12 +192,10 @@
:group 'editing) :group 'editing)
(require 'mc-edit-lines) (require 'mc-edit-lines)
(require 'mc-cycle-cursors)
(require 'mc-mark-more) (require 'mc-mark-more)
(require 'mc-mark-pop) (require 'mc-mark-pop)
(require 'rectangular-region-mode) (require 'rectangular-region-mode)
(require 'mc-separate-operations) (require 'mc-separate-operations)
(require 'mc-hide-unmatched-lines-mode)
(provide 'multiple-cursors) (provide 'multiple-cursors)

View File

@ -131,6 +131,7 @@
;Atajos de teclas ;Atajos de teclas
(global-set-key (kbd "C-a") 'mark-whole-buffer); Seleccionar todo con CTRL+A. (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 [f9] 'neotree-toggle) ;Abrir/Cerrar neotree.
;(global-set-key (kbd "C-<f9>") 'shell) ;Abrir terminal. ;(global-set-key (kbd "C-<f9>") 'shell) ;Abrir terminal.
;Cursores múltiples ;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-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-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-<") '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). (global-set-key (kbd "C-S-<mouse-1>") 'mc/add-cursor-on-click) ;Añadir cursor con clics (Shift+CTRL+Clic).
;Mejorando el scroll ;Mejorando el scroll