Created
July 29, 2013 06:27
-
-
Save jetaggart/6102469 to your computer and use it in GitHub Desktop.
even better emacs
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
| (require 'package) | |
| (add-to-list 'package-archives | |
| '("marmalade" . "http://marmalade-repo.org/packages/") t) | |
| (package-initialize) | |
| (when (not package-archive-contents) | |
| (package-refresh-contents)) | |
| ;; Add in your own as you wish: | |
| (defvar my-packages '(starter-kit | |
| starter-kit-lisp | |
| starter-kit-bindings | |
| starter-kit-ruby | |
| clojure-mode | |
| clojure-test-mode | |
| nrepl) | |
| "A list of packages to ensure are installed at launch.") | |
| (dolist (p my-packages) | |
| (when (not (package-installed-p p)) | |
| (package-install p))) | |
| (defadvice rspec-compile (around rspec-compile-around) | |
| "Use BASH shell for running the specs because of ZSH issues." | |
| (let ((shell-file-name "/bin/bash")) | |
| ad-do-it)) | |
| (ad-activate 'rspec-compile) | |
| (define-key global-map (kbd "RET") 'newline-and-indent) | |
| (defun set-newline-and-indent () | |
| (local-set-key (kbd "RET") 'reindent-then-newline-and-indent)) | |
| (defun set-auto-pair () | |
| (electric-pair-mode)) | |
| (add-hook 'lisp-mode-hook 'set-newline-and-indent) | |
| (add-hook 'ruby-mode-hook 'set-newline-and-indent) | |
| (add-hook 'ruby-mode-hook 'set-auto-pair) | |
| (add-hook 'rspec-mode-hook 'set-newline-and-indent) | |
| (add-hook 'rspec-mode-hook 'set-auto-pair) | |
| (add-hook 'clojure-mode-hook 'paredit-mode) | |
| (remove-hook 'prog-mode-hook 'esk-turn-on-hl-line-mode) | |
| (set-face-attribute 'default nil :font "DejaVu Sans Mono-12") | |
| (setq org-agenda-files (list "~/psylinse/org/todo.org")) | |
| (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. | |
| '(custom-safe-themes (quote ("8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" "d677ef584c6dfc0697901a44b885cc18e206f05114c8a3b7fde674fce6180879" default)))) | |
| (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. | |
| '(idle-highlight ((t (:background "LightGoldenrod1"))))) | |
| (load-theme 'solarized-light) | |
| (set-default 'cursor-type 'bar) | |
| (set-default 'cursor-color 'black) | |
| (blink-cursor-mode 1) | |
| (global-set-key [M-left] 'windmove-left) ; move to left windnow | |
| (global-set-key [M-right] 'windmove-right) ; move to right window | |
| (global-set-key [M-up] 'windmove-up) ; move to upper window | |
| (global-set-key [M-down] 'windmove-down) ; move to downer window | |
| (global-set-key "\C-cl" 'org-store-link) | |
| (global-set-key "\C-cc" 'org-capture) | |
| (global-set-key "\C-ca" 'org-agenda) | |
| (global-set-key "\C-cb" 'org-iswitchb) | |
| (setq backup-directory-alist | |
| `((".*" . ,temporary-file-directory))) | |
| (setq auto-save-file-name-transforms | |
| `((".*" ,temporary-file-directory t))) | |
| ;; Scrolling | |
| ;; scroll one line at a time (less "jumpy" than defaults) | |
| (setq mouse-wheel-scroll-amount '(1 ((shift) . 1))) ;; one line at a time | |
| (setq mouse-wheel-progressive-speed nil) ;; don't accelerate scrolling | |
| (setq mouse-wheel-follow-mouse 't) ;; scroll window under mouse | |
| (setq redisplay-dont-pause t | |
| scroll-margin 1 | |
| scroll-step 1 | |
| scroll-conservatively 10000 | |
| scroll-preserve-screen-position 1) | |
| (global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines) | |
| (global-set-key (kbd "C->") 'mc/mark-next-like-this) | |
| (global-set-key (kbd "C-<") 'mc/mark-previous-like-this) | |
| (global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this) | |
| ;; Function to create new functions that look for a specific pattern | |
| (defun ffip-create-pattern-file-finder (&rest patterns) | |
| (lexical-let ((patterns patterns)) | |
| (lambda () | |
| (interactive) | |
| (let ((ffip-patterns patterns)) | |
| (find-file-in-project))))) | |
| ;; Find file in project, with specific patterns | |
| (global-unset-key (kbd "C-x C-o")) | |
| (global-set-key (kbd "C-x C-o ja") | |
| (ffip-create-pattern-file-finder "*.java")) | |
| (global-set-key (kbd "C-x C-o js") | |
| (ffip-create-pattern-file-finder "*.js")) | |
| (global-set-key (kbd "C-x C-o jp") | |
| (ffip-create-pattern-file-finder "*.jsp")) | |
| (global-set-key (kbd "C-x C-o rb") | |
| (ffip-create-pattern-file-finder "*.rb")) | |
| (global-set-key (kbd "C-x C-o cf") | |
| (ffip-create-pattern-file-finder "*.coffee")) | |
| (global-set-key (kbd "C-x C-o yml") | |
| (ffip-create-pattern-file-finder "*.yml")) | |
| (global-set-key (kbd "C-x C-o ja") | |
| (ffip-create-pattern-file-finder "*.java")) | |
| (global-set-key (kbd "C-x C-o js") | |
| (ffip-create-pattern-file-finder "*.js")) | |
| (global-set-key (kbd "C-x C-o jp") | |
| (ffip-create-pattern-file-finder "*.jsp")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://gist.github.com/pivotal-shutl/6106003