(custom-set-variables ;; custom-set-variables was added by Custom. ;; 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. '(c-basic-offset 4) '(column-number-mode t) '(fill-column 80) '(frame-background-mode (quote dark)) '(html-site-global-mode t) '(indent-region-mode t) '(inhibit-startup-screen t) '(initial-scratch-message nil) '(line-number-display-limit-width 2000) '(overline-margin 1) '(rngalt-display-validation-header nil) '(scalable-fonts-allowed t) '(sh-basic-offset 2) '(sh-indent-after-function (quote -)) '(sh-indent-comment t) '(sh-indent-for-case-alt (quote +)) '(sh-indent-for-case-label 0 nil nil ":D") '(sh-indentation 2) '(show-paren-mode t) '(uniquify-buffer-name-style (quote forward) nil (uniquify))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; 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. '(default ((t (:inherit nil :stipple nil :inverse-video nil :box nil ))))) ;; create an invisible backup directory and make the backups also invisable (defun make-backup-file-name (filename) (defvar backups-dir "~/.backups/") (make-directory backups-dir t) (expand-file-name (concat backups-dir "." (file-name-nondirectory filename) "~") (file-name-directory filename))) (setq locale-coding-system 'utf-8) (set-terminal-coding-system 'utf-8) (set-keyboard-coding-system 'utf-8) (set-selection-coding-system 'utf-8) (prefer-coding-system 'utf-8) (setq inhibit-splash-screen t) ; use S-TAB to switch between Emacs buffers (require 'bs) (add-to-list 'load-path (expand-file-name "~/tools/emacs/site-lisp/ibs")) (defvar ibs-cycling-key "" "Key sequence for buffer cycling.") (require 'ibs) ;;;;Shut off message buffer. Note - if you need ;;;;to debug emacs, comment these out so you can see what's going on. (setq message-log-max nil) (kill-buffer "*Messages*") ;;;;C-x k is a command I use often, but C-x C-k (an easy mistake) is ;;;;bound to nothing! ;;;;Set C-x C-k to same thing as C-x k. (global-set-key "\C-x\C-k" 'kill-this-buffer) ;;;;Set text-mode to automatically use long-lines mode. (add-hook 'text-mode-hook 'longlines-mode) ;;;;Turn off the status bar if we're not in a window system (menu-bar-mode (if window-system 1 -1)) ;;;;Fix the whole huge-jumps-scrolling-between-windows nastiness (setq scroll-conservatively 5) ;;;;What it says. Keeps the cursor in the same relative row during ;;;;pgups and dwns. (setq scroll-preserve-screen-position t) ;;;;;Accelerate the cursor when scrolling. (load "accel" t t) ;;;;;Push the mouse out of the way when the cursor approaches. (mouse-avoidance-mode 'jump) ;;(global-set-key "\C-c;" 'comment-dwim) ;; TextMate-like commenting ;; http://paste.lisp.org/display/42657 (defun comment-or-uncomment-line (&optional lines) "Comment current line. Argument gives the number of lines forward to comment" (interactive "P") (comment-or-uncomment-region (line-beginning-position) (line-end-position lines))) (defun comment-or-uncomment-region-or-line (&optional lines) "If the line or region is not a comment, comments region if mark is active, line otherwise. If the line or region is a comment, uncomment." (interactive "P") (if mark-active (if (< (mark) (point)) (comment-or-uncomment-region (mark) (point)) (comment-or-uncomment-region (point) (mark))) (comment-or-uncomment-line lines))) (global-set-key [?\C-\;] 'comment-or-uncomment-region-or-line) (global-set-key "\C-l" 'goto-line) ;; (global-set-key "\C-ck" 'mode-compile-kill) ;; change indentation to 2 ;; (setq tab-width 2)