Last active
February 21, 2016 10:22
-
-
Save lennart/b1d13d13fa01cf246249 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Package Repository Requirements | |
(when (> emacs-major-version 23) | |
(require 'package) | |
(package-initialize) | |
(add-to-list 'package-archives | |
'("marmalade" . | |
"http://marmalade-repo.org/packages/")) | |
(add-to-list 'package-archives | |
'("melpa" . "http://melpa.milkbox.net/packages/") | |
'APPEND)) | |
;; Imports | |
(setq load-path (cons "~/Documents/tidal" load-path)) | |
;; (add-to-list 'load-path | |
;; "~/") | |
(require 'yasnippet) | |
(yas-global-mode 1) | |
;;(require 'sclang) | |
(require 'tidal) | |
(require 'daumenkino) | |
(require 'load-synths) | |
(require 'cc-mode) | |
(require 'hideshow) | |
(setq tidal-interpreter "/usr/local/bin/ghci") | |
(add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent) | |
(setq c-default-style "bsd" | |
c-basic-offset 2) | |
(setq-default tab-width 2) | |
(defvaralias 'c-basic-offset 'tab-width) | |
(setq js-indent-level 2) | |
(setq css-indent-offset 2) | |
(require 'icicles) | |
(load-file "~/Documents/emacs/rudel-0.2-4/rudel-loaddefs.el") | |
(setq css-comb-executable "/usr/local/bin/csscomb") | |
(eval-after-load 'css-mode | |
'(define-key css-mode-map (kbd "C-c C-x c") 'css-comb)) | |
(defcustom simple-synth "SimpleSynth virtual input" | |
"The simplest synth" | |
:type 'string) | |
(defvar auto-minor-mode-alist () | |
"Alist of filename patterns vs correpsonding minor mode functions, see `auto-mode-alist' | |
All elements of this alist are checked, meaning you can enable multiple minor modes for the same regexp.") | |
(defun enable-minor-mode-based-on-extension () | |
"check file name against auto-minor-mode-alist to enable minor modes | |
the checking happens for all pairs in auto-minor-mode-alist" | |
(when buffer-file-name | |
(let ((name buffer-file-name) | |
(remote-id (file-remote-p buffer-file-name)) | |
(alist auto-minor-mode-alist)) | |
;; Remove backup-suffixes from file name. | |
(setq name (file-name-sans-versions name)) | |
;; Remove remote file name identification. | |
(when (and (stringp remote-id) | |
(string-match-p (regexp-quote remote-id) name)) | |
(setq name (substring name (match-end 0)))) | |
(while (and alist (caar alist) (cdar alist)) | |
(if (string-match (caar alist) name) | |
(funcall (cdar alist) 1)) | |
(setq alist (cdr alist)))))) | |
(add-hook 'find-file-hook 'enable-minor-mode-based-on-extension) | |
(add-to-list 'auto-minor-mode-alist '("\\.[ch]$" . smart-tab-mode)) | |
(add-to-list 'auto-minor-mode-alist '("\\.hs$" . smart-tab-mode)) | |
(add-to-list 'auto-minor-mode-alist '("\\.cabal$" . smart-tab-mode)) | |
(add-to-list 'auto-minor-mode-alist '("\\.vert$" . smart-tab-mode)) | |
(add-to-list 'auto-minor-mode-alist '("\\.frag$" . smart-tab-mode)) | |
(add-to-list 'auto-minor-mode-alist '("\\.tidal$" . smart-tab-mode)) | |
(add-to-list 'auto-minor-mode-alist '("\\.html$" . smart-tab-mode)) | |
(add-to-list 'auto-minor-mode-alist '("\\.js$" . smart-tab-mode)) | |
(add-to-list 'auto-minor-mode-alist '("\\.css$" . smart-tab-mode)) | |
;; (smart-tab-insinuate 'c 'javascript) | |
;; Custom vars | |
(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. | |
'(haskell-mode-hook | |
(quote | |
(turn-on-haskell-indent turn-on-haskell-indentation))) | |
'(haskell-program-name "/usr/local/bin/ghci") | |
'(safe-local-variable-values | |
(quote | |
((haskell-indent-spaces . 4) | |
(haskell-process-use-ghci . t) | |
(hamlet/basic-offset . 4))))) | |
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode) | |
(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. | |
) | |
;; Modes | |
(ace-popup-menu-mode 1) | |
(menu-bar-mode -1) | |
(icy-mode 1) | |
;; Alarms off | |
(setq ring-bell-function 'ignore) | |
;; Shortcuts | |
;(global-set-key (kbd "TAB") 'dabbrev-expand) | |
(global-set-key (kbd "M-p") 'imenu) | |
;; Multiple Cursors | |
(global-set-key (kbd "C-.") 'mc/mark-next-like-this) | |
(global-set-key (kbd "C-c <") 'mc/mark-previous-like-this) | |
(global-set-key (kbd "C-c l") 'mc/mark-more-like-this-extended) | |
(global-set-key (kbd "C-,") 'indent-region) | |
(global-set-key (kbd "C-c p") 'imenu) | |
(global-set-key (kbd "C-@") 'er/expand-region) | |
(global-set-key (kbd "C-?") 'mc/mark-all-like-this) | |
;; Use spaces instead of tabs | |
(setq-default indent-tabs-mode nil) | |
;; Trim trailing whitespace on save | |
(add-hook 'before-save-hook 'delete-trailing-whitespace) | |
(add-to-list 'auto-mode-alist '("\\.frag\\'" . c-mode)) | |
(add-to-list 'auto-mode-alist '("\\.vert\\'" . c-mode)) | |
(define-key yas-minor-mode-map (kbd "<tab>") nil) | |
(define-key yas-minor-mode-map (kbd "TAB") nil) | |
(define-key yas-minor-mode-map (kbd "C-c C-p") 'yas-expand) | |
(define-key yas-minor-mode-map (kbd "C-c C-i") 'yas/insert-snippet) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment