init.el
changeset 54 e1b82f67f96e
parent 53 0b3217376059
child 55 d4adcd3d5ef9
equal deleted inserted replaced
53:0b3217376059 54:e1b82f67f96e
    32 (show-paren-mode t)                       ; show matching paren
    32 (show-paren-mode t)                       ; show matching paren
    33 (transient-mark-mode t)                   ; show highlighting
    33 (transient-mark-mode t)                   ; show highlighting
    34 (global-font-lock-mode t)                 ; syntax highlighting
    34 (global-font-lock-mode t)                 ; syntax highlighting
    35 (global-set-key (kbd "C-c c") 'compile)   ; compile
    35 (global-set-key (kbd "C-c c") 'compile)   ; compile
    36 (global-set-key (kbd "C-c r") 'recompile) ; recompile
    36 (global-set-key (kbd "C-c r") 'recompile) ; recompile
       
    37 (subword-mode t)                          ; move by camelCase words
    37 
    38 
    38 
    39 
    39 ;;; Darwin
    40 ;;; Darwin
    40 (if (string-match "darwin" (emacs-version))
    41 (if (string-match "darwin" (emacs-version))
    41     (progn
    42     (progn
    64 (global-set-key (kbd "C-c s") 'eshell) ; start shell
    65 (global-set-key (kbd "C-c s") 'eshell) ; start shell
    65 (defun setup-env ()
    66 (defun setup-env ()
    66   (setenv "TERM" "emacs") ; enable colors
    67   (setenv "TERM" "emacs") ; enable colors
    67   (setenv "ODBCSYSINI" "/home/lhoersten/myodbc")
    68   (setenv "ODBCSYSINI" "/home/lhoersten/myodbc")
    68   (setenv "ODBCINI" "/home/lhoersten/myodbc/odbc.ini")
    69   (setenv "ODBCINI" "/home/lhoersten/myodbc/odbc.ini")
    69   (setenv "PATH" (concat "/usr/local/bin:" "~/.cabal/bin:" (getenv "PATH"))))
    70   (setenv "PATH" (concat "/usr/local/bin:" (getenv "HOME") "/.cabal/bin:" (getenv "PATH"))))
    70 (add-hook 'eshell-mode-hook 'setup-env)
    71 (add-hook 'eshell-mode-hook 'setup-env)
    71 
       
    72 (setup-env)
    72 (setup-env)
    73 (eshell)
    73 (eshell)
    74 
    74 
    75 ;;;; Mode-Specific ;;;;
    75 ;;;; Mode-Specific ;;;;
    76 
    76 
    77 ;;; text-mode
    77 ;;; text-mode
    78 (add-hook 'text-mode-hook 'flyspell-mode t)             ; spellcheck text
    78 (add-hook 'fundamental-mode-hook 'flyspell-mode t)             ; spellcheck text
    79 (add-hook 'text-mode-hook 'turn-on-auto-fill)           ; autofill text
    79 (add-hook 'fundamental-mode-hook 'turn-on-auto-fill)           ; autofill text
    80 
    80 
    81 ;;; ido-mode
    81 ;;; ido-mode
    82 (ido-mode t)                                            ; file/buffer selector
    82 (ido-mode t)                                            ; file/buffer selector
    83 (setq-default
    83 (setq-default
    84  ido-enable-flex-matching t                             ; fuzzy matching for ido mode
    84  ido-enable-flex-matching t                             ; fuzzy matching for ido mode
   134 
   134 
   135 ;;; language init
   135 ;;; language init
   136 (require 'c-init)             ; c specific elisp
   136 (require 'c-init)             ; c specific elisp
   137 (require 'haskell-init)       ; haskell specific elisp
   137 (require 'haskell-init)       ; haskell specific elisp
   138 (require 'color-theme-init)   ; color theme specific elisp
   138 (require 'color-theme-init)   ; color theme specific elisp
   139 (require 'vala-mode)          ; vala programming language
       
   140 (require 'clojure-mode)       ; clojure programming language
       
   141 (require 'rainbow-delimiters) ; multi-colored parens
   139 (require 'rainbow-delimiters) ; multi-colored parens
   142 
   140 
   143 ;;; function init
   141 ;;; function init
   144 (require 'align-with-spaces)  ; use only spaces for alignment
   142 (require 'align-with-spaces)  ; use only spaces for alignment
   145 (require 'pastebin-region)    ; send selected text to pastebin
   143 (require 'pastebin-region)    ; send selected text to pastebin
   146 (require 'move-line)          ; move line up or down
   144 (require 'move-line)          ; move line up or down
   147 
   145 
   148 ;;; yasnippets
   146 ;;; yasnippets
   149 (add-to-list 'load-path "~/.emacs.d/thirdparty/yasnippet")
   147 (add-to-list 'load-path "~/.emacs.d/thirdparty/yasnippet")
   150 (require 'yasnippet)
   148 (require 'yasnippet)
   151 (yas/initialize)
   149 (setq-default yas-prompt-functions '(yas-ido-prompt yas-dropdown-prompt)) ; use ido for multiple snippets
   152 (yas/load-directory "~/.emacs.d/thirdparty/yasnippet/snippets")
   150 (setq-default yas-snippet-dirs '("~/.emacs.d/thirdparty/yasnippet/snippets"
   153 (setq-default yas/prompt-functions '(yas/ido-prompt yas/dropdown-prompt)) ; use ido for multiple snippets
   151                                  "~/.emacs.d/thirdparty/snippets"))
       
   152 (yas-global-mode t)
   154 
   153 
   155 ;;; java-mode
   154 ;;; java-mode
   156 (add-hook 'java-mode-hook (lambda () (setq whitespace-line-column 140)))
   155 (add-hook 'java-mode-hook (lambda () (setq whitespace-line-column 140)))
   157 
   156 
   158 ;;; zencoding-mode - html
   157 ;;; zencoding-mode - html