[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/multiple-cursors 21e4825 387/434: mc/mark-previous-like-th
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/multiple-cursors 21e4825 387/434: mc/mark-previous-like-this-word/symbol. |
Date: |
Sat, 7 Aug 2021 09:21:05 -0400 (EDT) |
branch: elpa/multiple-cursors
commit 21e48250ecdb2414e3a54ceefd75e91bccd6809a
Author: Andrea Orru <andreaorru1991@gmail.com>
Commit: Andrea Orru <andreaorru1991@gmail.com>
mc/mark-previous-like-this-word/symbol.
---
mc-mark-more.el | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/mc-mark-more.el b/mc-mark-more.el
index 25f4ae3..27a84b7 100644
--- a/mc-mark-more.el
+++ b/mc-mark-more.el
@@ -226,6 +226,42 @@ With zero ARG, skip the last one and mark next."
(mc/maybe-multiple-cursors-mode))
;;;###autoload
+(defun mc/mark-previous-like-this-word (arg)
+ "Find and mark the previous part of the buffer matching the currently active
region
+If no region is active, mark the word at the point and find the previous match
+With negative ARG, delete the last one instead.
+With zero ARG, skip the last one and mark previous."
+ (interactive "p")
+ (if (< arg 0)
+ (let ((cursor (mc/furthest-cursor-after-point)))
+ (if cursor
+ (mc/remove-fake-cursor cursor)
+ (error "No cursors to be unmarked")))
+ (if (region-active-p)
+ (mc/mark-more-like-this (= arg 0) 'backwards)
+ (mc--select-thing-at-point 'word)
+ (mc/mark-more-like-this (= arg 0) 'backwards)))
+ (mc/maybe-multiple-cursors-mode))
+
+(defun mc/mark-previous-like-this-symbol (arg)
+ "Find and mark the previous part of the buffer matching the currently active
region
+If no region is active, mark the symbol at the point and find the previous
match
+With negative ARG, delete the last one instead.
+With zero ARG, skip the last one and mark previous."
+ (interactive "p")
+ (if (< arg 0)
+ (let ((cursor (mc/furthest-cursor-after-point)))
+ (if cursor
+ (mc/remove-fake-cursor cursor)
+ (error "No cursors to be unmarked")))
+ (if (region-active-p)
+ (mc/mark-more-like-this (= arg 0) 'backwards)
+ (mc--select-thing-at-point 'symbol)
+ (mc/mark-more-like-this (= arg 0) 'backwards)))
+ (mc/maybe-multiple-cursors-mode))
+
+
+;;;###autoload
(defun mc/mark-previous-word-like-this (arg)
"Find and mark the previous part of the buffer matching the currently active
region
The matching region must be a whole word to be a match
- [nongnu] elpa/multiple-cursors 98f2346 305/434: Merge pull request #152 from ShingoFukuyama/master, (continued)
- [nongnu] elpa/multiple-cursors 98f2346 305/434: Merge pull request #152 from ShingoFukuyama/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 653d523 308/434: Added mc-hide-unmatched-lines mode, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 3f1611c 345/434: Factor out a superfluous variable, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 68961b4 355/434: Avoid requiring cl at runtime, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 4c52fb1 358/434: Merge pull request #239 from ilohmar/dwim-mouse-select, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors e31b1eb 360/434: Merge pull request #240 from ilohmar/toggle-click-improvements, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 6a62e60 367/434: Fix issue #131 (#247), ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 2329611 380/434: Merge remote-tracking branch 'upstream/master', ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 60b9ef8 385/434: Updated readme according to `mc/always-run-for-all, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors ad95d28 386/434: Update docstring of `mc/cursor-is-bar`, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 21e4825 387/434: mc/mark-previous-like-this-word/symbol.,
ELPA Syncer <=
- [nongnu] elpa/multiple-cursors 95f2e41 391/434: Add @AndreaOrru to list of contributors, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors e14fdb7 401/434: Merge pull request #298 from Quasilyte/update_readme, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 8172edd 417/434: Realign the file according to Elisp conventions, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors b9b851a 426/434: Merge pull request #358 from renatofdds/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 6a04a14 428/434: Fix docstrings, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 7b13b03 433/434: Add homepage, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 84ab4ee 196/434: Fix mc/dump-list (take 2): it looses old setting, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 6e15923 229/434: Use uninterned symbols in macros to avoid surprising local vars, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors cb848b2 239/434: Add @smithzvk to contributors list, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 6745142 250/434: Move from Carton to Cask, ELPA Syncer, 2021/08/07