This repository has been archived on 2022-12-11. You can view files and clone it, but cannot push or open issues or pull requests.
dot-files/.emacs.d/config/editing.el

65 lines
2.1 KiB
EmacsLisp

;; (C) Copyright Collin J. Doering 2014
;;
;; 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 <http://www.gnu.org/licenses/>.
;; File: editing.el
;; Author: Collin J. Doering <collin.doering@rekahsoft.ca>
;; Date: Oct 22, 2014
;; Setup isearch+
(require 'isearch+)
;; Setup bookmark+
(require 'bookmark+)
;; Setup ace-jump-mode
(autoload
'ace-jump-mode
"ace-jump-mode"
"Emacs quick move minor mode"
t)
(define-key global-map (kbd "C-c SPC") 'ace-jump-mode)
;; Setup expand-region ;; ELPA
(require 'expand-region)
(global-set-key (kbd "C-=") 'er/expand-region)
;; Setup multiple-cursons ;; ELPA
(require 'multiple-cursors)
(global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
(global-set-key (kbd "C->") 'mc/mark-next-like-this)
(global-set-key (kbd "C-<") 'mc/mark-previous-like-this)
(global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this)
;; Setup fancy auto-complete
(require 'auto-complete-config) ;; ELPA
;;(add-to-list 'ac-dictionary-directories "/usr/share/emacs/site-lisp/auto-complete/ac-dict")
(ac-config-default)
;; Set trigger keys so yasnippet and auto-complete play nicely. If tab is pressed and the word at point exists
;; in yasnippet, then yassippet will be used; otherwise auto-complete will be used.
(ac-set-trigger-key "TAB")
(ac-set-trigger-key "<tab>")
;; Setup yasnippet-mode (not yasnippet-bundle)
(require 'yasnippet) ;; ELPA
(yas-load-directory "~/.emacs.d/elpa/yasnippet-20141017.1036")
(yas-load-directory "~/.emacs.d/snippets")
(yas-global-mode 1)
;; Enable flyspell-mode
(ac-flyspell-workaround)
;; Known Bug: flyspell-mode doesn't play nice with auto-complete-mode
;;(flyspell-mode)