init.el
changeset 60 8beb028f936c
parent 59 f346d7591eac
child 61 c0319c5df048
equal deleted inserted replaced
59:f346d7591eac 60:8beb028f936c
    31 (show-paren-mode t)                       ; show matching paren
    31 (show-paren-mode t)                       ; show matching paren
    32 (transient-mark-mode t)                   ; show highlighting
    32 (transient-mark-mode t)                   ; show highlighting
    33 (global-font-lock-mode t)                 ; syntax highlighting
    33 (global-font-lock-mode t)                 ; syntax highlighting
    34 (global-set-key (kbd "C-c c") 'compile)   ; compile
    34 (global-set-key (kbd "C-c c") 'compile)   ; compile
    35 (global-set-key (kbd "C-c r") 'recompile) ; recompile
    35 (global-set-key (kbd "C-c r") 'recompile) ; recompile
       
    36 (global-set-key (kbd "C-c a") 'align-regexp) ; align
    36 (subword-mode t)                          ; move by camelCase words
    37 (subword-mode t)                          ; move by camelCase words
    37 
    38 
    38 
    39 
    39 ;;; Darwin
    40 ;;; Darwin
    40 (setq is-mac (equal system-type 'darwin))
    41 (setq is-mac (equal system-type 'darwin))
   127                 zencoding-mode visual-regexp)))
   128                 zencoding-mode visual-regexp)))
   128   (mapc ensure-installed packages))
   129   (mapc ensure-installed packages))
   129 
   130 
   130 ;;; requires
   131 ;;; requires
   131 (require 'c-init)             ; c specific elisp
   132 (require 'c-init)             ; c specific elisp
   132 (require 'align-with-spaces)  ; use only spaces for alignment
       
   133 (require 'move-line)          ; move line up or down
   133 (require 'move-line)          ; move line up or down
   134 (require 'uniquify)           ; unique buffer names with dirs
   134 (require 'uniquify)           ; unique buffer names with dirs
   135 (require 'auto-complete-config)
   135 (require 'auto-complete-config)
   136 (require 'iy-go-to-char)
   136 (require 'iy-go-to-char)
   137 
   137 
   178 (add-hook 'css-mode-hook '(rainbow-mode t))
   178 (add-hook 'css-mode-hook '(rainbow-mode t))
   179 
   179 
   180 ;;; coding-modes map
   180 ;;; coding-modes map
   181 (mapc
   181 (mapc
   182  (lambda (x)
   182  (lambda (x)
   183    (add-hook
   183    (add-hook x
   184     x
   184              (lambda ()
   185     (lambda ()
   185                (linum-mode t)
   186       (linum-mode t)
   186                (rainbow-delimiters-mode t)
   187       (rainbow-delimiters-mode t)
   187                (auto-complete-mode t))))
   188       (auto-complete-mode t)) t))
       
   189  '(text-mode-hook
   188  '(text-mode-hook
   190    c-mode-common-hook
   189    c-mode-common-hook
   191    python-mode-hook
   190    python-mode-hook
   192    haskell-mode-hook
   191    haskell-mode-hook
   193    js2-mode-hook
   192    js2-mode-hook
   198 
   197 
   199 ;;; haskell-mode
   198 ;;; haskell-mode
   200 (add-hook
   199 (add-hook
   201  'haskell-mode-hook
   200  'haskell-mode-hook
   202  (lambda ()
   201  (lambda ()
   203    (local-set-key (kbd "C-c i") 'haskell-navigate-imports) ; go to imports. prefix to return
   202    (flymake-haskell-multi-load)
   204    (flymake-haskell-multi-load t)
       
   205    (flymake-mode t)
   203    (flymake-mode t)
   206    (capitalized-words-mode t)
   204    (capitalized-words-mode t)
   207    (turn-on-haskell-indent)
   205    (turn-on-haskell-indent)
   208    (turn-on-haskell-doc-mode)
   206    (turn-on-haskell-doc-mode)
   209    (turn-on-haskell-decl-scan)
   207    (turn-on-haskell-decl-scan)
   210    (imenu-add-menubar-index t)
   208    (imenu-add-menubar-index)
       
   209    (local-set-key (kbd "C-c i") 'haskell-navigate-imports) ; go to imports. prefix to return
   211    (setq
   210    (setq
   212     haskell-font-lock-haddock t
   211     haskell-font-lock-haddock t
   213     haskell-stylish-on-save t
   212     haskell-stylish-on-save t
   214     haskell-program-name "ghci"
   213     haskell-program-name "ghci"
   215     haskell-indent-offset 4
   214     haskell-indent-offset 4