Commits

Jeffrey Stoffers committed c6c00d8

Commit

Comments (0)

Files changed (2)

.emacs.d/config.el

 ;; Code editing tweaks
 (show-paren-mode 1) ;Match parens
 (setq compilation-scroll-output 1) ;Scroll flyspell
-(electric-indent-mode 1) ;Indent on enter
+;; (electric-indent-mode 1) ;Enabled Out of the box now
 
 ;; No stupid #*# autosave files everywhere
 (setq auto-save-file-name-transforms `((".*" ,temporary-file-directory t)))
 ;; Spellcheck buffer when enabling flyspell mode
 (add-hook 'flyspell-mode-hook 'flyspell-buffer)
 
+;; Prettify whitespace before saving
+;; http://ruslanspivak.com/2010/10/11/nuke-whitespaces-on-file-saving/
+(add-hook 'before-save-hook 'whitespace-cleanup)
+
+
+;;;-----------------------------------------------------------------------------
+;;; Smex setup
+;;;-----------------------------------------------------------------------------
+(global-set-key (kbd "M-x") 'smex)
+(global-set-key (kbd "M-X") 'smex-major-mode-commands)
+;; This is your old M-x.
+(global-set-key (kbd "C-c C-c M-x") 'execute-extended-command)
+
 ;;;-----------------------------------------------------------------------------
 ;;; auto-complete setup
 ;;;-----------------------------------------------------------------------------
 (sp-pair "'" nil :actions :rem) ; WHY WOULD YOU DO THIS?
 
 ;;;-----------------------------------------------------------------------------
+;;; Rainbow Delimiters
+;;;-----------------------------------------------------------------------------
+;; use colors stronger than default. more saturated, i.e., less gray.
+;; http://yoo2080.wordpress.com/2013/09/08/living-with-rainbow-delimiters-mode/
+(require 'cl-lib)
+(require 'color)
+(cl-loop
+ for index from 1 to rainbow-delimiters-max-face-count
+ do
+ (let ((face (intern (format "rainbow-delimiters-depth-%d-face" index))))
+   (cl-callf color-saturate-name (face-foreground face) 30)))
+
+;;;-----------------------------------------------------------------------------
 ;;; auto-complete setup for cider
 ;;;-----------------------------------------------------------------------------
 (require 'ac-nrepl)
   (interactive)
   (compile (concat "lein kibit " buffer-file-name)))
 
-;; WINDOWS BLOWS
+
+;;;-----------------------------------------------------------------------------
+;;; Windows configuration (i.e. WINDOWS BLOWS)
+;;;-----------------------------------------------------------------------------
 (when (eq system-type 'windows-nt)
   (require 'tramp)
   (setq tramp-default-method "plink"
 ;;;---------------------------------------------------------------------
 ;;; Emacs ledger mode
 ;;;---------------------------------------------------------------------
-;(add-to-list 'load-path (expand-file-name "/home/necronian/src/ledger/lisp/"))
-;(load "ldg-new")
 (add-to-list 'auto-mode-alist '("\\.ledger$" . ledger-mode))
 
 ;; MISC BINDINGS
 (global-set-key (kbd "C-x C-z") 'magit-status)
+
+;; What?
 (autoload 'window-number-mode "window-number" t)
 (require 'package)
 (package-initialize)
 
+;; Lets Use all the packages
 (setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
 			 ("org" . "http://orgmode.org/elpa/")
                          ("marmalade" . "http://marmalade-repo.org/packages/")
                          ("melpa" . "http://melpa.milkbox.net/packages/")))
 
+;; Make sure things are up to date
 (package-refresh-contents)
 
 ;;;---------------------------------------------------------------------
 		      cdlatex
 		      cider
 		      cljdoc
-		      erc-image
-		      erc-tweet
 		      flymake-lua
 		      gnuplot
 		      gnuplot-mode
 		      rainbow-delimiters
 		      slamhound
 		      smartparens
+		      smex
 		      undo-tree
 		      w3m
 		      wc-mode
 ;;;---------------------------------------------------------------------
 ;;; Install Packages through package install
 ;;;---------------------------------------------------------------------
-;(package-refresh-contents)
 (dolist (p my-packages)
   (when (not (package-installed-p p))
     (package-install p)))
  ;; 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.
+ '(haskell-mode-hook (quote (turn-on-haskell-indent)))
  '(org-agenda-files nil))
 (custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
  )
+