This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(when (>= emacs-major-version 24) | |
(require 'package) | |
(package-initialize) | |
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")) | |
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/")) | |
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/")) | |
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/")) | |
) | |
(custom-set-variables | |
;; custom-set-variables was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
'(custom-enabled-themes (quote (solarized-light))) | |
'(custom-safe-themes | |
(quote | |
("d677ef584c6dfc0697901a44b885cc18e206f05114c8a3b7fde674fce6180879" "1e7e097ec8cb1f8c3a912d7e1e0331caeed49fef6cff220be63bd2a6ba4cc365" "e16a771a13a202ee6e276d06098bc77f008b73bbac4d526f160faa2d76c1dd0e" "fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" "8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" default)))) | |
(custom-set-faces | |
;; custom-set-faces was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
) | |
(add-hook 'before-save-hook 'delete-trailing-whitespace) | |
(add-hook 'before-save-hook 'delete-blank-lines) | |
;; Default and per-save backups go here: | |
(setq backup-directory-alist '(("" . "~/.emacs.d/backup/per-save"))) | |
(defun force-backup-of-buffer () | |
;; Make a special "per session" backup at the first save of each | |
;; emacs session. | |
(when (not buffer-backed-up) | |
;; Override the default parameters for per-session backups. | |
(let ((backup-directory-alist '(("" . "~/.emacs.d/backup/per-session"))) | |
(kept-new-versions 3)) | |
(backup-buffer))) | |
;; Make a "per save" backup on each save. The first save results in | |
;; both a per-session and a per-save backup, to keep the numbering | |
;; of per-save backups consistent. | |
(let ((buffer-backed-up nil)) | |
(backup-buffer))) | |
(add-hook 'before-save-hook 'force-backup-of-buffer) | |
(global-set-key (kbd "M-<up>") 'windmove-up) | |
(global-set-key (kbd "M-<down>") 'windmove-down) | |
(global-set-key (kbd "M-<right>") 'windmove-right) | |
(global-set-key (kbd "M-<left>") 'windmove-left) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment