init.el
changeset 73 8167de2d2daa
parent 72 65194c801e61
child 74 1ec54926890f
equal deleted inserted replaced
72:65194c801e61 73:8167de2d2daa
    56   (set-default-font (if is-mac "Ubuntu Mono-12" "Ubuntu Mono-10.5")))
    56   (set-default-font (if is-mac "Ubuntu Mono-12" "Ubuntu Mono-10.5")))
    57 
    57 
    58 ;;;; Mode-Specific ;;;;
    58 ;;;; Mode-Specific ;;;;
    59 
    59 
    60 ;;; text-mode
    60 ;;; text-mode
    61 (add-hook 'fundamental-mode-hook 'flyspell-mode)      ; spellcheck text
    61 (add-hook 'fundamental-mode-hook 'flyspell-mode)        ; spellcheck text
    62 (add-hook 'fundamental-mode-hook 'turn-on-auto-fill)    ; autofill text
    62 (add-hook 'fundamental-mode-hook 'turn-on-auto-fill)    ; autofill text
    63 
    63 
    64 ;;; ido-mode
    64 ;;; ido-mode
    65 (ido-mode t)                                            ; file/buffer selector
    65 (ido-mode t)                                            ; file/buffer selector
    66 (setq-default
    66 (setq-default
   111 
   111 
   112 ;;;; Requires and Packages ;;;;
   112 ;;;; Requires and Packages ;;;;
   113 
   113 
   114 ;;; packages
   114 ;;; packages
   115 (require 'package-require)
   115 (require 'package-require)
   116 (package-require '(auto-complete exec-path-from-shell
   116 (package-require '(exec-path-from-shell expand-region
   117  expand-region rainbow-delimiters rainbow-mode solarized-theme
   117  rainbow-delimiters rainbow-mode solarized-theme visual-regexp
   118  visual-regexp yasnippet zencoding-mode markdown-mode move-text))
   118  yasnippet zencoding-mode markdown-mode move-text powerline))
   119 
   119 
   120 ;;; custom requires
   120 ;; powerline
   121 (require 'haskell-init)
   121 (require 'powerline)
   122 (require 'javascript-init)
   122 (powerline-default-theme)
   123 (require 'c-init)             ; c specific elisp
       
   124 
       
   125 ;;; auto-complete-mode
       
   126 (require 'auto-complete-config)
       
   127 (ac-config-default)
       
   128 (global-set-key (kbd "M-/") 'auto-complete)
       
   129 (setq-default ac-auto-start nil)
       
   130 
   123 
   131 ;;; terminal
   124 ;;; terminal
   132 (global-set-key (kbd "C-c s") 'eshell) ; start shell
   125 (global-set-key (kbd "C-c s") 'eshell) ; start shell
   133 (exec-path-from-shell-initialize)
   126 (exec-path-from-shell-initialize)
   134 (eshell)
   127 (eshell)
   135 (add-hook 'eshell-mode-hook (lambda () (setenv "TERM" "emacs")))
   128 (add-hook 'eshell-mode-hook (lambda () (setenv "TERM" "emacs")))
   136 
   129 
       
   130 ;;; custom requires
       
   131 (require 'haskell-init)
       
   132 (require 'javascript-init)
       
   133 (require 'c-init)             ; c specific elisp
       
   134 
       
   135 ;; ;;; company mode
       
   136 ;; (add-hook 'after-init-hook 'global-company-mode)
       
   137 ;; (global-set-key (kbd "M-/") 'company-complete)
       
   138 
   137 ;;; uniquify
   139 ;;; uniquify
   138 (require 'uniquify)           ; unique buffer names with dirs
   140 (require 'uniquify)           ; unique buffer names with dirs
   139 (setq
   141 (setq
   140  uniquify-buffer-name-style 'post-forward
   142  uniquify-buffer-name-style 'post-forward
   141  uniquify-separator ":")
   143  uniquify-separator ":")
   147    "d677ef584c6dfc0697901a44b885cc18e206f05114c8a3b7fde674fce6180879" default))
   149    "d677ef584c6dfc0697901a44b885cc18e206f05114c8a3b7fde674fce6180879" default))
   148 (load-theme 'solarized-light)
   150 (load-theme 'solarized-light)
   149 
   151 
   150 ;;; yasnippets
   152 ;;; yasnippets
   151 (setq-default yas-prompt-functions '(yas-ido-prompt yas-dropdown-prompt)) ; use ido for multiple snippets
   153 (setq-default yas-prompt-functions '(yas-ido-prompt yas-dropdown-prompt)) ; use ido for multiple snippets
   152 (setq-default yas-snippet-dirs '("~/.emacs.d/snippets"))
   154 ;; (setq-default yas-snippet-dirs '("~/.emacs.d/snippets"))
   153 (yas-global-mode t)
   155 (yas-global-mode t)
   154 
   156 
   155 
   157 
   156 ;;; markdown-mode
   158 ;;; markdown-mode
   157 (add-hook 'markdown-mode-hook 'flyspell-mode)
   159 (add-hook 'markdown-mode-hook 'flyspell-mode)
   172 (mapc
   174 (mapc
   173  (lambda (x)
   175  (lambda (x)
   174    (add-hook x
   176    (add-hook x
   175     (lambda ()
   177     (lambda ()
   176       (linum-mode t)
   178       (linum-mode t)
   177       (rainbow-delimiters-mode t)
   179       (subword-mode t)
   178       (auto-complete-mode t))))
   180       (rainbow-delimiters-mode t))))
   179  '(text-mode-hook
   181  '(text-mode-hook
   180    c-mode-common-hook
   182    c-mode-common-hook
   181    python-mode-hook
   183    python-mode-hook
   182    haskell-mode-hook
   184    haskell-mode-hook
   183    js2-mode-hook
   185    js2-mode-hook