tvl-depot/init.el

39 lines
1.2 KiB
EmacsLisp
Raw Normal View History

2013-07-01 02:32:30 +02:00
(require 'package)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/") t)
(package-initialize)
(when (not package-archive-contents)
(package-refresh-contents))
;; Important packages
2013-07-01 03:05:46 +02:00
(defvar my-pkgs '(starter-kit starter-kit-bindings haskell-mode magit)
"Packages to install at launch.")
2013-07-01 02:32:30 +02:00
(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)
)
2013-07-01 02:32:30 +02:00
;; Configure haskell-mode
;; 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)