2013-07-02 23:08:09 +02:00
|
|
|
;; Configure package manager
|
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-02 23:13:15 +02:00
|
|
|
(defvar my-pkgs '(starter-kit starter-kit-bindings haskell-mode markdown-mode magit color-theme-solarized)
|
2013-07-01 03:14:15 +02:00
|
|
|
"A list of 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)))
|
|
|
|
|
2013-07-02 23:08:09 +02:00
|
|
|
;; Configure el-get
|
|
|
|
(require 'cl)
|
|
|
|
|
|
|
|
(add-to-list 'load-path "~/.emacs.d/el-get/el-get")
|
|
|
|
|
|
|
|
;; Install el-get if not already present
|
|
|
|
(unless (require 'el-get nil t)
|
|
|
|
(url-retrieve
|
|
|
|
"https://github.com/dimitri/el-get/raw/master/el-get-install.el"
|
|
|
|
(lambda (s)
|
|
|
|
(end-of-buffer)
|
|
|
|
(eval-print-last-sexp))))
|
|
|
|
|
|
|
|
;; el-get recipes
|
|
|
|
(setq
|
|
|
|
my:el-get-packages
|
|
|
|
'(el-get
|
|
|
|
switch-window))
|
|
|
|
|
|
|
|
(el-get 'sync my:el-get-packages)
|
|
|
|
|
2013-07-01 03:14:15 +02:00
|
|
|
;; Set solarized theme
|
|
|
|
(load-theme 'solarized-dark t)
|
|
|
|
|
2013-07-02 23:08:09 +02:00
|
|
|
;; Other general settings
|
|
|
|
|
2013-07-01 03:03:23 +02:00
|
|
|
;; 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))
|
2013-07-02 23:08:09 +02:00
|
|
|
|
2013-07-01 03:03:23 +02:00
|
|
|
(setq mouse-sel-mode t)
|
|
|
|
)
|
|
|
|
|
2013-07-02 23:08:09 +02:00
|
|
|
;; Use clipboard properly
|
|
|
|
(setq x-select-enable-clipboard t)
|
|
|
|
|
|
|
|
;; Navigate windows with M-<arrows>
|
|
|
|
(windmove-default-keybindings 'meta)
|
|
|
|
(setq windmove-wrap-around t)
|
|
|
|
|
2013-07-02 23:13:15 +02:00
|
|
|
;; Configure markdown-mode
|
|
|
|
(autoload 'markdown-mode "markdown-mode"
|
|
|
|
"Major mode for editing Markdown files" t)
|
|
|
|
(add-to-list 'auto-mode-alist '("\\.txt\\'" . markdown-mode))
|
|
|
|
(add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode))
|
|
|
|
(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
|
|
|
|
|
2013-07-01 02:32:30 +02:00
|
|
|
;; Configure haskell-mode
|
2013-07-01 03:03:23 +02:00
|
|
|
;; 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)
|
2013-07-01 19:09:26 +02:00
|
|
|
|
|
|
|
;; IRC configuration (erc)
|
|
|
|
;; Actual servers and such are loaded from irc.el
|
|
|
|
(require 'erc)
|
|
|
|
(load "~/.emacs.d/irc")
|
|
|
|
|
|
|
|
;; Hiding JOIN, QUIT, PART
|
|
|
|
(setq erc-hide-list '("JOIN" "PART" "QUIT"))
|
|
|
|
|
|
|
|
(custom-set-variables
|
|
|
|
;; custom-set-variables was added by Custom.
|
|
|
|
;; If you edit it by hand, you could mess it up, so be careful.
|
|
|
|
;; Your init file should contain only one such instance.
|
|
|
|
;; If there is more than one, they won't work right.
|
|
|
|
'(erc-modules (quote (autojoin button completion dcc irccontrols list log match menu move-to-prompt netsplit networks noncommands notifications readonly ring scrolltobottom stamp track))))
|
|
|
|
(custom-set-faces
|
|
|
|
;; custom-set-faces was added by Custom.
|
|
|
|
;; If you edit it by hand, you could mess it up, so be careful.
|
|
|
|
;; Your init file should contain only one such instance.
|
|
|
|
;; If there is more than one, they won't work right.
|
|
|
|
)
|