about summary refs log tree commit diff
path: root/init.el
diff options
context:
space:
mode:
authorVincent Ambo <vincent@spotify.com>2013-07-01T01·03+0200
committerVincent Ambo <vincent@spotify.com>2013-07-01T01·03+0200
commit1c1128c2e10a0cbd39b9844adab99e082f1ccdd5 (patch)
treec1dda8c7654e4b4aa4e1f690d022f3f04db31b85 /init.el
parent22618246cbb4a360e85ddc8c147125b1a3eaafc6 (diff)
Added mouse-support and some haskell-mode config to init.el
Diffstat (limited to 'init.el')
-rw-r--r--init.el25
1 files changed, 22 insertions, 3 deletions
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)