64 Commits

Author SHA1 Message Date
Andrew Scott
25b98b940c
Support commands with multiple read-chars
This change fixes commands that read-chars multiple times. Previously, two
stage commands like embrace-change would read the same char twice immediately
and avy-goto-char-timer would never stop reading input as a cached value was
always provided during the timer. Instead, the read-char prompt is included in
the cache key so that multiple different calls are cached separately and
accessible by the fake cursors.
2023-07-28 00:05:13 +01:00
Leo Gaskin
351eb6cbb5 Add multiple-cursors support to execute-extended-command
Also add three new tests for this functionality and adapt some existing
tests as well as the testing harness.
2022-12-24 13:26:12 +01:00
bb2020
1075270008 Added mc/interactive-repeating-commands (#303)
* Added mc/interactive-repeating-commands

* simplify mc/interactive-repeating-commands

* simplify mc/interactive-repeating-commands

* removed mc/interactive-repeating-commands

* added mc/repeat-command

* rebound mc/repeat-command

* blacklisted repeat-complex-command

* added mc/always-repeat-command

* added mc/repeat-command tests
2017-09-08 14:52:47 -07:00
Andrea Orru
67d6579eab Updated tests, README. 2016-07-17 16:40:56 +02:00
Jules Tamagnan
be149f9121 Create customizable mc/insert-numbers-default
This commit fulfills the feature request from #248 and creates a
customizable variable called mc/insert-numbers-default which is the
starting value for mc/insert-numbers if no arg is passed
2016-05-23 15:43:08 -04:00
jtamagnan
6a62e60bf2 Fix issue #131 (#247)
* Fix issue #131

This issue would occur because the function was recieving a raw prefix
arg instead of a number. This commit fixes that.

* Fix issue with previous commit, add test cases
2016-04-28 14:33:15 +12:00
Steve Purcell
4bf9860bcc Use cl-lib instead of shimming, which breaks in older emacsen
Aliasing built-in (cl) functions to cl-lib versions when they are
available in older Emacs versions can seemingly lead to problems
including infinite loops during byte compilation.

Since cl-lib works with all Emacs versions supported by
multiple-cursors, just depend on this directly instead.

This commit makes the necessary changes, both to code, documentation and
package metadata.
2016-04-25 11:19:06 +12:00
Magnar Sveen
a393384b35 Merge pull request #227 from jtamagnan/insert_letters
Add mc/insert-letters function and test cases
2015-12-05 21:25:04 +01:00
Jules Tamagnan
8703b19872 Add mark-next-like-this-symbol function
* README.md: Update readme to include mark-next-like-this symbol
 * features/step-definitions/multiple-cursors-steps.el: Add phrase for
   mark-next-like-this-symbol
 * features/support/env.el: Add keyboard shortcut for
   mark-next-like-this-symbol and fix shortcut for
   mark-next-like-this-word
 * mc-mark-more.el: Add mc/mark-next-like-this-symbol function
 * multiple-cursors-core.el: Add mc/mark-next-like-this-symbol to
   functions to run only once
 * multiple-cursors.el: Add to readme section.
2015-12-04 16:56:50 -05:00
Jules Tamagnan
36b7025a35 Add alternative to mc/mark-next-like-this
* README.md: Add mc/mark-next-like-this-word tidbits to readme.
 * features/step-definitions/multiple-cursors-steps.el: Add
   mc/mark-next-like-this-word call.
 * features/support/env.el: Add shortcut for mc/mark-next-like-this-word
   as "C-S-c C->".
 * mc-mark-more.el: Add to mc/mark-next-like-this description to explain
   what happens when no region is selected. Add
   mc/mark-next-like-this-word function.
 * multiple-cursors-core.el: Add mc/mark-next-like-this-word to commands
   to run once.
 * multiple-cursors.el: Add information about mc/mark-next-like-this-word.
2015-12-04 13:34:47 -05:00
Jules Tamagnan
ca822cd0d0 Add mc/insert-letters function and test cases
* README.md: Add to readme, under special section.
 * features/insert-letters.feature: Add scenarios.
 * features/step-definitions/multiple-cursors-steps.el: Add call.
 * features/support/env.el: Add keybinding for insert-letters to H-3.
 * mc-separate-operations.el: Add function and helper functions.
 * multiple-cursors-core.el: Add insert-letters to functions that run once.
 * multiple-cursors.el: Add to readme.
2015-12-02 19:13:39 -05:00
Patrick Seebauer
7ddda8527b Added vertical align commands
Squashed commit of the following:

commit 243a14e69501bf938eea54449782f43be2084ef2
Author: Patrick Seebauer <patrick.seebuaer@web.de>
Date:   Fri Sep 5 18:06:19 2014 +0200

    removed uniq line check and added warning in the docs about cursors on the same line.

commit 438658ef0358b0a1540c2663aedba0253150a007
Author: Patrick Seebauer <patrick.seebuaer@web.de>
Date:   Fri Sep 5 17:59:55 2014 +0200

    fixed tests for commands with character inputs

commit c565969c6bb01e37ec42cfe311ada87643e38ccc
Author: Patrick Seebauer <patrick.seebuaer@web.de>
Date:   Fri Sep 5 17:36:41 2014 +0200

    renamed to vertical align, added non-whitespace option

commit 941c40a319f571680017293681ff7d796ba4e1f4
Author: Patrick Seebauer <patrick.seebuaer@web.de>
Date:   Fri Sep 5 16:58:14 2014 +0200

    added test

commit d9a4a55ebde9b51c3f62b14948529759aaaa9bf6
Author: Patrick Seebauer <patrick.seebuaer@web.de>
Date:   Tue Sep 2 19:32:49 2014 +0200

    added interactives, added abort if cursors are on the same line

commit 12d01fe4db5109061533b0524d99177d1204eb85
Author: Patrick Seebauer <patrick.seebuaer@web.de>
Date:   Tue Sep 2 18:55:47 2014 +0200

    some adjustments

commit 9fddf98b6cd1bb68c334ab46fe1c9bcc08397796
Author: Patrick Seebauer <patrick.seebuaer@web.de>
Date:   Tue Sep 2 18:47:39 2014 +0200

    rough sketch
2014-09-05 18:36:04 +02:00
lexa
bf9e8e95e0 Added testcase for mc-hide-unmatched-lines-mode 2014-08-04 23:45:21 +04:00
Kouhei Yanagita
238fb970f9 Add edge case scenarios which test behavior of mc/cycle-forward and mc/cycle-backward 2014-01-05 14:50:00 +09:00
Ivan Andrus
2d639b0f45 Added tests for new mc/edit-lines 2013-11-27 17:53:11 -07:00
Maciej Katafiasz
bf4b0c669b Refactor mark-dwim tests to share a common background 2013-09-05 18:42:16 +02:00
Maciej Katafiasz
45ed43e1f8 Test edit-lines functionality in 'mc/mark-all-dwim' 2013-09-05 18:22:12 +02:00
Maciej Katafiasz
61388fedef Add 'mark-all-dwim' tests for selection 2013-09-05 18:07:52 +02:00
Maciej Katafiasz
49027c6717 Add basic tests for 'mc/mark-all-dwim' 2013-09-05 17:51:19 +02:00
Magnar Sveen
94af07453d Add some readability enhancing step definitions 2013-06-07 08:03:05 +02:00
Zach Kost-Smith
53db250b43 Added a mark-pop.feature file. 2013-05-26 16:08:21 -05:00
Magnar Sveen
69c99618f9 Use Carton for dev dependencies 2013-05-18 08:16:23 +02:00
Takafumi Arakaki
aa9a1ece7b Add failing scenarios for mark-all-symbols/words 2013-03-10 06:52:12 +01:00
Takafumi Arakaki
25dd14d350 Add more scenarios for mark-all-*-like-this 2013-03-10 06:49:25 +01:00
Takafumi Arakaki
373dcbe002 Add a scenario for mc/mark-all-symbols-like-this 2013-03-10 06:44:18 +01:00
Magnar Sveen
82a1fe3746 Add mc/sort-regions and mc/reverse-regions 2013-02-10 21:04:09 +01:00
Florian Mounier
5190e0cdc6 Add test case for shift-select-mode 2013-02-01 11:52:21 +01:00
Magnar Sveen
9582c7220b Add mc/insert-numbers
- adds increasing numbers for each cursor, top to bottom
2013-01-23 12:05:18 +01:00
Eyal Erez
6a5969e14a Adding support for using mc/edit-lines without transient mark mode. 2013-01-22 15:30:01 -05:00
Magnar Sveen
f721308591 Tweak mc/mark-all-like-this-dwim and add tests 2012-11-18 14:43:39 +01:00
Marco Baringer
1ec78e195f Don't let mc/mark-lines create 'double' cursors.
Previously using mc/mark-lines in a fowards/backwards/forwards
combination would cause multiple cursors to be placed at the same
point of the same line. This is not useful behaviour.

Noted while implementing magnars suggestion: https://github.com/magnars/multiple-cursors.el/pull/23#commitcomment-1983183
2012-10-12 17:04:36 +02:00
Marco Baringer
80ebdbb35b Added test for mc/mark-(next|previous)-like-this when there is no active region. 2012-10-10 13:37:40 +02:00
Marco Baringer
9ac7675c78 Added tests for mc/cycle-forward and mc/cycle-backward with their new looping behaviour 2012-10-10 13:36:45 +02:00
Magnar Sveen
7a6eb0df90 Never execute keyboard macros for fake cursors.
- The real cursor will execute the keyboard macro, resulting in new
   commands in the command loop, and the fake cursors can pick up on
   those instead.

Fixes #18
2012-10-02 12:19:00 +02:00
Magnar Sveen
97da9778fd Intercept some reading commands
- so you won't have to answer them for every single cursor

Fixes #15
2012-09-27 19:42:38 +02:00
Magnar Sveen
b48e2b7682 mc/edit-lines: Don't include the 'invisible' line
- when marking a region from bottom to top there is an invisible line
   in the region if mark is at the beginning of the line.
 - don't count that line when doing mc/edit-lines
2012-09-27 10:52:21 +02:00
Magnar Sveen
d7263f21f0 A more rubust way of finding the command currently being invoked.
- which is necessary because cua-mode does some wacky stuff.

Fixes #8
2012-09-27 00:29:25 +02:00
Magnar Sveen
37a89a6466 Remove mark-multiple-integration feature test 2012-09-24 20:00:49 +02:00
Magnar Sveen
f7d393d46e Don't use next-line and previous-line in non-interactive ways.
- it messes up in visual-line-mode

Fixes #10
2012-09-24 20:00:33 +02:00
Magnar Sveen
241e34ef2d Remove mark-multiple integration
- it caused more problems than it was solving

Fixes #9
2012-09-24 13:00:12 +02:00
Magnar Sveen
719fe40ca3 Integrate with rect.el instead of consolidating/splitting on kill-ring 2012-09-23 19:12:42 +02:00
Magnar Sveen
067063a346 Split multiline kill-ring entry over cursors when num lines match 2012-09-23 18:36:46 +02:00
Magnar Sveen
ef2226b993 Consolidate kill-ring entries when exiting multiple-cursors-mode 2012-09-23 16:26:04 +02:00
Magnar Sveen
f6403eae7f Fix assertion
- don't toggle rectangular-region-mode, check if it is on.
2012-09-19 17:35:00 +02:00
Magnar Sveen
b6077942c4 Add config for travis-ci 2012-09-19 17:26:09 +02:00
Magnar Sveen
f42e467bf8 Added mc-version of mark-all-in-region 2012-07-25 19:34:45 +02:00
Magnar Sveen
0d89125f60 Added mc-version of mark-all-like-this 2012-07-25 15:33:24 +02:00
Magnar Sveen
576bf90346 mc version of mark-previous-like-this 2012-07-24 20:54:37 +02:00
Magnar Sveen
36b262c99e Added mc-version of mark-next-like-this 2012-07-23 22:06:09 +02:00
Magnar Sveen
ca0e0ae9d9 Tests for rectangular-region-mode 2012-07-23 09:18:31 +02:00