Moved some stuff around

This commit is contained in:
Tom Willemsen 2011-07-27 11:53:20 +02:00
parent 2552411e75
commit 07f377fb83
2 changed files with 40 additions and 23 deletions

View file

@ -179,10 +179,7 @@ Currently adds | & ! . + = - / % * , < > ? : ->"
(defun on-html-mode () (defun on-html-mode ()
(local-set-key [f9] 'browse-to-current-file) (local-set-key [f9] 'browse-to-current-file)
(auto-fill-mode)) (setq fill-column 73)
(defun on-markdown-mode ()
(whitespace-mode)
(auto-fill-mode)) (auto-fill-mode))
(defun on-php-mode () (defun on-php-mode ()

View file

@ -1,7 +1,7 @@
;; -*- mode: Emacs-Lisp; -*- ;; -*- mode: Emacs-Lisp; -*-
(add-to-list 'load-path "~/.emacs.d/elisp") (add-to-list 'load-path "~/.emacs.d/elisp")
;; Autopair ;;; Autopair
(require 'autopair) (require 'autopair)
(autopair-global-mode t) ; automatically add the other delimiter (autopair-global-mode t) ; automatically add the other delimiter
(setq autopair-skip-criteria 'always (setq autopair-skip-criteria 'always
@ -25,7 +25,7 @@
(lambda () (lambda ()
(set-column-markers 76 81))) (set-column-markers 76 81)))
;; Org mode ;;; Org mode
(require 'org-crypt) (require 'org-crypt)
(require 'org-publish) (require 'org-publish)
(setq (setq
@ -61,21 +61,50 @@
(auto-fill-mode t))) (auto-fill-mode t)))
(org-crypt-use-before-save-magic) (org-crypt-use-before-save-magic)
;;; Rainbow delimiters
(add-to-list 'load-path "~/.emacs.d/elisp/rainbow-delimiters")
(require 'rainbow-delimiters)
(setq rainbow-delimiters-max-face-count 8)
;;; Uniquify
(require 'uniquify)
(setq uniquify-buffer-name-style 'post-forward)
;;; Go
(autoload 'go-mode "go-mode" "Major mode for google go" t)
(autoload 'gofmt "go-mode" "" t)
(autoload 'go-fmt-before-save "go-mode" "" t)
(add-to-list 'auto-mode-alist '("\\.go$" . go-mode))
(add-hook 'go-mode-hook
(lambda ()
(turn-off-auto-fill)
(column-marker-1 -1)))
;;; Htmlize
(require 'htmlize)
(setq htmlize-output-type 'inline-css)
;;; Git
(require 'git)
;;; Markdown mode
(add-to-list 'load-path "~/.emacs.d/elisp/markdown-mode") (add-to-list 'load-path "~/.emacs.d/elisp/markdown-mode")
(autoload 'markdown-mode "markdown-mode" "Major mode for Markdown" t)
(setq whitespace-style '(face trailing)) ; For use with markdown mode
(add-to-list 'auto-mode-alist '("\\.m\\(ark\\)?do?wn$". markdown-mode))
(add-hook 'markdown-mode-hook
(lambda ()
(whitespace-mode 1)
(turn-on-auto-fill)))
(add-to-list 'load-path "~/.emacs.d/elisp/git-commit-mode") (add-to-list 'load-path "~/.emacs.d/elisp/git-commit-mode")
(add-to-list 'load-path "~/.emacs.d/elisp/lua-mode") (add-to-list 'load-path "~/.emacs.d/elisp/lua-mode")
(add-to-list 'load-path "~/.emacs.d/elisp/pi-php-mode") (add-to-list 'load-path "~/.emacs.d/elisp/pi-php-mode")
(add-to-list 'load-path "~/.emacs.d/elisp/rainbow-delimiters")
(add-to-list 'load-path "~/.emacs.d/elisp/rainbow") (add-to-list 'load-path "~/.emacs.d/elisp/rainbow")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; REQUIRES ;; ;; REQUIRES ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(require 'rainbow-delimiters)
(require 'uniquify)
(require 'server)
(require 'htmlize)
(require 'git)
(load-file "~/.emacs.d/functions.el") (load-file "~/.emacs.d/functions.el")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -89,14 +118,9 @@
(autoload 'php-mode "pi-php-mode" "Major mode for PHP" t) (autoload 'php-mode "pi-php-mode" "Major mode for PHP" t)
(autoload 'graphviz-dot-mode "graphviz-dot-mode" "Major mode for dot" t) (autoload 'graphviz-dot-mode "graphviz-dot-mode" "Major mode for dot" t)
(autoload 'cmake-mode "cmake-mode" "Major mode for CMake" t) (autoload 'cmake-mode "cmake-mode" "Major mode for CMake" t)
(autoload 'markdown-mode "markdown-mode" "Major mode for Markdown" t)
(autoload 'rainbow-mode "rainbow-mode" "Minor mode for colors" t) (autoload 'rainbow-mode "rainbow-mode" "Minor mode for colors" t)
(autoload 'stumpwm-mode "stumpwm-mode" "Major mode for stumpwm" t) (autoload 'stumpwm-mode "stumpwm-mode" "Major mode for stumpwm" t)
(autoload 'muttrc-mode "muttrc-mode" "Major mode for muttrc" t) (autoload 'muttrc-mode "muttrc-mode" "Major mode for muttrc" t)
;; Go
(autoload 'go-mode "go-mode" "Major mode for google go" t)
(autoload 'gofmt "go-mode" "" t)
(autoload 'go-fmt-before-save "go-mode" "" t)
(autoload 'git-commit-mode "git-commit" "" t) (autoload 'git-commit-mode "git-commit" "" t)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -117,6 +141,7 @@
(setq-default indent-tabs-mode nil) ; spaces, no tabs (setq-default indent-tabs-mode nil) ; spaces, no tabs
(setq-default truncate-lines t) ; don't wrap (setq-default truncate-lines t) ; don't wrap
(setq-default php-warn-if-mumamo-off nil) ; don't warn me about this (setq-default php-warn-if-mumamo-off nil) ; don't warn me about this
(setq-default tab-width 4)
(setq inhibit-startup-message t) ; Don't show welcome screen (setq inhibit-startup-message t) ; Don't show welcome screen
(setq require-final-newline t) ; Always put final newline (setq require-final-newline t) ; Always put final newline
@ -124,10 +149,8 @@
(setq scroll-conservatively 101) ; scroll only one line (setq scroll-conservatively 101) ; scroll only one line
(setq browse-url-browser-function 'browse-url-generic) (setq browse-url-browser-function 'browse-url-generic)
(setq browse-url-generic-program (getenv "BROWSER")) (setq browse-url-generic-program (getenv "BROWSER"))
(setq whitespace-style '(face trailing)) ; For use with markdown mode
(setq uniquify-buffer-name-style 'reverse) (setq uniquify-buffer-name-style 'reverse)
(setq jit-lock-defer-time 0.2) ; Don't fontlock immediately (setq jit-lock-defer-time 0.2) ; Don't fontlock immediately
(setq htmlize-output-type 'inline-css)
(setq ido-save-directory-list-file nil) (setq ido-save-directory-list-file nil)
(setq ido-auto-merge-delay-time 2) ; Wait before fixing names (setq ido-auto-merge-delay-time 2) ; Wait before fixing names
(setq mouse-autoselect-window t) (setq mouse-autoselect-window t)
@ -176,12 +199,10 @@
(add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode)) (add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode))
(add-to-list 'auto-mode-alist '("\\.php[345]?$" . php-mode)) (add-to-list 'auto-mode-alist '("\\.php[345]?$" . php-mode))
(add-to-list 'auto-mode-alist '("\\.js\\(on\\)?$" . js-mode)) (add-to-list 'auto-mode-alist '("\\.js\\(on\\)?$" . js-mode))
(add-to-list 'auto-mode-alist '("\\.m\\(ark\\)?do?wn$". markdown-mode))
(add-to-list 'auto-mode-alist '("CMakeLists\\.txt$" . cmake-mode)) (add-to-list 'auto-mode-alist '("CMakeLists\\.txt$" . cmake-mode))
(add-to-list 'auto-mode-alist '("\\.cmake$" . cmake-mode)) (add-to-list 'auto-mode-alist '("\\.cmake$" . cmake-mode))
(add-to-list 'auto-mode-alist '("\\.css$" . css-mode)) (add-to-list 'auto-mode-alist '("\\.css$" . css-mode))
(add-to-list 'auto-mode-alist '("stumpwmrc" . stumpwm-mode)) (add-to-list 'auto-mode-alist '("stumpwmrc" . stumpwm-mode))
(add-to-list 'auto-mode-alist '("\\.go$" . go-mode))
(add-to-list 'auto-mode-alist '(".*mutt.*" . message-mode)) (add-to-list 'auto-mode-alist '(".*mutt.*" . message-mode))
(add-to-list 'auto-mode-alist '("COMMIT_EDITMSG$" . git-commit-mode)) (add-to-list 'auto-mode-alist '("COMMIT_EDITMSG$" . git-commit-mode))
@ -209,7 +230,6 @@
(add-hook 'prog-mode-hook 'on-prog-mode) (add-hook 'prog-mode-hook 'on-prog-mode)
(add-hook 'c-mode-hook 'on-c-mode) (add-hook 'c-mode-hook 'on-c-mode)
(add-hook 'html-mode-hook 'on-html-mode) (add-hook 'html-mode-hook 'on-html-mode)
(add-hook 'markdown-mode-hook 'on-markdown-mode)
(add-hook 'php-mode-hook 'on-php-mode) (add-hook 'php-mode-hook 'on-php-mode)
(add-hook 'message-mode-hook 'on-mail-mode) (add-hook 'message-mode-hook 'on-mail-mode)
(add-hook 'git-commit-mode-hook 'auto-fill-mode) (add-hook 'git-commit-mode-hook 'auto-fill-mode)