From b1ea7f2230a8e7032450b0ef8273916c0839858c Mon Sep 17 00:00:00 2001 From: Magnar Sveen Date: Wed, 25 Jul 2012 23:00:19 +0200 Subject: [PATCH] Add licences to all el-files. --- README.md | 4 ++++ mc-cycle-cursors.el | 30 ++++++++++++++++++++++++++++++ mc-edit-lines.el | 31 +++++++++++++++++++++++++++++++ mc-mark-more.el | 31 +++++++++++++++++++++++++++++++ mc-mark-multiple-integration.el | 29 +++++++++++++++++++++++++++++ multiple-cursors-core.el | 29 +++++++++++++++++++++++++++++ rectangular-region-mode.el | 32 ++++++++++++++++++++++++++++++++ 7 files changed, 186 insertions(+) diff --git a/README.md b/README.md index f49cc4a..862312e 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,10 @@ the buffer. BTW, I highly recommend adding `mc/mark-next-like-this` to a key binding that's right next to the key for `er/expand-region`. +## Scrolling + +Sometimes you end up with cursors outside of your view. You can scroll the +screen to center on each cursor with `C-v` and `M-v`. ## Unknown commands diff --git a/mc-cycle-cursors.el b/mc-cycle-cursors.el index f89a9d0..d26bd82 100644 --- a/mc-cycle-cursors.el +++ b/mc-cycle-cursors.el @@ -1,3 +1,31 @@ +;;; mc-cycle-cursors.el + +;; Copyright (C) 2012 Magnar Sveen + +;; Author: Magnar Sveen +;; Keywords: editing cursors + +;; 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. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; This scrolls the buffer to center each cursor in turn. +;; Scroll down with C-v, scroll up with M-v +;; This is nice when you have cursors that's outside of your view. + +;;; Code: + (eval-when-compile (require 'cl)) (defun mc/next-cursor-after-point () @@ -46,3 +74,5 @@ (define-key mc/keymap (kbd "M-v") 'mc/cycle-backward) (provide 'mc-cycle-cursors) + +;;; mc-cycle-cursors.el ends here diff --git a/mc-edit-lines.el b/mc-edit-lines.el index 8093da8..7234f3d 100644 --- a/mc-edit-lines.el +++ b/mc-edit-lines.el @@ -1,3 +1,32 @@ +;;; mc-edit-lines.el + +;; Copyright (C) 2012 Magnar Sveen + +;; Author: Magnar Sveen +;; Keywords: editing cursors + +;; 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. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; This file contains functions to add multiple cursors to consecutive lines +;; given an active region. + +;; Please see multiple-cursors.el for more commentary. + +;;; Code: + (defun mc/edit-lines () "Add one cursor to each line of the active region. Starts from mark and moves in straight down or up towards the @@ -33,3 +62,5 @@ mark-multiple if point and mark is on different columns." (beginning-of-line)) (provide 'mc-edit-lines) + +;;; mc-edit-lines.el ends here diff --git a/mc-mark-more.el b/mc-mark-more.el index 0814567..133b93b 100644 --- a/mc-mark-more.el +++ b/mc-mark-more.el @@ -1,3 +1,32 @@ +;;; mc-mark-more.el + +;; Copyright (C) 2012 Magnar Sveen + +;; Author: Magnar Sveen +;; Keywords: editing cursors + +;; 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. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; This file contains functions to mark more parts of the buffer. +;; See ./features/mark-more.feature for examples. + +;; Please see multiple-cursors.el for more commentary. + +;;; Code: + (defun mc/cursor-end (cursor) (if (overlay-get cursor 'mark-active) (max (overlay-get cursor 'point) @@ -196,3 +225,5 @@ is one of the above." (push ev unread-command-events))) (provide 'mc-mark-more) + +;;; mc-mark-more.el ends here diff --git a/mc-mark-multiple-integration.el b/mc-mark-multiple-integration.el index 1edb6dc..e087aed 100644 --- a/mc-mark-multiple-integration.el +++ b/mc-mark-multiple-integration.el @@ -1,3 +1,30 @@ +;;; mc-mark-multiple-integration.el + +;; Copyright (C) 2012 Magnar Sveen + +;; Author: Magnar Sveen +;; Keywords: editing cursors + +;; 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. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; When using mark-multiple, you can now use C-g to switch to multiple-cursors + +;;; Code: + + (require 'mark-multiple) (defun mc/switch-from-mark-multiple-to-cursors () @@ -15,3 +42,5 @@ (define-key mm/keymap (kbd "C-g") 'mc/switch-from-mark-multiple-to-cursors) (provide 'mc-mark-multiple-integration) + +;;; mc-mark-multiple-integration.el ends here diff --git a/multiple-cursors-core.el b/multiple-cursors-core.el index 3a69de7..6e9de90 100644 --- a/multiple-cursors-core.el +++ b/multiple-cursors-core.el @@ -1,3 +1,30 @@ +;;; multiple-cursors-core.el --- An experiment in multiple cursors for emacs. + +;; Copyright (C) 2012 Magnar Sveen + +;; Author: Magnar Sveen +;; Keywords: editing cursors + +;; 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. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; This file contains the core functionality of multiple-cursors. +;; Please see multiple-cursors.el for more commentary. + +;;; Code: + (eval-when-compile (require 'cl)) (defface mc/cursor-face @@ -439,3 +466,5 @@ for running commands with multiple cursors.") (load mc/list-file t) ;; load, but no errors if it does not exist yet please (provide 'multiple-cursors-core) + +;;; multiple-cursors-core.el ends here diff --git a/rectangular-region-mode.el b/rectangular-region-mode.el index 6493003..7cb5da4 100644 --- a/rectangular-region-mode.el +++ b/rectangular-region-mode.el @@ -1,3 +1,33 @@ +;;; rectangular-region-mode.el + +;; Copyright (C) 2012 Magnar Sveen + +;; Author: Magnar Sveen +;; Keywords: editing cursors + +;; 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. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; (global-set-key (kbd "H-SPC") 'set-rectangular-region-anchor) + +;; 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. + +;;; Code: + + (require 'multiple-cursors-core) (defvar rrm/anchor (make-marker) @@ -77,3 +107,5 @@ (set-marker rrm/anchor nil))) (provide 'rectangular-region-mode) + +;;; rectangular-region-mode.el ends here