Skip to content

Instantly share code, notes, and snippets.

@tam17aki
Last active August 29, 2015 14:09
Show Gist options
  • Save tam17aki/e1df3d6a242e54029ee7 to your computer and use it in GitHub Desktop.
Save tam17aki/e1df3d6a242e54029ee7 to your computer and use it in GitHub Desktop.
(require 'multiple-cursors)
(require 'expand-region)
(defun mc/mark-all-dwim-or-expand-region (arg)
(interactive "p")
(cl-case arg
(16 (mc/mark-all-dwim t))
(4 (mc/mark-all-dwim nil))
(1 (call-interactively 'er/expand-region))))
;; C-M-SPCでer/expand-region
;; C-u C-M-SPCでmc/mark-all-in-region
;; C-u C-u C-M-SPCでmc/edit-lines
(global-set-key (kbd "C-M-SPC") 'mc/mark-all-dwim-or-expand-region)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment