mark-multiple

https://github.com/magnars/mark-multiple.el.git

git clone 'git://github.com/magnars/mark-multiple.el.git'
94

—–

—–

Please note! mark-multiple has been superseded by multiple-cursors

It has all the functionality of mark-multiple, but with a more robust implementation and more features.

To get the features from mark-multiple, use:

  • mc/mark-more-like-this in place of mark-more-like-this
  • set-rectangular-region-anchor as a more convenient replacement for inline-string-rectangle
  • or mc/edit-lines for a more familiar replacement for inline-string-rectangle
  • mc/mark-sgml-tag-pair in place of rename-sgml-tag

Read more about multiple-cursors on its own page.

—–


mark-multiple.el

An emacs extension that sorta lets you mark several regions at once.

More precisely, it allows for one master region, with several mirror regions. The mirrors are updated inline while you type. This allows for some awesome functionality. Or at least, some more visually pleasing insert and replace operations.

Video

You can watch an intro to mark-multiple at Emacs Rocks.

Done

Note: js2-rename-var has been moved to js2-refactor.el.

Installation

git submodule add https://github.com/magnars/mark-multiple.el.git site-lisp/mark-multiple

Then add the modules you want to your init-file:

(require 'inline-string-rectangle)
(global-set-key (kbd "C-x r t") 'inline-string-rectangle)

(require 'mark-more-like-this)
(global-set-key (kbd "C-<") 'mark-previous-like-this)
(global-set-key (kbd "C->") 'mark-next-like-this)
(global-set-key (kbd "C-M-m") 'mark-more-like-this) ; like the other two, but takes an argument (negative is previous)
(global-set-key (kbd "C-*") 'mark-all-like-this)

(add-hook 'sgml-mode-hook
          (lambda ()
            (require 'rename-sgml-tag)
            (define-key sgml-mode-map (kbd "C-c C-r") 'rename-sgml-tag)))

Feel free to come up with your own keybindings.

Bugs and gotchas

A wild idea

Is this a subset of a crazy multiple-point module? Would that even work?

Edit: Yes, indeed it is. And yes, it does. This module has been pretty much eclipsed by multiple-cursors.el, which goes quite a bit farther and with a saner implementation to boot.

Contribute

If you make some nice commands with mark-multiple, it would be great if you opened a pull-request. The repo is at:

https://github.com/magnars/mark-multiple.el

Contributors

Thanks!

License

Copyright (C) 2011 Magnar Sveen

Author: Magnar Sveen mailto:magnars@gmail.com Keywords: marking library

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 the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.