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

47 lines
1.7 KiB
EmacsLisp

(let* ((current-directory (file-name-directory load-file-name))
(features-directory (expand-file-name ".." current-directory))
(project-directory (expand-file-name ".." features-directory)))
(setq multiple-cursors-root-path project-directory)
(setq multiple-cursors-util-path (expand-file-name "util" project-directory)))
(add-to-list 'load-path multiple-cursors-root-path)
(add-to-list 'load-path multiple-cursors-util-path)
(add-to-list 'load-path (expand-file-name "espuds" multiple-cursors-util-path))
(add-to-list 'load-path (expand-file-name "vendor" multiple-cursors-util-path))
(require 'multiple-cursors)
(require 'espuds)
(require 'ert)
(require 'wrap-region)
(defun mc/save-lists ()) ;; redefine to do nothing when running tests
(Before
(cua-mode 0)
(multiple-cursors-mode 0)
(rectangular-region-mode 0)
(global-set-key (kbd "C->") 'mc/mark-next-like-this)
(global-set-key (kbd "C-S-c C->") 'mc/mark-next-like-this)
(global-set-key (kbd "C-<") 'mc/mark-previous-like-this)
(global-set-key (kbd "M-!") 'mc/mark-all-like-this)
(global-set-key (kbd "M-$") 'mc/mark-all-like-this-dwim)
(global-set-key (kbd "C-$") 'mc/mark-all-dwim)
(global-set-key (kbd "M-#") 'mc/mark-all-in-region)
(global-set-key (kbd "H-0") 'mc/insert-numbers)
(global-set-key (kbd "H-1") 'mc/reverse-regions)
(global-set-key (kbd "H-2") 'mc/sort-regions)
(global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
(global-set-key (kbd "H-SPC") 'set-rectangular-region-anchor)
(switch-to-buffer
(get-buffer-create "*multiple-cursors*"))
(erase-buffer)
(transient-mark-mode 1)
(cua-mode 0)
(delete-selection-mode 0)
(subword-mode 0)
(wrap-region-mode 0)
(setq set-mark-default-inactive nil)
(deactivate-mark))
(After)