Skip to content

Commit

Permalink
merging in topfunky's branch
Browse files Browse the repository at this point in the history
  • Loading branch information
dave farkas committed May 25, 2011
1 parent a0ee2c9 commit 6566c3a
Show file tree
Hide file tree
Showing 638 changed files with 51,281 additions and 0 deletions.
19 changes: 19 additions & 0 deletions book.local.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
;; Normal is 36pt. Screencastable is 26pt.
(set-face-font 'default "-apple-inconsolata-medium-r-normal--32-0-72-72-m-0-iso10646-1")

;;(set-face-font 'default "-apple-helvetica-medium-r-normal--32-0-72-72-m-0-iso10646-1")
;;(color-theme-topfunky)

;; Show a list of available variants:
;; M-x eval-expression
;; (x-family-fonts "myriad pro")

;; characters wide, lines tall
(set-frame-size (car (frame-list)) 100 28)
;; x y
(set-frame-position (car (frame-list)) 17 33)

;; Font-Size Wide Tall
;; 34 95 27
;; 32

13 changes: 13 additions & 0 deletions custom.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
(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.
'(cc-other-file-alist (quote (("\\.cc\\'" (".hh" ".h")) ("\\.hh\\'" (".cc" ".C")) ("\\.m\\'" (".h")) ("\\.c\\'" (".h")) ("\\.h\\'" (".c" ".cc" ".C" ".CC" ".cxx" ".cpp" ".m")) ("\\.C\\'" (".H" ".hh" ".h")) ("\\.H\\'" (".C" ".CC")) ("\\.CC\\'" (".HH" ".H" ".hh" ".h")) ("\\.HH\\'" (".CC")) ("\\.c\\+\\+\\'" (".h++" ".hh" ".h")) ("\\.h\\+\\+\\'" (".c++")) ("\\.cpp\\'" (".hpp" ".hh" ".h")) ("\\.hpp\\'" (".cpp")) ("\\.cxx\\'" (".hxx" ".hh" ".h")) ("\\.hxx\\'" (".cxx")))))
'(javascript-indent-level 2))
(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.
)
7 changes: 7 additions & 0 deletions octo.local.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(set-face-font 'default "-apple-inconsolata-medium-r-normal--34-0-72-72-m-0-iso10646-1")

;; characters wide, lines tall
(set-frame-size (car (frame-list)) 85 30)
;; x y
(set-frame-position (car (frame-list)) 17 33)

130 changes: 130 additions & 0 deletions topfunky.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
;; DESCRIPTION: topfunky settings

;; Manually set PATH for use by eshell, rspec-mode, etc.
(let ((path))
(setq path (concat "~/.gem/ruby/1.8/bin:"
"~/bin:"
"~/src/homebrew/bin:"
"/usr/local/bin:"
"/usr/bin:"
"/bin"))
(setenv "PATH" path))

(add-to-list 'load-path (concat dotfiles-dir "/vendor"))

(require 'topfunky/meta)

;; Clojure
;;(eval-after-load 'clojure-mode '(clojure-slime-config))

(require 'topfunky/plain-text)

;; Snippets
(add-to-list 'load-path (concat dotfiles-dir "/vendor/yasnippet.el"))
(require 'yasnippet)
(yas/initialize)
(yas/load-directory (concat dotfiles-dir "/vendor/yasnippet.el/snippets"))

(require 'unbound)

(add-to-list 'load-path (concat dotfiles-dir "/vendor/textmate.el"))
(require 'textmate)
(require 'peepopen)
(require 'topfunky/textmate-ext)
(textmate-mode)
(setq ns-pop-up-frames nil)

(require 'whitespace)

(require 'topfunky/python)

(require 'topfunky/coffee)
(require 'topfunky/jade)

;; ruby-mode
(require 'topfunky/sinatra)
(add-to-list 'load-path (concat dotfiles-dir "/vendor/ruby-complexity"))
(add-to-list 'auto-mode-alist '("Capfile\\'" . ruby-mode))
(add-to-list 'auto-mode-alist '("Isolate\\'" . ruby-mode))
(add-to-list 'auto-mode-alist '("Gemfile\\'" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.ru\\'" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.sake\\'" . ruby-mode))

(require 'linum)
(require 'ruby-complexity)
;; (add-hook 'ruby-mode-hook
;; (function (lambda ()
;; (flymake-mode)
;; (linum-mode)
;; (ruby-complexity-mode)
;; )))

(add-to-list 'load-path (concat dotfiles-dir "/vendor/cucumber"))
(require 'feature-mode)
(require 'topfunky/cucumber)

(require 'topfunky/js)

;; Remove scrollbars and make hippie expand
;; work nicely with yasnippet
(when (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
(require 'hippie-exp)
(setq hippie-expand-try-functions-list
'(yas/hippie-try-expand
try-expand-dabbrev
try-expand-dabbrev-visible
try-expand-dabbrev-all-buffers
;; try-expand-dabbrev-from-kill
;; try-complete-file-name
;; try-complete-file-name-partially
;; try-complete-lisp-symbol
;; try-complete-lisp-symbol-partially
;; try-expand-line
;; try-expand-line-all-buffers
;; try-expand-list
;; try-expand-list-all-buffers
;; try-expand-whole-kill
))

(defun indent-or-complete ()
(interactive)
(if (and (looking-at "$") (not (looking-back "^\\s-*")))
(hippie-expand nil)
(indent-for-tab-command)))
(add-hook 'find-file-hooks (function (lambda ()
(local-set-key (kbd "TAB") 'indent-or-complete))))

;; dabbrev-case-fold-search for case-sensitive search

(require 'topfunky/rinari)

(add-to-list 'load-path (concat dotfiles-dir "/vendor/rspec-mode"))
(require 'rspec-mode)

(require 'topfunky/applescript)
(require 'topfunky/org)
(require 'topfunky/textile)
(require 'topfunky/markdown)
(require 'topfunky/haml)
(require 'topfunky/xcode)
(require 'topfunky/keyboard)

;; gist
(require 'gist)

;; Mercurial
;;(require 'mercurial)

;; Color Themes
(add-to-list 'load-path (concat dotfiles-dir "/vendor/color-theme"))
(require 'color-theme)
(color-theme-initialize)

;; Activate theme
(load (concat dotfiles-dir "topfunky/theme.el"))
(color-theme-topfunky)


(require 'autotest)


7 changes: 7 additions & 0 deletions topfunky/applescript.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

(autoload 'applescript-mode "applescript-mode" "major mode for editing AppleScript source." t)
(setq auto-mode-alist
(cons '("\\.applescript$" . applescript-mode) auto-mode-alist))


(provide 'topfunky/applescript)
16 changes: 16 additions & 0 deletions topfunky/coffee.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

(add-to-list 'load-path "~/.emacs.d/vendor/coffee-mode")
(require 'coffee-mode)

(add-to-list 'auto-mode-alist '("\\.coffee$" . coffee-mode))
(add-to-list 'auto-mode-alist '("Cakefile" . coffee-mode))

(defun coffee-custom ()
"coffee-mode-hook"
(set (make-local-variable 'tab-width) 2))

(add-hook 'coffee-mode-hook
'(lambda() (coffee-custom)))

(provide 'topfunky/coffee)

23 changes: 23 additions & 0 deletions topfunky/cucumber.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
;; DESCRIPTION:
;; Useful patterns for using the ido menu with Cucumber files.
;;
;; AUTHOR:
;; Geoffrey Grosenbach http://peepcode.com
;;
;; Matches the major Feature/Scenario blocks.
;;
;; USAGE:
;; (require 'topfunky/cucumber)

(add-to-list 'auto-mode-alist '("\.feature$" . feature-mode))

;; Cucumber menu
(setq feature-mode-imenu-generic-expression
'(("Group" "\\s-*\\(\\(Feature\\|Scenario\\): .+\\)" 1)
))
(add-hook 'feature-mode-hook
(lambda ()
(setq imenu-generic-expression feature-mode-imenu-generic-expression)))

(provide 'topfunky/cucumber)

12 changes: 12 additions & 0 deletions topfunky/haml.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

(require 'haml-mode)
(add-to-list 'auto-mode-alist '("\\.haml$" . haml-mode))
(define-key haml-mode-map [(control meta down)] 'haml-forward-sexp)
(define-key haml-mode-map [(control meta up)] 'haml-backward-sexp)
(define-key haml-mode-map [(control meta left)] 'haml-up-list)
(define-key haml-mode-map [(control meta right)] 'haml-down-list)

(require 'sass-mode)
(add-to-list 'auto-mode-alist '("\\.sass$" . sass-mode))

(provide 'topfunky/haml)
8 changes: 8 additions & 0 deletions topfunky/jade.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

(add-to-list 'load-path "~/.emacs.d/vendor/jade-mode")
(require 'sws-mode)
(require 'jade-mode)

(provide 'topfunky/jade)


57 changes: 57 additions & 0 deletions topfunky/js.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
;; DESCRIPTION:
;; Useful patterns for using the ido menu with Javascript files.
;;
;; AUTHOR:
;; Geoffrey Grosenbach http://peepcode.com
;;
;; Matches things like:
;;
;; function bacon() {} // Standard function
;; getJSON: function () {} // Function as a key in a hash
;; this.post = function () {} // Instance method in a function
;; var MyObj = { ... // Capitalized variable object
;;
;; USAGE:
;; (require 'topfunky/js)

(setq js2-basic-offset 2)
(setq js2-auto-indent-flag nil)
(setq javascript-indent-level 2)

(add-to-list 'auto-mode-alist '("Jimfile\\'" . javascript-mode))

(setq topfunky-js-imenu-generic-expression
'(("Named Function" "function\\s-+\\(\\w+\\)\\s-*(" 1)
("Hash Method" "^\\s-*\\(\\w+\\):\\s-*function\\s-*(" 1)
("Instance Method" "this\.\\(\\w+\\)\\s-*=\\s-*function\\s-*(" 1)
("Variable as Class" "var \\([A-Z]+\\w+\\) = {" 1)
("Assigned Function" "^\\s-*\\([A-z.]+\\w\\) = function\\s-*(.*) {" 1)
))

(add-hook 'javascript-mode-hook
(lambda ()
(setq imenu-generic-expression topfunky-js-imenu-generic-expression)
(setq indent-region-function topfunky-js-beautify)))

;; Run jslint on a file to check syntax and coding conventions.
(add-hook 'javascript-mode-hook
(lambda ()
(set (make-local-variable 'compile-command)
(let ((file (file-name-nondirectory buffer-file-name)))
(concat "node ~/src/reid-node-jslint/bin/jslint.js " file)))))

(defun tf-beautify-js ()
"Run source through JavaScript beautifier."
(interactive)
;; TODO: Doesn't save cursor location
(save-excursion
(shell-command-on-region
(point-min) (point-max)
"~/bin/beautify-js" t t)))

(add-hook 'javascript-mode-hook
(lambda()
(local-set-key [(meta shift n)] 'tf-beautify-js)
))

(provide 'topfunky/js)
35 changes: 35 additions & 0 deletions topfunky/keyboard.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

;; Split Windows
(global-set-key [f6] 'split-window-horizontally)
(global-set-key [f7] 'split-window-vertically)
(global-set-key [f8] 'delete-window)

;; Some Mac-friendly key counterparts
(global-set-key (kbd "M-s") 'save-buffer)
(global-set-key (kbd "M-z") 'undo)
(global-set-key (kbd "M-c") 'kill-ring-save) ;; Copy

;; Keyboard Overrides
(define-key textile-mode-map (kbd "M-s") 'save-buffer)
(define-key text-mode-map (kbd "M-s") 'save-buffer)

(global-set-key [(meta up)] 'beginning-of-buffer)
(global-set-key [(meta down)] 'end-of-buffer)

(global-set-key [(meta shift right)] 'ido-switch-buffer)
(global-set-key [(meta shift up)] 'recentf-ido-find-file)
(global-set-key [(meta shift down)] 'ido-find-file)
(global-set-key [(meta shift left)] 'magit-status)

(global-set-key [(control shift left)] 'previous-buffer)
(global-set-key [(control shift right)] 'next-buffer)

(global-set-key [(meta H)] 'delete-other-windows)

(global-set-key [(meta D)] 'backward-kill-word) ;; (meta d) is opposite

(global-set-key [(meta N)] 'cleanup-buffer)

(global-set-key [(control \])] 'indent-rigidly)

(provide 'topfunky/keyboard)
28 changes: 28 additions & 0 deletions topfunky/markdown.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
;; DESCRIPTION:
;; Enhancements to markdown-mode.
;;
;; AUTHOR:
;; Geoffrey Grosenbach http://peepcode.com
;;
;; FEATURES:
;;
;; * Adds Markdown headings to ido-menu
;;
;; USAGE:
;; (require 'topfunky/tf-markdown)

(autoload 'markdown-mode "markdown-mode.el"
"Major mode for editing Markdown files" t)
(add-to-list 'auto-mode-alist '("\\.mdown\\'" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))


(setq topfunky-markdown-imenu-generic-expression
'(("Top-level Heading" "^\\s-*\\(#\+ \.\*\\)" 1)
))

(add-hook 'markdown-mode-hook
(lambda ()
(setq imenu-generic-expression topfunky-markdown-imenu-generic-expression)))

(provide 'topfunky/markdown)
Loading

0 comments on commit 6566c3a

Please sign in to comment.