view dotemacs.el @ 24:e0fa369f4a3d

Enable ido-mode
author Jordi Gutiérrez Hermoso <jordigh@gmail.com>
date Wed, 30 Jun 2010 18:22:12 -0500
parents 3488f4f3a2b5
children 67a96731dbab
line wrap: on
line source

(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.
 '(LaTeX-indent-level 2)
 '(LaTeX-item-indent 0)
 '(TeX-PDF-mode t)
 '(TeX-brace-indent-level 2)
 '(TeX-debug-bad-boxes t)
 '(TeX-debug-warnings t)
 '(TeX-display-help nil)
 '(TeX-newline-function (quote reindent-then-newline-and-indent))
 '(TeX-output-view-style (quote (("^dvi$" ("^landscape$" "^pstricks$\\|^pst-\\|^psfrag$") "%(o?)dvips -t landscape %d -o && gv %f") ("^dvi$" "^pstricks$\\|^pst-\\|^psfrag$" "%(o?)dvips %d -o && gv %f") ("^dvi$" ("^a4\\(?:dutch\\|paper\\|wide\\)\\|sem-a4$" "^landscape$") "%(o?)xdvi %dS -paper a4r -s 0 %d") ("^dvi$" "^a4\\(?:dutch\\|paper\\|wide\\)\\|sem-a4$" "%(o?)xdvi %dS -paper a4 %d") ("^dvi$" ("^a5\\(?:comb\\|paper\\)$" "^landscape$") "%(o?)xdvi %dS -paper a5r -s 0 %d") ("^dvi$" "^a5\\(?:comb\\|paper\\)$" "%(o?)xdvi %dS -paper a5 %d") ("^dvi$" "^b5paper$" "%(o?)xdvi %dS -paper b5 %d") ("^dvi$" "^letterpaper$" "%(o?)xdvi %dS -paper us %d") ("^dvi$" "^legalpaper$" "%(o?)xdvi %dS -paper legal %d") ("^dvi$" "^executivepaper$" "%(o?)xdvi %dS -paper 7.25x10.5in %d") ("^dvi$" "." "%(o?)xdvi %dS %d") ("^pdf$" "." "evince %o %(outpage)") ("^html?$" "." "netscape %o"))))
 '(auto-compression-mode t nil (jka-compr))
 '(c-offsets-alist (quote ((substatement-open . 0) (innamespace . 0))))
 '(case-fold-search t)
 '(column-number-mode t)
 '(comint-input-autoexpand (quote history))
 '(comint-move-point-for-output (quote all))
 '(comint-prompt-read-only t)
 '(comint-scroll-to-bottom-on-input (quote all))
 '(compilation-scroll-output t)
 '(confirm-kill-emacs (quote yes-or-no-p))
 '(cperl-auto-newline nil)
 '(cperl-close-paren-offset 0)
 '(cperl-electric-backspace-untabify nil)
 '(cperl-highlight-variables-indiscriminately t)
 '(cperl-merge-trailing-else nil)
 '(current-language-environment "UTF-8")
 '(debian-changelog-full-name "Jordi Gutiérrez Hermoso")
 '(debian-changelog-mailing-address "jordigh@gmail.com")
 '(default-input-method "latin-1-prefix")
 '(ecb-options-version "2.32")
 '(ecb-tip-of-the-day nil)
 '(ediff-split-window-function (quote split-window-horizontally))
 '(erc-input-line-position 0)
 '(erc-modules (quote (autojoin button completion fill irccontrols list match menu move-to-prompt netsplit networks noncommands readonly ring scrolltobottom stamp track)))
 '(global-font-lock-mode t nil (font-lock))
 '(indent-tabs-mode nil)
 '(inhibit-startup-buffer-menu t)
 '(inhibit-startup-screen t)
 '(jde-jdk-registry (quote (("1.6.0" . "/usr/lib/jvm/java-6-openjdk"))))
 '(js2-auto-indent-flag nil)
 '(js2-bounce-indent-flag nil)
 '(js2-enter-indents-newline nil)
 '(js2-mirror-mode nil)
 '(legalese-default-author "Jordi Gutiérrez Hermoso")
 '(legalese-default-copyright "Copyright © 2010 Jordi Gutiérrez Hermoso <jordigh@gmail.com>")
 '(make-backup-files nil)
 '(menu-bar-mode t)
 '(savehist-mode t nil (savehist))
 '(show-paren-mode t)
 '(smooth-scroll-margin 5)
 '(tab-width 2)
 '(tabbar-mode t nil (tabbar))
 '(text-mode-hook (quote (text-mode-hook-identify)))
 '(tool-bar-mode nil)
 '(transient-mark-mode nil)
 '(uniquify-buffer-name-style (quote forward) nil (uniquify))
 '(vc-follow-symlinks nil)
 '(w3m-default-display-inline-images t)
 '(w3m-use-cookies t))
(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 :background "grey20" :foreground "white" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 100 :width normal :foundry "unknown" :family "Liberation Mono"))))
 '(diff-added ((t (:foreground "green"))))
 '(diff-changed ((t (:foreground "orange"))))
 '(diff-file-header ((((class color) (background light)) (:background "lightblue" :bold t))))
 '(diff-header ((nil (:foreground "skyblue"))))
 '(diff-removed ((t (:foreground "red"))))
 '(ecb-tag-header-face ((((class color) (background dark)) (:background "DarkGreen"))))
 '(show-ws-tab ((t (:background "Black")))))

(add-to-list 'load-path "~/.emacs.d/plugins/")

(defalias 'perl-mode 'cperl-mode)

(require 'ipython)

(require 'legalese)

(require 'django-mode)

(require 'rainbow-mode)

(server-start)

;(define-derived-mode tabified-python-mode python-mode 
;  "tabified Python" (setq indent-tabs-mode t))

;; wtf is this crap? begone!
(setq transient-mark-mode nil)

(global-set-key (kbd "C-S-n") 'tabbar-forward-tab)
(global-set-key (kbd "C-S-p") 'tabbar-backward-tab)
(global-set-key  (kbd "C-c C-S-n") 'tabbar-forward-group)
(global-set-key  (kbd "C-c C-S-p") 'tabbar-backward-group)

(global-set-key (kbd "C-S-j") 'windmove-down)
(global-set-key (kbd "C-S-k") 'windmove-up)
(global-set-key (kbd "C-S-h") 'windmove-left)
(global-set-key (kbd "C-S-l") 'windmove-right)

(global-set-key (kbd "M-s") 'backward-kill-word)

;; Only killing the current buffer is useful (thanks to madpickle of #emacs)
(global-set-key (kbd "C-x k")
                (lambda () (interactive) (kill-buffer (current-buffer))))

(setq auto-mode-alist
      (append
       '(
   ("\\.m\\'" . octave-mode)
   ("\\.eml\\'" . mail-mode)
   ("\\.pro\\'" . conf-mode) ;; Qt project files
   )
       auto-mode-alist))


;(setq scroll-step 1)
;(setq scroll-conservatively 1)
(require 'smooth-scrolling)

;; This ido thing looks interesting...
(ido-mode 1)

(setq default-major-mode 'text-mode)
(global-unset-key "\C-z")

;; Set auto-fill for all modes
;(setq-default auto-fill-function 'do-auto-fill)

;ibuffer is the only decent one
(global-set-key (kbd "C-x C-b") 'ibuffer)

;Make GUD put output in a different buffer
(setq gdb-separate-io t)

;; Highlight "FIXME: and TODO:"
(font-lock-add-keywords
 'c-mode
 '(("\\<\\(FIXME\\)" 1 font-lock-warning-face t)))

(font-lock-add-keywords
 'c++-mode
 '(("\\<\\(FIXME\\):" 1 font-lock-warning-face t)))

(font-lock-add-keywords
 'c-mode
 '(("\\<\\(TODO\\):" 1 font-lock-warning-face t)))

(font-lock-add-keywords
 'c++-mode
 '(("\\<\\(TODO\\):" 1 font-lock-warning-face t)))

;; Let auto-fill end lines with a full stop.
(setq sentence-end-double-space nil)

;; Don't scroll off horizontally when splitting windows vertically.
(setq truncate-partial-width-windows nil)

;; Don't let ediff open a new frame
(setq ediff-window-setup-function 'ediff-setup-windows-plain)

;; Don't like stuff to indent when I don't hit <TAB>
(add-hook 'c-mode-common-hook (lambda() (setq c-electric-flag nil)))

;; Menus are for wimps
(menu-bar-mode -1)

;; ;; Use plain tabs in text mode
;; (add-hook 'text-mode-hook
;;           (lambda () (define-key
;;                        text-mode-map (kbd "TAB")
;;                        (lambda ()
;;                          (interactive)
;;                          (let ((was-at-bol (bolp)))
;;                            (save-excursion
;;                              (goto-char (point-at-bol))
;;                              (insert "    "))
;;                            (when was-at-bol
;;                              (back-to-indentation )))))))

(put 'narrow-to-region 'disabled nil)

;;; Inserts a relative pathname interactively
(defun insert-relative-path (path)
  (interactive (list (read-file-name "Path to insert relatively: ")))
  (insert (file-relative-name path default-directory))
)

; Add cmake listfile names to the mode list.
(setq auto-mode-alist
    (append
     '(("CMakeLists\\.txt\\'" . cmake-mode))
     '(("\\.cmake\\'" . cmake-mode))
     auto-mode-alist))

(defun set-tab-width (width)
  (interactive "nSet tab width: ")
  (setq tab-width width))

;; "Fix" the horrible asn1-mode mess
(add-hook 'asn1-mode-hook
          (lambda ()
            (setq indent-line-function #'indent-relative)
            (setq case-fold-search t)))