Created
January 4, 2010 10:31
-
-
Save cwvh/268448 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 frame-title-format (concat "%b - emacs@" system-name)) | |
(setq inhibit-startup-screen t) | |
(setq make-backup-files nil) | |
(setq require-final-newline t) | |
(global-font-lock-mode t) | |
(setq font-lock-maximum-decoration t) | |
(fset 'yes-or-no-p 'y-or-n-p) | |
(setq-default indent-tabs-mode nil) | |
;; Display overrides | |
(tool-bar-mode -1) | |
(scroll-bar-mode -1) | |
(menu-bar-mode t) | |
(column-number-mode t) | |
(show-paren-mode t) | |
;; Global key overrides | |
(global-set-key [f4] 'kill-this-buffer) | |
; (global-set-key (kbd "C-k") 'kill-and-join-forward) | |
(global-set-key (kbd "C-x a r") 'align-regexp) | |
(global-set-key (kbd "M-g") 'goto-line) | |
(global-set-key (kbd "C-z") nil) | |
(define-key global-map (kbd "RET") 'newline-and-indent) | |
;; fat-fingered kill | |
(defun kill-and-join-forward (&optional arg) | |
"If at end of line, join the following; otherwise kill line. | |
Deletes whitespace at join." | |
(interactive "P") | |
(if (and (eolp) (not (bolp))) | |
(delete-indentation t) | |
(kill-line arg))) | |
;; Clean up *shell* when used with colors and make read-only | |
(setq ansi-color-names-vector | |
["black" "red4" "green4" "yellow4" "blue3" "magenta4" "cyan4" "white"]) | |
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on) | |
(add-hook 'shell-mode-hook '(lambda () (toggle-truncate-lines 1))) | |
(setq comint-prompt-read-only t) | |
(require 'tramp) | |
;;; This was installed by package-install.el. | |
;;; This provides support for the package system and | |
;;; interfacing with ELPA, the package archive. | |
;;; Move this code earlier if you want to reference | |
;;; packages in your .emacs. | |
(when | |
(load | |
(expand-file-name "~/.emacs.d/elpa/package.el")) | |
(package-initialize)) | |
;; Haskell | |
(load "~/.emacs.d/haskell-mode-2.7.0/haskell-site-file") | |
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode) | |
(add-hook 'haskell-mode-hook 'turn-on-haskell-indent) | |
(add-hook 'haskell-mode-hook 'imenu-add-menubar-index) | |
(setq haskell-font-lock-symbols t) | |
;; C++ | |
(add-hook 'c++-mode-hook (lambda () (c-set-style "stroustrup"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment