Skip to content

Instantly share code, notes, and snippets.

@sky-y
Created October 20, 2012 08:05
Show Gist options
  • Save sky-y/3922634 to your computer and use it in GitHub Desktop.
Save sky-y/3922634 to your computer and use it in GitHub Desktop.
[修正済(12.10.22)] Haskell用key-combo.elの設定
;; key-combo
;; add-hook: on init.el
(defun my-haskell-key-combo ()
(key-combo-define-local (kbd "-") '("-" " -> " "--"))
(key-combo-define-local (kbd "<") '("<" " <- " " <= " " =<< " "<<" "<"))
(key-combo-define-local (kbd ">") '(">" " >= " " >>= " ">"))
(key-combo-define-local (kbd "=") '("=" " = " " == " " => " "=="))
(key-combo-define-local (kbd ":") '(":" " :: " "::"))
(key-combo-define-local (kbd "+") '("+" " + " " ++ " "++"))
)
(defun my-haskell-add-hook ()
(turn-on-haskell-indentation)
(font-lock-mode)
(my-haskell-key-combo)
)
;; on init.el
;; (custom-set-variables
;; '(haskell-mode-hook 'my-haskell-add-hook) ;; haskell-mode
;; )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment