;; to debug the .emacs file (setq debug-on-error nil) ;; setup the default mode to use ;;Text mode is happier than Fundamental mode ;-) (setq default-major-mode 'text-mode) ;; define the mail and name (setq user-mail-address "foobar@example.com") (setq user-full-name "Foo Bar") ;; define the ispell dictionary to use (setq ispell-dictionary "en") ;; setup the tab to 4 spaces width (setq tab-width 4) (tool-bar-mode -1) ;; turn off toolbar (scroll-bar-mode -1) ;; turn off scrollbar ;; color-theme ;; http://www.emacswiki.org/emacs/ColorTheme ;; http://www.nongnu.org/color-theme (add-to-list 'load-path "~/.emacs.d/elisp/color-theme/") (require 'color-theme) (require 'color-theme-arjen) (color-theme-arjen) ;; http://www.emacswiki.org/emacs/SwBuff (require 'swbuff) (global-set-key [(control tab)] 'swbuff-switch-to-next-buffer) (global-set-key (kbd "") 'swbuff-switch-to-previous-buffer) (require 'whitespace) (setq whitespace-style '(face empty tabs lines-tail trailing)) (add-hook 'python-mode-hook 'whitespace-mode) ;; Show tabs (defface extra-whitespace-face '((t (:background "dim gray"))) "Used for tabs and such.") (defvar my-extra-keywords '(("\t" . 'extra-whitespace-face))) (add-hook 'text-mode-hook (lambda () (font-lock-add-keywords nil my-extra-keywords))) ;; http://www.emacswiki.org/emacs/RectangleMark (require 'rect-mark) (global-set-key (kbd "C-x r C-SPC") 'rm-set-mark) (global-set-key (kbd "C-x r C-x") 'rm-exchange-point-and-mark) (global-set-key (kbd "C-x r C-w") 'rm-kill-region) (global-set-key (kbd "C-x r M-w") 'rm-kill-ring-save)