Created
December 11, 2008 23:23
-
-
Save plathrop/34936 to your computer and use it in GitHub Desktop.
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
(setq user-full-name "Paul Lathrop" | |
user-mail-address "[email protected]") | |
(require 'cl) | |
(setq-default indent-tabs-mode nil) | |
(setq inhibit-startup-message t | |
require-final-newline t | |
backup-directory-alist'((".*" . "~/emacs/backups")) | |
version-control t | |
kept-old-versions 4 | |
kept-new-versions 8 | |
delete-old-versions t | |
windmove-wrap-around t | |
truncate-lines nil | |
truncate-partial-width-windows nil | |
partial-completion-mode t | |
;; Mark buffer unmodified when auto-inserting in a new file. This | |
;; makes it easier to kill the buffer if you don't add content. | |
auto-insert 'other | |
auto-insert-query nil) | |
(setq hippie-expand-try-functions-list | |
'(try-expand-dabbrev | |
try-expand-dabbrev-all-buffers | |
try-expand-dabbrev-from-kill | |
try-complete-lisp-symbol-partially | |
try-complete-lisp-symbol | |
try-complete-file-name-partially | |
try-complete-file-name | |
try-expand-list | |
try-expand-line)) | |
(if window-system | |
(progn | |
(scroll-bar-mode -1) | |
(tool-bar-mode -1) | |
(setq initial-frame-alist `((left . 0) (top . 20) | |
(width . 237) (height . 77) | |
(font . "-apple-andale mono-medium-r-normal--10-0-72-72-m-0-iso10646-1")) | |
default-frame-alist '((font . "-apple-andale mono-medium-r-normal--10-0-72-72-m-0-iso10646-1")) | |
mac-option-modifier 'meta | |
cursor-type 'box | |
;; Merge the system clipboard with the kill ring. | |
x-select-enable-clipboard t) | |
(mouse-avoidance-mode 'animate) | |
(set-background-color "gray97") | |
(set-cursor-color "Red") | |
(blink-cursor-mode 1)) | |
(progn | |
(menu-bar-mode -1))) | |
;; Old color-theme stuff, but I'm not sure I'll be using it anymore. | |
; (require 'color-theme) | |
; (color-theme-initialize) | |
; (color-theme-arjen) | |
; (set-face-foreground 'font-lock-keyword-face "Cyan")) | |
(show-paren-mode t) | |
(column-number-mode t) | |
(transient-mark-mode t) | |
(global-hl-line-mode 1) | |
(put 'narrow-to-region 'disabled nil) | |
(put 'narrow-to-page 'disabled nil) | |
(put 'downcase-region 'disabled nil) | |
(put 'set-goal-column 'disabled nil) | |
(fset 'yes-or-no-p 'y-or-n-p) | |
;; Potentially insert templates into newly-made files. Depends on the | |
;; value of auto-insert-alist. | |
(add-hook 'find-file-hook 'auto-insert) | |
(add-hook 'write-file-hooks 'delete-trailing-whitespace) | |
(add-hook 'after-save-hook 'executable-make-buffer-file-executable-if-script-p) | |
(windmove-default-keybindings 'meta) | |
(global-set-key (kbd "M-r") 'isearch-backward-regexp) | |
(global-set-key (kbd "M-s") 'isearch-forward-regexp) | |
(global-set-key (kbd "M-/") 'hippie-expand) | |
(global-set-key (kbd "M-`") 'other-window) | |
(global-set-key (kbd "C-c b") 'bury-buffer) | |
(global-set-key (kbd "C-c e") 'start-erc) | |
(global-set-key (kbd "C-c ;") 'kill-comment) | |
(global-set-key (kbd "<f12>") 'dell-size) | |
(global-set-key (kbd "M-<f12>") 'laptop-size) | |
(global-set-key (kbd "M-p") 'pop-to-mark-command) | |
(global-set-key (kbd "C-x C-c") 'save-buffers-kill-emacs) | |
(add-to-list 'load-path "~/emacs/lib") | |
;;; savehist | |
(savehist-mode 1) ;Save minibuffer history between sessions | |
;;; ido | |
;; (setq ido-enable-flex-matching t) | |
;; (ido-mode t) | |
;;; iswitchb | |
(iswitchb-mode 1) | |
;;; minibuffer | |
(minibuffer-electric-default-mode t) | |
;;; VC | |
(setq vc-dired-terse-display nil | |
vc-dired-recurse nil | |
vc-delete-logbuf-window nil) | |
;;; Dired | |
(setq dired-recursive-copies t | |
dired-recursive-deletes t) | |
;;; ERC | |
(load "~/emacs/irc.el") | |
;;; Elisp | |
(add-hook 'emacs-lisp-mode-hook 'eldoc-mode) | |
;;; Python | |
(add-hook 'python-mode-hook | |
(lambda () | |
(c-subword-mode t) ;Recognize CamelCase word boundaries | |
(setq fill-column 79) | |
(turn-on-auto-fill) | |
(turn-on-eldoc-mode) | |
(setq hippie-expand-try-functions-list | |
'(python-try-complete | |
try-expand-dabbrev | |
try-expand-dabbrev-all-buffers | |
try-expand-dabbrev-from-kill | |
try-expand-line)))) | |
;;; Tramp | |
(setq tramp-default-method "ssh") | |
;;; Puppet | |
(autoload 'puppet-mode "puppet-mode" "Major mode for editing puppet manifests") | |
(add-to-list 'auto-mode-alist '("\\.pp\\'" . puppet-mode)) | |
;;; Subversion | |
(require 'psvn) | |
;;; Unique Buffer Names | |
(require 'uniquify) | |
(setq uniquify-buffer-name-style 'post-forward-angle-brackets) | |
;;; Org Mode | |
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode)) | |
(define-key global-map "\C-cl" 'org-store-link) | |
(define-key global-map "\C-ca" 'org-agenda) | |
(setq org-log-done t) | |
;;; Gist | |
(require 'gist) | |
;;; Emacsclient | |
(server-start) | |
;;; Utility Functions | |
(defun dell-size () | |
"Adjusts frame size and position for my Dell monitor at work." | |
(interactive) | |
(set-frame-parameter (selected-frame) 'left '(+ 1444)) | |
(set-frame-parameter (selected-frame) 'width 317) | |
(set-frame-parameter (selected-frame) 'top 0) | |
(set-frame-parameter (selected-frame) 'height 107)) | |
(defun laptop-size () | |
"Adjusts frame size and position for my laptop screen." | |
(interactive) | |
(set-frame-parameter (selected-frame) 'width 237) | |
(set-frame-parameter (selected-frame) 'height 77) | |
(set-frame-parameter (selected-frame) 'left 0) | |
(set-frame-parameter (selected-frame) 'top 20)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment