init.el
changeset 57 e35be98bd58c
parent 56 7446c9ffe828
child 58 c25a7ccd237a
equal deleted inserted replaced
56:7446c9ffe828 57:e35be98bd58c
     5 (add-to-list 'load-path "~/.emacs.d")     ; set default emacs load path
     5 (add-to-list 'load-path "~/.emacs.d")     ; set default emacs load path
     6 
     6 
     7 (setq-default
     7 (setq-default
     8  ediff-split-window-function
     8  ediff-split-window-function
     9   'split-window-horizontally              ; diff horizontally
     9   'split-window-horizontally              ; diff horizontally
    10  x-select-enable-clipboard t              ; paste from X buffer
       
    11  inhibit-splash-screen t                  ; disable splash screen
    10  inhibit-splash-screen t                  ; disable splash screen
    12  truncate-lines t                         ; truncate, not wrap, lines
    11  truncate-lines t                         ; truncate, not wrap, lines
    13  indent-tabs-mode nil                     ; only uses spaces for indentation
    12  indent-tabs-mode nil                     ; only uses spaces for indentation
    14  split-width-threshold 181                ; min width to split window horizontially
    13  split-width-threshold 181                ; min width to split window horizontially
    15  split-height-threshold 120               ; min width to split window vertically
    14  split-height-threshold 120               ; min width to split window vertically
   134 ;;;; Requires and Packages ;;;;
   133 ;;;; Requires and Packages ;;;;
   135 
   134 
   136 ;;; custom inits
   135 ;;; custom inits
   137 (require 'c-init)             ; c specific elisp
   136 (require 'c-init)             ; c specific elisp
   138 (require 'align-with-spaces)  ; use only spaces for alignment
   137 (require 'align-with-spaces)  ; use only spaces for alignment
   139 (require 'pastebin-region)    ; send selected text to pastebin
       
   140 (require 'move-line)          ; move line up or down
   138 (require 'move-line)          ; move line up or down
   141 (require 'uniquify)           ; unique buffer names with dirs
   139 (require 'uniquify)           ; unique buffer names with dirs
   142 
   140 
   143 ;;; uniquify
   141 ;;; uniquify
   144 (setq
   142 (setq
   175 ;;; java-mode
   173 ;;; java-mode
   176 (add-hook 'java-mode-hook (lambda () (setq whitespace-line-column 140)))
   174 (add-hook 'java-mode-hook (lambda () (setq whitespace-line-column 140)))
   177 
   175 
   178 ;;; js2-mode
   176 ;;; js2-mode
   179 (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
   177 (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
   180 (add-hook 'js-mode-hook 'js2-minor-mode)
   178 (setq-default ac-js2-evaluate-calls t)
   181 
   179 
   182 ;;; zencoding-mode - html
   180 ;;; zencoding-mode - html
   183 (add-hook 'sgml-mode-hook 'zencoding-mode) ; Auto-start on any markup modes
   181 (add-hook 'sgml-mode-hook 'zencoding-mode) ; Auto-start on any markup modes
   184 (add-to-list 'auto-mode-alist '("\\.tpl\\'" . html-mode))
   182 (add-to-list 'auto-mode-alist '("\\.tpl\\'" . html-mode))
   185 
   183 
   197 
   195 
   198 ;;; haskell-mode
   196 ;;; haskell-mode
   199 (add-hook
   197 (add-hook
   200  'haskell-mode-hook
   198  'haskell-mode-hook
   201  (lambda ()
   199  (lambda ()
   202    ;; (ghc-init)
   200    ;; (ghc-init) ;; this breaks stuff
       
   201    (local-set-key (kbd "C-c i") 'haskell-navigate-imports) ; go to imports. prefix to return
       
   202    (flymake-haskell-multi-load)
       
   203    (flymake-mode)
       
   204    (capitalized-words-mode)
   203    (turn-on-haskell-indent)
   205    (turn-on-haskell-indent)
   204    (capitalized-words-mode)
       
   205    (turn-on-haskell-doc-mode)
   206    (turn-on-haskell-doc-mode)
   206    (turn-on-haskell-decl-scan)
   207    (turn-on-haskell-decl-scan)
   207    (imenu-add-menubar-index)
   208    (imenu-add-menubar-index)
   208    (setq
   209    (setq
   209     haskell-font-lock-haddock t
   210     haskell-font-lock-haddock t
   211     ;; haskell-tags-on-save t
   212     ;; haskell-tags-on-save t
   212     haskell-program-name "ghci"
   213     haskell-program-name "ghci"
   213     haskell-indent-offset 4
   214     haskell-indent-offset 4
   214     whitespace-line-column 78)
   215     whitespace-line-column 78)
   215    ))
   216    ))
       
   217 
       
   218 ;;; ghci-mode
       
   219 (add-hook 'inferior-haskell-mode-hook 'turn-on-ghci-completion)
       
   220 
       
   221 ;;; flymake-mode
       
   222 (add-hook
       
   223  'flymake-mode-hook
       
   224  (lambda ()
       
   225    (local-set-key (kbd "C-1") 'flymake-display-err-menu-for-current-line)
       
   226    (local-set-key (kbd "C-.") 'flymake-goto-next-error)
       
   227    (local-set-key (kbd "C-,") 'flymake-goto-prev-error)
       
   228    ))