Emacs: tiny config overhaul.
parent
6c08d4c442
commit
73d26a46bc
15
.emacs
15
.emacs
|
@ -1,7 +1,7 @@
|
|||
;; -*- mode:emacs-lisp -*-
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Emacs config
|
||||
;; 2013-06-11
|
||||
;; 2013-06-12
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defvar my-keys-minor-mode-map (make-keymap)
|
||||
|
@ -21,14 +21,21 @@ Example: to assign some-function to C-i, use
|
|||
t " my-keys" 'my-keys-minor-mode-map)
|
||||
(add-hook 'minibuffer-setup-hook (lambda () (my-keys-minor-mode 0) ) )
|
||||
|
||||
;; Main should be loaded first.
|
||||
(load "~/.emacs.d/main" nil t)
|
||||
;; Cache folder is everything we do not want to track.
|
||||
(setq emacs-cache-folder "~/.cache/emacs/")
|
||||
(if
|
||||
(not (file-directory-p emacs-cache-folder))
|
||||
(make-directory emacs-cache-folder t))
|
||||
|
||||
;; Local plugin folder for quick install.
|
||||
(add-to-list 'load-path "~/.emacs.d/plugins")
|
||||
|
||||
|
||||
(load "~/.emacs.d/functions" nil t)
|
||||
(load "~/.emacs.d/main" nil t)
|
||||
(load "~/.emacs.d/modes" nil t)
|
||||
(load "~/.emacs.d/personal" nil t)
|
||||
(load "~/.emacs.d/plugins" nil t)
|
||||
(load "~/.emacs.d/personal" nil t)
|
||||
(load "~/.emacs.d/theme" nil t)
|
||||
|
||||
;; We need to put it at the end to make sure it doesn't get overriden by other
|
||||
|
|
|
@ -73,6 +73,7 @@
|
|||
("btw" "by the way" nil 1)
|
||||
("ca" "ça" nil 1)
|
||||
("cad" "c'est-à-dire" nil 1)
|
||||
("cest" "c'est" nil 1)
|
||||
("chai" "je sais" nil 1)
|
||||
("chq" "chaque" nil 1)
|
||||
("chui" "je suis" nil 1)
|
||||
|
|
|
@ -203,4 +203,4 @@ Enlarge/Shrink by ARG columns, or 5 if arg is nil."
|
|||
(indent-region (region-beginning) (region-end))
|
||||
(save-restriction
|
||||
(narrow-to-region (region-beginning) (region-end))
|
||||
(delete-trailing-whitespace))))
|
||||
(delete-trailing-whitespace))))
|
||||
|
|
|
@ -2,12 +2,6 @@
|
|||
;; MAIN
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; Cache folder is everything we do not want to track.
|
||||
(setq emacs-cache-folder "~/.cache/emacs/")
|
||||
(if
|
||||
(not (file-directory-p emacs-cache-folder))
|
||||
(make-directory emacs-cache-folder t))
|
||||
|
||||
;; Remember last cursor position
|
||||
(require 'saveplace)
|
||||
(setq save-place-file (concat emacs-cache-folder "saveplace"))
|
||||
|
@ -21,16 +15,15 @@
|
|||
(setq backup-directory-alist
|
||||
`((".*" . ,(concat emacs-cache-folder "backups/"))))
|
||||
|
||||
;; Other options.
|
||||
;; Other backup options.
|
||||
; (setq backup-inhibited t) ;; Disable backup files.
|
||||
; (setq make-backup-files t) ;; Enable backup files.
|
||||
; (setq version-control t) ;; Enable numbered versioning.
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Default mode
|
||||
(setq default-major-mode 'text-mode)
|
||||
|
||||
;; Disable suspend key since it is useless on emacs server
|
||||
;; Disable suspend key since it is useless on emacs server.
|
||||
(global-unset-key (kbd "C-z"))
|
||||
(global-unset-key (kbd "C-x C-z"))
|
||||
|
||||
|
@ -38,8 +31,10 @@
|
|||
(setq inhibit-startup-screen t)
|
||||
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
|
||||
(menu-bar-mode -1)
|
||||
;; (scroll-bar-mode -1)
|
||||
(if (fboundp 'set-scroll-bar-mode) (set-scroll-bar-mode 'left))
|
||||
(when (fboundp 'set-scroll-bar-mode)
|
||||
;; (scroll-bar-mode -1)
|
||||
(set-scroll-bar-mode 'left)
|
||||
(define-key my-keys-minor-mode-map (kbd "C-<f6>") 'toggle-scroll-bar))
|
||||
|
||||
;; Make questions less annoying.
|
||||
(defalias 'yes-or-no-p 'y-or-n-p)
|
||||
|
@ -150,7 +145,6 @@
|
|||
;; Semantic options.
|
||||
(semantic-mode 1)
|
||||
(setq semanticdb-default-save-directory (concat emacs-cache-folder "semanticdb"))
|
||||
;; Semantic with ghost display (allows M-n and M-p to browse completion).
|
||||
(define-key my-keys-minor-mode-map (kbd "C-c , d") 'semantic-ia-show-summary)
|
||||
(define-key my-keys-minor-mode-map (kbd "C-, d") 'semantic-ia-show-summary)
|
||||
(define-key my-keys-minor-mode-map (kbd "C-, g") 'semantic-symref-symbol)
|
||||
|
@ -158,6 +152,8 @@
|
|||
(define-key my-keys-minor-mode-map (kbd "C-, j") 'semantic-complete-jump-local)
|
||||
(define-key my-keys-minor-mode-map (kbd "C-, J") 'semantic-complete-jump)
|
||||
(define-key my-keys-minor-mode-map (kbd "C-, l") 'semantic-analyze-possible-completions)
|
||||
|
||||
;; Semantic with ghost display (allows M-n and M-p to browse completion).
|
||||
;; (setq semantic-complete-inline-analyzer-displayor-class 'semantic-displayor-ghost)
|
||||
;; (setq semantic-complete-inline-analyzer-displayor-class 'semantic-displayor-tooltip)
|
||||
;; (setq semanticdb-find-default-throttle '(project unloaded system recursive))
|
||||
|
|
Loading…
Reference in New Issue