Emacs: multiple cursors support.

master
Pierre Neidhardt 2013-03-16 15:58:50 +01:00
parent 51a2f31964
commit ed43a3a77c
2 changed files with 30 additions and 11 deletions

11
.emacs.d/mc-lists.el Normal file
View File

@ -0,0 +1,11 @@
;; This file is automatically generated by the multiple-cursors extension.
;; It keeps track of your preferences for running commands with multiple cursors.
(setq mc/cmds-to-run-for-all
'(
ispell-word
))
(setq mc/cmds-to-run-once
'(
))

View File

@ -23,15 +23,11 @@
(progn
(yas/initialize)
(yas/load-directory yas-snippet-dirs))
;; New yasnippet versions.
(progn
(yas-global-mode 1)
(yas-load-directory yas-snippet-dirs))
)
))
(yas-load-directory yas-snippet-dirs)) ) ))
;;==============================================================================
;; Lua
@ -52,8 +48,7 @@
("Wikibooks" "http://en.wikibooks.org/w/" "Ambrevar" "" "LaTeX")
("ArchLinux" "https://wiki.archlinux.org/" "Ambrevar" "" "Mutt")
("WikEmacs" "https://wikemacs.org/wiki/" "Ambrevar" "" "Main Page")
)
)
))
;; Macros.
;; Use C-( stuff C-) to record a macro.
@ -107,9 +102,7 @@
;; TODO: Bindings to not work???
;; (local-set-key (kbd "C-c l L") 'ltx-template-source-to-latex)
;; (local-set-key (kbd "C-c l U") 'ltx-template-source-to-usage)
))
))
)) ))
;;==============================================================================
;; DoxyMacs
@ -153,3 +146,18 @@
;;==============================================================================
(if (require 'xclip nil t)
(turn-on-xclip))
;;==============================================================================
;; Multiple-Cursors
;;==============================================================================
(add-to-list 'load-path "/usr/share/emacs/site-lisp/multiple-cursors")
(if (require 'multiple-cursors nil t)
(progn
(setq mc/list-file "~/.emacs.d/mc-lists.el")
(define-key my-keys-minor-mode-map (kbd "C-c C-a") 'mc/edit-beginnings-of-lines)
(define-key my-keys-minor-mode-map (kbd "C-c C-e") 'mc/edit-ends-of-lines)
(define-key my-keys-minor-mode-map (kbd "C-c C-r") 'mc/edit-lines)
(define-key my-keys-minor-mode-map (kbd "C-c C-n") 'mc/mark-next-word-like-this)
(define-key my-keys-minor-mode-map (kbd "C-c C-p") 'mc/mark-previous-word-like-this)
(define-key my-keys-minor-mode-map (kbd "C-c C-l") 'mc/mark-all-like-this-dwim)))