Skip to content

Instantly share code, notes, and snippets.

@hugoroy
Last active April 23, 2017 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hugoroy/d8e9df44fbbe41f140a2cec2fcf3ee39 to your computer and use it in GitHub Desktop.
Save hugoroy/d8e9df44fbbe41f140a2cec2fcf3ee39 to your computer and use it in GitHub Desktop.
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)
(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.
'(ansi-color-names-vector
["#272822" "#F92672" "#A6E22E" "#E6DB74" "#66D9EF" "#FD5FF0" "#A1EFE4" "#F8F8F2"])
'(compilation-message-face (quote default))
'(custom-enabled-themes (quote (leuven)))
'(custom-safe-themes
(quote
("4aee8551b53a43a883cb0b7f3255d6859d766b6c5e14bcb01bed572fcbef4328" "4cf3221feff536e2b3385209e9b9dc4c2e0818a69a1cdb4b522756bcdf4e00a4" "08b8807d23c290c840bbb14614a83878529359eaba1805618b3be7d61b0b0a32" "f78de13274781fbb6b01afd43327a4535438ebaeec91d93ebdbba1e3fba34d3c" default)))
'(fci-rule-color "#3E4451")
'(global-visual-line-mode t)
'(highlight-changes-colors (quote ("#FD5FF0" "#AE81FF")))
'(highlight-tail-colors
(quote
(("#3C3D37" . 0)
("#679A01" . 20)
("#4BBEAE" . 30)
("#1DB4D0" . 50)
("#9A8F21" . 60)
("#A75B00" . 70)
("#F309DF" . 85)
("#3C3D37" . 100))))
'(inhibit-startup-screen t)
'(line-move-visual t)
'(magit-diff-use-overlays nil)
'(package-archives
(quote
(("gnu" . "http://elpa.gnu.org/packages/")
("org" . "http://orgmode.org/elpa/")
("melpa" . "https://melpa.org/packages/"))))
'(package-selected-packages
(quote
(pandoc-mode monokai-theme atom-one-dark-theme color-theme-sanityinc-solarized adaptive-wrap writeroom-mode markdown-mode+ markdown-mode ## org json-mode evil bind-key)))
'(pos-tip-background-color "#A6E22E")
'(pos-tip-foreground-color "#272822")
'(vc-annotate-background nil)
'(vc-annotate-color-map
(quote
((20 . "#F92672")
(40 . "#CF4F1F")
(60 . "#C26C0F")
(80 . "#E6DB74")
(100 . "#AB8C00")
(120 . "#A18F00")
(140 . "#989200")
(160 . "#8E9500")
(180 . "#A6E22E")
(200 . "#729A1E")
(220 . "#609C3C")
(240 . "#4E9D5B")
(260 . "#3C9F79")
(280 . "#A1EFE4")
(300 . "#299BA6")
(320 . "#2896B5")
(340 . "#2790C3")
(360 . "#66D9EF"))))
'(vc-annotate-very-old-color nil)
'(weechat-color-list
(unspecified "#272822" "#3C3D37" "#F70057" "#F92672" "#86C30D" "#A6E22E" "#BEB244" "#E6DB74" "#40CAE4" "#66D9EF" "#FB35EA" "#FD5FF0" "#74DBCD" "#A1EFE4" "#F8F8F2" "#F8F8F0"))
'(writeroom-extra-line-spacing 0.13))
(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.
'(fringe ((t (:background "white"))))
'(linum ((t (:inherit (shadow default) :height 0.75)))))
(add-to-list 'load-path "~/.emacs.d/elpa/")
(let ((default-directory "~/.emacs.d/elpa/"))
(normal-top-level-add-subdirs-to-load-path))
(require 'undo-tree)
(global-undo-tree-mode)
;; Vim-like "modes"
(require 'evil)
(evil-mode 1)
(define-key evil-normal-state-map (kbd "j") 'evil-next-visual-line)
(define-key evil-normal-state-map (kbd "k") 'evil-previous-visual-line)
;; Scrolling
(setq scroll-margin 5
scroll-conservatively 9999
scroll-step 1)
;; Backups
(setq backup-directory-alist '(("." . "~/.emacs.d/backups")))
(setq delete-old-versions -1)
(setq version-control t)
(setq vc-make-backup-files t)
(setq auto-save-file-name-transforms '((".*" "~/.emacs.d/auto-save-list/" t)))
;; History
(savehist-mode 1)
(setq savehist-file "~/.emacs.d/savehist")
(setq history-length t)
(setq history-delete-duplicates t)
(setq savehist-save-minibuffer-history 1)
(setq savehist-additional-variables
'(kill-ring
search-ring
regexp-search-ring))
;; Always follow symlinks
(setq vc-follow-symlinks t)
;; Bind-Keys
(require 'bind-key)
(bind-key "C-+" 'text-scale-increase)
(bind-key "C--" 'text-scale-decrease)
;; Recent Files
(require 'recentf)
(recentf-mode 1)
(defun recentf-open-files-compl ()
(interactive)
(let* ((all-files recentf-list)
(tocpl (mapcar (function
(lambda (x) (cons (file-name-nondirectory x) x))) all-files))
(prompt (append '("File name: ") tocpl))
(fname (completing-read (car prompt) (cdr prompt) nil nil)))
(find-file (cdr (assoc-ignore-representation fname tocpl)))))
;; Email editing
(autoload 'notmuch "notmuch" "notmuch mail" t)
(require 'notmuch)
(add-to-list 'auto-mode-alist '("hugo@xps.ampoliros.net" . notmuch-message-mode))
;; Hooks to combine major and minor modes
(add-hook 'markdown-mode-hook 'adaptive-wrap-prefix-mode)
(add-hook 'markdown-mode-hook 'pandoc-mode)
(add-hook 'notmuch-message-mode-hook 'adaptive-wrap-prefix-mode)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment