57 Commits

Author SHA1 Message Date
Matus Goljer
340ff672a5 Add mc/split-region 2018-09-13 15:16:21 +02:00
Matus Goljer
6a7c3c0853 Fix whitespace 2018-09-13 14:37:07 +02:00
Dror Levin
038815b2b9
Make "no more matches found." user-error, fix #218 2018-06-06 22:33:08 +03:00
Josh Hunsaker
7cb18b8aec Fix bug in mc/mark-all-in-region-regexp. Fixes #293 2017-06-29 16:30:04 -07:00
Andrea Orru
21e48250ec mc/mark-previous-like-this-word/symbol. 2016-07-17 02:56:48 +02:00
Jules Tamagnan
a9daac129a Add/fix docstring to functions. fix #161
functions documented added:
 - mc/mark-next-word-like-this,
 - mc/mark-next-symbol-like-this
 - mc/mark-previous-word-like-this
 - mc/mark-previous-symbol-like-this

functions documented fixed:
 - mc/mark-previous-like-this
2016-05-20 08:51:09 -04:00
Bozhidar Batsov
741eec6766 Update some copyright years 2016-05-19 20:29:36 -07:00
Josh Hunsaker
9f4cdd0907 Modified mc/mark-lines to allow skipping 2016-04-29 12:22:07 -07: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
Nicolas Richard
06a2985db0 * mc-mark-more.el (mc/mark-all-in-region-regexp): Don't infloop when regexp matches empty string 2016-03-04 13:01:29 +01:00
Ingo Lohmar
e17851efd3 Fix click-toggling and make it robust (address all PR #239 comments)
- use marker-position for cursor overlay's point
- new helper function finds fake cursor with its actual *point* where we
  want it
- this also eliminates any need for additional require statements
2016-03-02 21:28:45 +01:00
Ingo Lohmar
40eb74e3e4 Extend mc/add-cursor-on-click to toggle fake cursors
- rename function accordingly and add alias
2016-03-01 20:31:47 +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
bbbe90d274 Minor changes mark-next-like-this-word and readme
* README.md: Adjust read to no longer recommend extend region if user
   is using mark-next-like-this-word
 * mc-mark-more.el: mark-next-like-this-word makrs whole word and not
   only from point to the end of the word
2015-12-04 16:28:29 -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
Justin Dove
5d677f765c Unrevert "Support unmarking with no region. Change mc/mark-lines to preserve point."
This reverts commit 2588ccef6939b77896105f23642483c30c4a4e06.
2015-06-08 09:20:46 -04:00
Justin Dove
49c9f7f6bf Merge remote-tracking branch 'upstream/master' 2015-06-08 09:18:33 -04:00
Justin Dove
c90bb624db Changed mc/furthest-cursor-after(before)-point to check if mark is active. 2015-06-07 18:06:55 -04:00
Magnar Sveen
2588ccef69 Revert "Support unmarking with no region. Change mc/mark-lines to preserve point."
This reverts commit 2d6ffce4c94cdbec1ea8ec086ea346423bafcdf1.

Fixes #201
2015-05-29 08:03:15 +02:00
Magnar Sveen
66b1127489 Merge pull request #192 from uk-ar/add_search_word
Enable to specify search word in mc/mark-all-in-region
2015-05-24 11:19:34 +02:00
Justin Dove
2d6ffce4c9 Support unmarking with no region. Change mc/mark-lines to preserve point. 2015-04-05 17:26:07 -04:00
uk-ar
72b4bf3911 Enable to specify search word in mc/mark-all-in-region 2015-04-04 06:29:46 +09:00
Magnar Sveen
da2a9abfd8 Add mc/mark-all-in-region-regexp
Thanks to Gabriel Antonioli :-)
2014-04-16 20:07:26 +02:00
Kouhei Yanagita
00aea4c9d7 Show appropriate error messages on trying skipping/unmarking commands with no fake cursors 2014-01-03 13:00:13 +09:00
Magnar Sveen
17c48f972a Merge pull request #111 from mathrick/mark-all-dwim
Add mc/mark-all-dwim to autoloads
2013-09-13 11:48:11 -07:00
Maciej Katafiasz
6467fe251d Add mc/mark-all-dwim to autoloads 2013-09-13 18:29:22 +02:00
Magnar Sveen
65c0c0c6fe Merge pull request #104 from mathrick/mark-all-dwim
Add new command, mark-all-dwim
2013-09-06 12:57:31 -07:00
Maciej Katafiasz
ec4781394c Derp, multiple cursors means > 1, not > 0. 2013-09-06 19:44:31 +02:00
Maciej Katafiasz
18d858f0de Fall straight through in 'mc/mark-all-dwim' if multiple cursors are already active, as that means we can't sensibly edit lines or mark all in region 2013-09-06 14:52:16 +02:00
Maciej Katafiasz
a86daa79ce Guard with 'if' rather than defun*/return-from 2013-09-06 09:33:37 +02:00
Maciej Katafiasz
8dfe725c4f Abort immediately when empty search pattern is passed to 'mc/mark-all-in-region' 2013-09-05 23:53:59 +02:00
Maciej Katafiasz
af66635a05 Make 'mc/mark-all-dwim' into 'mc/edit-lines' if prefix arg is passed 2013-09-05 18:16:39 +02:00
Maciej Katafiasz
5e879f9b5c Guard against empty search pattern in 'mc/mark-all-in-region', otherwise it will enter an infinite loop 2013-09-05 17:42:36 +02:00
Maciej Katafiasz
45c6cd0be4 Add mc/mark-all-dwim 2013-08-30 22:36:01 +02:00
Akinori MUSHA
2186e1b6e5 mc/mark-lines: Mark by logical lines. 2013-08-01 17:00:03 +09:00
Magnar Sveen
754de4e63b Backport set-temporary-overlay-map to emacs <24.3
Fixes #88
2013-07-11 09:14:06 +02:00
Magnar Sveen
cc45842384 Improved mc/mark-more-like-this-extended
- support for terminal
 - more instructive message
 - keymap that can be rebound

Fixes #84
2013-06-07 23:18:19 +02:00
Magnar Sveen
ccb42b5d70 Inline defun for better readability. 2013-03-15 20:21:34 +01:00
Takafumi Arakaki
1cdd73037f Automatically select word/symbol 2013-03-10 06:53:53 +01:00
Magnar Sveen
0ee76bfad1 Add mc/add-cursor-on-click 2013-02-20 07:05:18 +01:00
Magnar Sveen
bc8af45bfe Use derived-mode-p to check for sgml-mode-ishness. 2012-11-21 13:22:27 +01:00
Magnar Sveen
0a081a7c5f Move mc/maybe-multiple-cursors-mode to core. 2012-11-18 21:10:09 +01:00
Magnar Sveen
7d79b983ea Autoload new functions. 2012-11-18 16:08:10 +01:00
Magnar Sveen
c010afbbef Rename mc/mark-sgml-tags to mc/mark-sgml-tag-pair 2012-11-18 14:45:25 +01:00
Magnar Sveen
f721308591 Tweak mc/mark-all-like-this-dwim and add tests 2012-11-18 14:43:39 +01:00
unknown
1074c88c99 Added mc/mark-all-like-this-dwim 2012-10-27 20:33:51 +02:00
Magnar Sveen
fe211c018c Add word/symbol limiting mark-more functions:
- mc/mark-next-word-like-this
 - mc/mark-next-symbol-like-this
 - mc/mark-previous-word-like-this
 - mc/mark-previous-symbol-like-this
 - mc/mark-all-words-like-this
 - mc/mark-all-symbols-like-this

Fixes #24
2012-10-26 22:51:40 +02: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
3f20fc15a7 When no region is active mc/mark-next-like-this and mc/mark-previous-like-this should create a cursor one like up (or down).
Added the functions mc/mark-next-lines and mc/mark-previous-lines
which create cursors one line above and below point.

Refactored common mc/mark-previous-like-this and
mc/mark-next-like-this functionality into mc/mark-more-like-this.

Changed mc/mark-next-like-this and mc/mark-more-like-this to call
mc/mark-next-lines and mc/mark-previous-lines when there is no
active region (instead of erroring).
2012-10-10 11:15:22 +02:00
Magnar Sveen
a0f771f3e4 Include interactive commands for deselecting prev/next
Fixes #21
2012-10-04 07:47:31 +02:00