Skip to content

Instantly share code, notes, and snippets.

@minimal
Created March 16, 2010 22:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save minimal/334580 to your computer and use it in GitHub Desktop.
Save minimal/334580 to your computer and use it in GitHub Desktop.
chris.el
;; emacs customisations after using emacs starter kit.
;; font
(custom-set-faces
'(default ((t (:height 115 :width normal :foundry "outline" :family "Lucida Console")))))
(setq-default tab-width 4)
(setq column-number-mode t)
;; themes
(add-to-list 'load-path "color-theme.el")
(require 'color-theme)
'(progn
(color-theme-initialize)
(color-theme-hober))
(load-file "~/.emacs.d/color-theme-6.6.0/themes/color-theme-chocolate-rain.el")
(color-theme-chocolate-rain)
(require 'iedit)
;; bindings
(setq x-super-keysym 'meta) ; make cmd key as meta - for apple keyboard on linux
(global-set-key "\r" 'newline-and-indent)
(global-set-key [f9] 'ido-switch-buffer)
(set-register ?e '(file . "~/.emacs.d/chris.el")) ; 'C-x r j e' opens this file
(define-key global-map (kbd "C-;") 'iedit-mode)
;;bind the slime selector to f12 and add a method for finding clojure buffers
;(define-key global-map (kbd "<f12>") 'slime-selector)
;(def-slime-selector-method ?j
; "most recently visited clojure-mode buffer."
; (slime-recently-visited-buffer 'clojure-mode))
;; move frame focus with alt, not control
;(windmove-default-keybindings 'meta)
;(setq shift-select-mode t)
(load "~/.emacs.d/smooth-scrolling.el" nil t)
(require 'smooth-scrolling)
(load "~/.emacs.d/rainbow-parens.el" nil t)
(require 'rainbow-parens)
;;(add-hook 'clojure-mode-hook (lambda () (highlight-parentheses-mode t)))
(setq tab-always-indent 'complete)
;; After setting that, the TAB-key will (after trying if there's
;; anything to indent first) provide possible completions. It works
;; pretty well for Emacs-Lisp (I did not test other languages),
;; although the way it shows the completions (separate
;; *Completions*-buffer) is a bit clumsier that what for instance
;; yasnippet or company-mode do
(setq completion-styles (append completion-styles '(initials)))
;; With this, you can complete on the initials of functions and
;; variables in the minibuffer, say, typing C-h v tai and then
;; pressing TAB will give you tab-always-indent.
(add-to-list 'load-path "~/.emacs.d/elisp/feature-mode")
;; optional configurations
;; default language if .feature doesn't have "# language: fi"
;(setq feature-default-language "fi")
;; point to cucumber languages.yml or gherkin i18n.yml to use
;; exactly the same localization your cucumber uses
;(setq feature-default-i18n-file "/path/to/gherkin/gem/i18n.yml")
;; and load feature-mode
(require 'feature-mode)
(add-to-list 'auto-mode-alist '("\.feature$" . feature-mode))
(add-to-list 'load-path "~/.emacs.d/elisp/coffee-mode")
(require 'coffee-mode)
(defun coffee-custom ()
"coffee-mode-hook"
;; CoffeeScript uses two spaces.
(set (make-local-variable 'tab-width) 2)
;; *Messages* spam
(setq coffee-debug-mode t)
;; Compile '.coffee' files on every save
(add-hook 'after-save-hook
'(lambda ()
(when (string-match "\.coffee$" (buffer-name))
(coffee-compile-file)))))
(add-hook 'coffee-mode-hook
'(lambda() (coffee-custom)))
(add-to-list 'load-path
"~/.emacs.d/elisp/yasnippet-0.6.1c")
(require 'yasnippet) ;; not yasnippet-bundle
(yas/initialize)
(yas/load-directory "~/.emacs.d/elisp/yasnippet-0.6.1c/snippets")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment