From 1c1128c2e10a0cbd39b9844adab99e082f1ccdd5 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 1 Jul 2013 03:03:23 +0200 Subject: Added mouse-support and some haskell-mode config to init.el --- init.el | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index 0c5dc0bfc78d..74dc73428148 100644 --- a/init.el +++ b/init.el @@ -8,12 +8,31 @@ ;; Important packages (defvar my-pkgs '(starter-kit starter-kit-bindings haskell-mode) - "A list of packages to install at launch.") + "Packages to install at launch.") (dolist (p my-pkgs) (when (not (package-installed-p p)) (package-install p))) +;; Enable mouse support on OS X +(unless window-system + (require 'mouse) + (xterm-mouse-mode t) + (global-set-key [mouse-4] '(lambda () + (interactive) + (scroll-down 1))) + (global-set-key [mouse-5] '(lambda () + (interactive) + (scroll-up 1))) + (defun track-mouse (e)) + (setq mouse-sel-mode t) +) + ;; Configure haskell-mode -(custom-set-variables - '(haskell-mode-hook '(turn-on-haskell-indentation))) +;; Enable semi-automatic indentation and font-locking +(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation) +(add-hook 'haskell-mode-hook 'font-lock-mode) + +;; Add keybindings to move nested blocks with C-, rsp. C-. +(define-key haskell-mode-map (kbd "C-,") 'haskell-move-nested-left) +(define-key haskell-mode-map (kbd "C-.") 'haskell-move-nested-right) -- cgit 1.4.1