| @@ -9,6 +9,7 @@ This is my emacs configuration file. I don't encourage anyone to use this verbat | |||
| but if you wanted to this is how you would do so: | |||
| ** Clone this repo | |||
| #+BEGIN_SRC sh :tangle no | |||
| git clone https://github.com/mitchty/dotfiles | |||
| #+END_SRC | |||
| @@ -19,7 +20,6 @@ Always good to back things up, just in case you hate how I did things. | |||
| #+BEGIN_SRC sh :tangle no | |||
| tar cvf ~/.emacs-backup.tar ~/.emacs.d ~/.emacs | |||
| #+END_SRC | |||
| ** Remove/move your old configuration | |||
| @@ -82,6 +82,7 @@ Not having to start *emacs* with *--debug-init* is useful. | |||
| #+BEGIN_SRC emacs-lisp | |||
| (setq debug-on-error t) | |||
| #+END_SRC | |||
| ** emacs server | |||
| Start up the emacs server if it isn't running. | |||
| @@ -90,6 +91,7 @@ Start up the emacs server if it isn't running. | |||
| (load "server") | |||
| (unless (server-running-p) (server-start)) | |||
| #+END_SRC | |||
| ** os detection | |||
| Make it easier to determine what os we're running on. | |||
| @@ -102,6 +104,7 @@ Make it easier to determine what os we're running on. | |||
| (defvar on-linux (string-match "gnu/linux" (symbol-name system-type)) | |||
| "Am I running under linux?") | |||
| #+END_SRC | |||
| *** Mac OS X Gui emacs PATH setup | |||
| This is here because if gui emacs gets started say from Finder, one can | |||
| @@ -112,6 +115,7 @@ then parse that to setup emacs exec-path. | |||
| For now we restrict this only to OSX. It may be more generally useful | |||
| however. | |||
| #+BEGIN_SRC emacs-lisp | |||
| (defun set-exec-path-from-shell-PATH () | |||
| (let ((path-from-shell | |||
| @@ -130,6 +134,7 @@ Like the startup screen and the echo hooey. | |||
| (customize-set-variable 'inhibit-startup-message t) | |||
| (customize-set-variable 'inhibit-startup-echo-area-message t) | |||
| #+END_SRC | |||
| ** temporary files | |||
| Keep temporary stuff isolated from everyone else. It infects everything otherwise. As bad as the .DS_Store files on osx. | |||
| @@ -146,6 +151,7 @@ Keep temporary stuff isolated from everyone else. It infects everything otherwis | |||
| (customize-set-variable 'backup-directory-alist `((".*" . ,temporary-file-directory))) | |||
| (customize-set-variable 'auto-save-file-name-transforms `((".*" ,temporary-file-directory t))) | |||
| #+END_SRC | |||
| ** auto revert | |||
| Update files in open buffers as they're changed on disk, freaking annoying without this on. | |||
| @@ -161,6 +167,7 @@ Use dired-x. | |||
| #+BEGIN_SRC emacs-lisp | |||
| (add-hook 'dired-load-hook (function (lambda () (load "dired-x")))) | |||
| #+END_SRC | |||
| ** ediff | |||
| For those rare times I use it, make it a bit less derp on output. | |||
| @@ -169,6 +176,7 @@ For those rare times I use it, make it a bit less derp on output. | |||
| (setq ediff-window-setup-function 'ediff-setup-windows-plain) | |||
| (setq ediff-split-window-function 'split-window-horizontally) | |||
| #+END_SRC | |||
| ** tramp | |||
| Tramp configuration. | |||
| @@ -201,6 +209,7 @@ Its a hack, but it work(ed). Will remove it at some date in the future. | |||
| (tramp-copy-keep-date nil) | |||
| (tramp-password-end-of-line nil))) | |||
| #+END_SRC | |||
| ** always remove trailing whitespace | |||
| Trailing whitespace is not normally useful. Remove it always on save in the *before-save-hook*. | |||
| @@ -216,13 +225,14 @@ Because its derp to have to chmod 755 stuff after I save. Honestly, do it for me | |||
| #+BEGIN_SRC emacs-lisp | |||
| (add-hook 'after-save-hook 'executable-make-buffer-file-executable-if-script-p) | |||
| #+END_SRC | |||
| ** misc text related | |||
| Not sure what to categorize this crap as tbh. | |||
| *** wtf does this do? | |||
| TOOD: find out why I added this ages ago. | |||
| TODO: find out why I added this ages ago. | |||
| #+BEGIN_SRC emacs-lisp :tangle no | |||
| (move-text-default-bindings) | |||
| @@ -326,6 +336,7 @@ Solarized light is decent. I'll just use that. | |||
| ** modeline | |||
| Updat the time every ~3 seconds in the mode line. | |||
| #+BEGIN_SRC emacs-lisp | |||
| (custom-set-variables '(display-time-default-load-average nil)) | |||
| (custom-set-variables '(display-time-format "%T")) | |||
| @@ -382,6 +393,7 @@ Format the mode line, I... can't decipher this anymore nor do I care to, it work | |||
| ** whitespace | |||
| Customize whitespace mode to make tabs obvious as boxes, and to highlight lines over 80 characters in length. | |||
| #+BEGIN_SRC emacs-lisp | |||
| (require 'whitespace) | |||
| @@ -408,6 +420,7 @@ Basically, never show the tool bar or the scroll bar in gui or tty. In gui its o | |||
| (when (not window-system) | |||
| (menu-bar-mode -1)) | |||
| #+END_SRC | |||
| ** fonts | |||
| Fonts. Let me specify them for gui emacs. | |||