Added mouse-support and some haskell-mode config to init.el

This commit is contained in:
Vincent Ambo 2013-07-01 03:03:23 +02:00
parent 22618246cb
commit 1c1128c2e1
2 changed files with 24 additions and 3 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
/plists/.DS_Store
/.DS_Store

25
init.el
View file

@ -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)