From 408fcd8b22a44251df11246be3b04178917f3fb9 Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Thu, 7 Oct 2010 15:09:24 -0700 Subject: [PATCH] [emacs] add color theme tangotango and coffee-mode --- emacs | 13 +- emacs.d/coffee-mode.el | 610 ++++++++++++++++++++++++++++++ emacs.d/color-theme-tangotango.el | 194 ++++++++++ emacs.d/textmate.el | 2 +- 4 files changed, 813 insertions(+), 6 deletions(-) create mode 100644 emacs.d/coffee-mode.el create mode 100644 emacs.d/color-theme-tangotango.el diff --git a/emacs b/emacs index 38883c5..e108c01 100644 --- a/emacs +++ b/emacs @@ -77,7 +77,6 @@ (require 'textmate) (textmate-mode) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; minimap ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -207,6 +206,8 @@ (add-to-list 'auto-mode-alist '("\\.json$" . espresso-mode)) +;; coffee script +(require 'coffee-mode) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; objective j @@ -580,15 +581,17 @@ PAIRS, defaults are: (), [], {}, <>." (push-mark opening-index 'nomsg t) (goto-char (1+ closing-index)))))) - (cond ((file-readable-p "~/.emacs.d/color-theme") - (add-to-list 'load-path "~/.emacs.d/color-theme") - (require 'color-theme) + (add-to-list 'load-path "~/.emacs.d/color-theme") + (require 'color-theme) ;; dark themes ;; (color-theme-charcoal-black) ;; pastels, low contrast *** ;; (color-theme-midnight) ;; grey comments, so-so *** -(color-theme-taylor) ;; beige text, orange comments **** +;; (color-theme-taylor) ;; beige text, orange comments **** +(when (file-readable-p "~/.emacs.d/color-theme-tangotango.el") + (require 'color-theme-tangotango) + (color-theme-tangotango)) ;; beige text, orange comments **** )) (defun totd () diff --git a/emacs.d/coffee-mode.el b/emacs.d/coffee-mode.el new file mode 100644 index 0000000..eb69449 --- /dev/null +++ b/emacs.d/coffee-mode.el @@ -0,0 +1,610 @@ +;;; coffee-mode.el --- Major mode to edit CoffeeScript files in Emacs + +;; Copyright (C) 2010 Chris Wanstrath + +;; Version 0.3.0 +;; Keywords: CoffeeScript major mode +;; Author: Chris Wanstrath +;; URL: http://github.com/defunkt/coffee-script + +;; This file is not part of GNU Emacs. + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program; if not, write to the Free Software +;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +;;; Commentary + +;; For commentary please see the README.md or +;; http://github.com/defunkt/coffee-mode#readme + +;;; Installation + +;; In your shell: + +;; $ cd ~/.emacs.d/vendor +;; $ git clone git://github.com/defunkt/coffee-mode.git + +;; In your emacs config: + +;; (add-to-list 'load-path "~/.emacs.d/vendor/coffee-mode") +;; (require 'coffee-mode) + +;;; Thanks + +;; Major thanks to http://xahlee.org/emacs/elisp_syntax_coloring.html +;; the instructions. + +;; Also thanks to Jason Blevins's markdown-mode.el and Steve Yegge's +;; js2-mode for guidance. + +;; TODO: +;; - Execute {buffer,region,line} and show output in new buffer +;; - Make prototype accessor assignments like `String::length: -> 10` pretty. +;; - mirror-mode - close brackets and parens automatically + +;;; Code: + +(require 'comint) +(require 'easymenu) +(require 'font-lock) + +(eval-when-compile + (require 'cl)) + +;; +;; Customizable Variables +;; + +(defconst coffee-mode-version "0.3.0" + "The version of this `coffee-mode'.") + +(defgroup coffee nil + "A CoffeeScript major mode." + :group 'languages) + +(defcustom coffee-debug-mode nil + "Whether to run in debug mode or not. Logs to `*Messages*'." + :type 'boolean + :group 'coffee-mode) + +(defcustom coffee-js-mode 'js2-mode + "The mode to use when viewing compiled JavaScript." + :type 'string + :group 'coffee) + +(defcustom coffee-cleanup-whitespace t + "Should we `delete-trailing-whitespace' on save? Probably." + :type 'boolean + :group 'coffee) + +(defcustom coffee-tab-width tab-width + "The tab width to use when indenting." + :type 'integer + :group 'coffee) + +(defcustom coffee-command "coffee" + "The CoffeeScript command used for evaluating code. Must be in your +path." + :type 'string + :group 'coffee) + +(defcustom coffee-args-repl '("-i") + "The command line arguments to pass to `coffee-command' to start a REPL." + :type 'list + :group 'coffee) + +(defcustom coffee-args-compile '("-c") + "The command line arguments to pass to `coffee-command' when compiling a file." + :type 'list + :group 'coffee) + +(defcustom coffee-compiled-buffer-name "*coffee-compiled*" + "The name of the scratch buffer used when compiling CoffeeScript." + :type 'string + :group 'coffee) + +(defvar coffee-mode-hook nil + "A hook for you to run your own code when the mode is loaded.") + +(defvar coffee-mode-map (make-keymap) + "Keymap for CoffeeScript major mode.") + +;; +;; Macros +;; + +(defmacro setd (var val) + "Like setq but optionally logs the variable's value using `coffee-debug'." + (if (and (boundp 'coffee-debug-mode) coffee-debug-mode) + `(progn + (coffee-debug "%s: %s" ',var ,val) + (setq ,var ,val)) + `(setq ,var ,val))) + +(defun coffee-debug (string &rest args) + "Print a message when in debug mode." + (when coffee-debug-mode + (apply 'message (append (list string) args)))) + +(defmacro coffee-line-as-string () + "Returns the current line as a string." + `(buffer-substring (point-at-bol) (point-at-eol))) + +;; +;; Commands +;; + +(defun coffee-repl () + "Launch a CoffeeScript REPL using `coffee-command' as an inferior mode." + (interactive) + + (unless (comint-check-proc "*CoffeeREPL*") + (set-buffer + (apply 'make-comint "CoffeeREPL" + coffee-command nil coffee-args-repl))) + + (pop-to-buffer "*CoffeeScript*")) + +(defun coffee-compile-file () + "Compiles and saves the current file to disk. Doesn't open in a buffer.." + (interactive) + (let ((compiler-output (shell-command-to-string (coffee-command-compile (buffer-file-name))))) + (if (string= compiler-output "") + (message "Compiled and saved %s" (concat (substring (buffer-file-name) 0 -6) "js")) + (message (car (split-string compiler-output "[\n\r]+")))))) + +(defun coffee-compile-buffer () + "Compiles the current buffer and displays the JS in another buffer." + (interactive) + (save-excursion + (coffee-compile-region (point-min) (point-max)))) + +(defun coffee-compile-region (start end) + "Compiles a region and displays the JS in another buffer." + (interactive "r") + + (let ((buffer (get-buffer coffee-compiled-buffer-name))) + (when buffer + (kill-buffer buffer))) + + (call-process-region start end coffee-command nil + (get-buffer-create coffee-compiled-buffer-name) + nil + "-s" "-p" "--no-wrap") + (switch-to-buffer (get-buffer coffee-compiled-buffer-name)) + (funcall coffee-js-mode) + (goto-char (point-min))) + +(defun coffee-show-version () + "Prints the `coffee-mode' version." + (interactive) + (message (concat "coffee-mode v" coffee-mode-version))) + +(defun coffee-open-reference () + "Open browser to CoffeeScript reference." + (interactive) + (browse-url "http://jashkenas.github.com/coffee-script/")) + +(defun coffee-open-node-reference () + "Open browser to node.js reference." + (interactive) + (browse-url "http://nodejs.org/api.html")) + +(defun coffee-open-github () + "Open browser to `coffee-mode' project on GithHub." + (interactive) + (browse-url "http://github.com/defunkt/coffee-mode")) + +;; +;; Menubar +;; + +(easy-menu-define coffee-mode-menu coffee-mode-map + "Menu for CoffeeScript mode" + '("CoffeeScript" + ["Compile File" coffee-compile-file] + ["Compile Buffer" coffee-compile-buffer] + ["Compile Region" coffee-compile-region] + ["REPL" coffee-repl] + "---" + ["CoffeeScript Reference" coffee-open-reference] + ["node.js Reference" coffee-open-node-reference] + ["coffee-mode on GitHub" coffee-open-github] + ["Version" coffee-show-version] + )) + +;; +;; Define Language Syntax +;; + +;; Instance variables (implicit this) +(defvar coffee-this-regexp "@\\(\\w\\|_\\)*\\|this") + +;; Prototype::access +(defvar coffee-prototype-regexp "\\(\\(\\w\\|\\.\\|_\\| \\|$\\)+?\\)::\\(\\(\\w\\|\\.\\|_\\| \\|$\\)+?\\):") + +;; Assignment +(defvar coffee-assign-regexp "\\(\\(\\w\\|\\.\\|_\\| \\|$\\)+?\\):") + +;; Lambda +(defvar coffee-lambda-regexp "\\((.+)\\)?\\s *\\(->\\|=>\\)") + +;; Namespaces +(defvar coffee-namespace-regexp "\\b\\(class\\s +\\(\\S +\\)\\)\\b") + +;; Booleans +(defvar coffee-boolean-regexp "\\b\\(true\\|false\\|yes\\|no\\|on\\|off\\|null\\)\\b") + +;; Regular Expressions +(defvar coffee-regexp-regexp "\\/.+?\\/") + +;; JavaScript Keywords +(defvar coffee-js-keywords + '("if" "else" "new" "return" "try" "catch" + "finally" "throw" "break" "continue" "for" "in" "while" + "delete" "instanceof" "typeof" "switch" "super" "extends" + "class")) + +;; Reserved keywords either by JS or CS. +(defvar coffee-js-reserved + '("case" "default" "do" "function" "var" "void" "with" + "const" "let" "debugger" "enum" "export" "import" "native" + "__extends" "__hasProp")) + +;; CoffeeScript keywords. +(defvar coffee-cs-keywords + '("then" "unless" "and" "or" "is" + "isnt" "not" "of" "by" "where" "when")) + +;; Regular expression combining the above three lists. +(defvar coffee-keywords-regexp (regexp-opt + (append + coffee-js-reserved + coffee-js-keywords + coffee-cs-keywords) 'words)) + + +;; Create the list for font-lock. Each class of keyword is given a +;; particular face. +(defvar coffee-font-lock-keywords + ;; *Note*: order below matters. `coffee-keywords-regexp' goes last + ;; because otherwise the keyword "state" in the function + ;; "state_entry" would be highlighted. + `((,coffee-this-regexp . font-lock-variable-name-face) + (,coffee-prototype-regexp . font-lock-variable-name-face) + (,coffee-assign-regexp . font-lock-type-face) + (,coffee-regexp-regexp . font-lock-constant-face) + (,coffee-boolean-regexp . font-lock-constant-face) + (,coffee-keywords-regexp . font-lock-keyword-face))) + +;; +;; Helper Functions +;; + +(defun coffee-before-save () + "Hook run before file is saved. Deletes whitespace if +`coffee-cleanup-whitespace' is non-nil." + (when coffee-cleanup-whitespace + (delete-trailing-whitespace))) + +(defun coffee-comment-dwim (arg) + "Comment or uncomment current line or region in a smart way. +For detail, see `comment-dwim'." + (interactive "*P") + (require 'newcomment) + (let ((deactivate-mark nil) (comment-start "#") (comment-end "")) + (comment-dwim arg))) + +(defun coffee-command-compile (file-name) + "The `coffee-command' with args to compile a file." + (mapconcat 'identity (append (list coffee-command) coffee-args-compile (list file-name)) " ")) + +;; +;; imenu support +;; + +;; This is a pretty naive but workable way of doing it. First we look +;; for any lines that starting with `coffee-assign-regexp' that include +;; `coffee-lambda-regexp' then add those tokens to the list. +;; +;; Should cover cases like these: +;; +;; minus: (x, y) -> x - y +;; String::length: -> 10 +;; block: -> +;; print('potion') +;; +;; Next we look for any line that starts with `class' or +;; `coffee-assign-regexp' followed by `{` and drop into a +;; namespace. This means we search one indentation level deeper for +;; more assignments and add them to the alist prefixed with the +;; namespace name. +;; +;; Should cover cases like these: +;; +;; class Person +;; print: -> +;; print 'My name is ' + this.name + '.' +;; +;; class Policeman extends Person +;; constructor: (rank) -> +;; @rank: rank +;; print: -> +;; print 'My name is ' + this.name + " and I'm a " + this.rank + '.' +;; +;; TODO: +;; app = { +;; window: {width: 200, height: 200} +;; para: -> 'Welcome.' +;; button: -> 'OK' +;; } + +(defun coffee-imenu-create-index () + "Create an imenu index of all methods in the buffer." + (interactive) + + ;; This function is called within a `save-excursion' so we're safe. + (goto-char (point-min)) + + (let ((index-alist '()) assign pos indent ns-name ns-indent) + ;; Go through every assignment that includes -> or => on the same + ;; line or starts with `class'. + (while (re-search-forward + (concat "^\\(\\s *\\)" + "\\(" + coffee-assign-regexp + ".+?" + coffee-lambda-regexp + "\\|" + coffee-namespace-regexp + "\\)") + (point-max) + t) + + (coffee-debug "Match: %s" (match-string 0)) + + ;; If this is the start of a new namespace, save the namespace's + ;; indentation level and name. + (when (match-string 8) + ;; Set the name. + (setq ns-name (match-string 8)) + + ;; If this is a class declaration, add :: to the namespace. + (setq ns-name (concat ns-name "::")) + + ;; Save the indentation level. + (setq ns-indent (length (match-string 1))) + + ;; Debug + (coffee-debug "ns: Found %s with indent %s" ns-name ns-indent)) + + ;; If this is an assignment, save the token being + ;; assigned. `Please.print:` will be `Please.print`, `block:` + ;; will be `block`, etc. + (when (setq assign (match-string 3)) + ;; The position of the match in the buffer. + (setq pos (match-beginning 3)) + + ;; The indent level of this match + (setq indent (length (match-string 1))) + + ;; If we're within the context of a namespace, add that to the + ;; front of the assign, e.g. + ;; constructor: => Policeman::constructor + (when (and ns-name (> indent ns-indent)) + (setq assign (concat ns-name assign))) + + (coffee-debug "=: Found %s with indent %s" assign indent) + + ;; Clear the namespace if we're no longer indented deeper + ;; than it. + (when (and ns-name (<= indent ns-indent)) + (coffee-debug "ns: Clearing %s" ns-name) + (setq ns-name nil) + (setq ns-indent nil)) + + ;; Add this to the alist. Done. + (push (cons assign pos) index-alist))) + + ;; Return the alist. + index-alist)) + +;; +;; Indentation +;; + +;;; The theory is explained in the README. + +(defun coffee-indent-line () + "Indent current line as CoffeeScript." + (interactive) + + (if (= (point) (point-at-bol)) + (insert-tab) + (save-excursion + (let ((prev-indent 0) (cur-indent 0)) + ;; Figure out the indentation of the previous line + (setd prev-indent (coffee-previous-indent)) + + ;; Figure out the current line's indentation + (setd cur-indent (current-indentation)) + + ;; Shift one column to the left + (beginning-of-line) + (insert-tab) + + (coffee-debug "point: %s" (point)) + (coffee-debug "point-at-bol: %s" (point-at-bol)) + + (when (= (point-at-bol) (point)) + (forward-char coffee-tab-width)) + + (coffee-debug "New indent: %s" (current-indentation)) + + ;; We're too far, remove all indentation. + (when (> (- (current-indentation) prev-indent) coffee-tab-width) + (backward-to-indentation 0) + (delete-region (point-at-bol) (point))))))) + +(defun coffee-previous-indent () + "Return the indentation level of the previous non-blank line." + + (save-excursion + (forward-line -1) + (if (bobp) + 0 + (progn + (while (coffee-line-empty-p) (forward-line -1)) + (current-indentation))))) + +(defun coffee-line-empty-p () + "Is this line empty? Returns non-nil if so, nil if not." + (or (bobp) + (string-match "^\\s *$" (coffee-line-as-string)))) + +(defun coffee-newline-and-indent () + "Inserts a newline and indents it to the same level as the previous line." + (interactive) + + ;; Remember the current line indentation level, + ;; insert a newline, and indent the newline to the same + ;; level as the previous line. + (let ((prev-indent (current-indentation)) (indent-next nil)) + (newline) + (insert-tab (/ prev-indent coffee-tab-width)) + + ;; We need to insert an additional tab because the last line was special. + (when (coffee-line-wants-indent) + (insert-tab))) + + ;; Last line was a comment so this one should probably be, + ;; too. Makes it easy to write multi-line comments (like the one I'm + ;; writing right now). + (when (coffee-previous-line-is-comment) + (insert "# "))) + +;; Indenters help determine whether the current line should be +;; indented further based on the content of the previous line. If a +;; line starts with `class', for instance, you're probably going to +;; want to indent the next line. + +(defvar coffee-indenters-bol '("class" "for" "if" "try") + "Keywords or syntax whose presence at the start of a line means the +next line should probably be indented.") + +(defun coffee-indenters-bol-regexp () + "Builds a regexp out of `coffee-indenters-bol' words." + (concat "^" (regexp-opt coffee-indenters-bol 'words))) + +(defvar coffee-indenters-eol '(?> ?{ ?\[) + "Single characters at the end of a line that mean the next line +should probably be indented.") + +(defun coffee-line-wants-indent () + "Does the current line want to be indented deeper than the previous +line? Returns `t' or `nil'. See the README for more details." + (interactive) + + (save-excursion + (let ((indenter-at-bol) (indenter-at-eol)) + ;; Go back a line and to the first character. + (forward-line -1) + (backward-to-indentation 0) + + ;; If the next few characters match one of our magic indenter + ;; keywords, we want to indent the line we were on originally. + (when (looking-at (coffee-indenters-bol-regexp)) + (setd indenter-at-bol t)) + + ;; If that didn't match, go to the back of the line and check to + ;; see if the last character matches one of our indenter + ;; characters. + (when (not indenter-at-bol) + (end-of-line) + + ;; Optimized for speed - checks only the last character. + (when (some (lambda (char) + (= (char-before) char)) + coffee-indenters-eol) + (setd indenter-at-eol t))) + + ;; If we found an indenter, return `t'. + (or indenter-at-bol indenter-at-eol)))) + +(defun coffee-previous-line-is-comment () + "Returns `t' if the previous line is a CoffeeScript comment." + (save-excursion + (forward-line -1) + (coffee-line-is-comment))) + +(defun coffee-line-is-comment () + "Returns `t' if the current line is a CoffeeScript comment." + (save-excursion + (backward-to-indentation 0) + (= (char-after) (string-to-char "#")))) + +;; +;; Define Major Mode +;; + +;;;###autoload +(define-derived-mode coffee-mode fundamental-mode + "coffee-mode" + "Major mode for editing CoffeeScript..." + + ;; key bindings + (define-key coffee-mode-map (kbd "A-r") 'coffee-compile-buffer) + (define-key coffee-mode-map (kbd "A-R") 'coffee-compile-region) + (define-key coffee-mode-map (kbd "A-M-r") 'coffee-repl) + (define-key coffee-mode-map [remap comment-dwim] 'coffee-comment-dwim) + (define-key coffee-mode-map "\C-m" 'coffee-newline-and-indent) + + ;; code for syntax highlighting + (setq font-lock-defaults '((coffee-font-lock-keywords))) + + ;; perl style comment: "# ..." + (modify-syntax-entry ?# "< b" coffee-mode-syntax-table) + (modify-syntax-entry ?\n "> b" coffee-mode-syntax-table) + (setq comment-start "#") + + ;; single quote strings + (modify-syntax-entry ?' "\"" coffee-mode-syntax-table) + (modify-syntax-entry ?' "\"" coffee-mode-syntax-table) + + ;; indentation + (make-local-variable 'indent-line-function) + (setq indent-line-function 'coffee-indent-line) + (setq coffee-tab-width tab-width) ;; Just in case... + + ;; imenu + (make-local-variable 'imenu-create-index-function) + (setq imenu-create-index-function 'coffee-imenu-create-index) + + ;; no tabs + (setq indent-tabs-mode nil) + + ;; hooks + (set (make-local-variable 'before-save-hook) 'coffee-before-save)) + +(provide 'coffee-mode) + +;; +;; On Load +;; + +;; Run coffee-mode for files ending in .coffee. +;;;###autoload +(add-to-list 'auto-mode-alist '("\\.coffee$" . coffee-mode)) +;;;###autoload +(add-to-list 'auto-mode-alist '("Cakefile" . coffee-mode)) diff --git a/emacs.d/color-theme-tangotango.el b/emacs.d/color-theme-tangotango.el new file mode 100644 index 0000000..397523a --- /dev/null +++ b/emacs.d/color-theme-tangotango.el @@ -0,0 +1,194 @@ +;;; Emacs Color theme based on the Tango Palette colors. +;;; First derived from color-theme-tango.el, created by danranx@gmail.com : +;;; http://www.emacswiki.org/emacs/color-theme-tango.el + +;; Copyright (C) 2010 Julien Barnier + +;; Project homepage : http://blog.nozav.org/post/2010/07/12/Updated-tangotango-emacs-color-theme + +;; This file is NOT part of GNU Emacs. + +;; This is free software; you can redistribute it and/or modify it under +;; the terms of the GNU General Public License as published by the Free +;; Software Foundation; either version 2, or (at your option) any later +;; version. + +;; This file is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with Emacs; see the file COPYING, or type `C-h C-c'. If not, +;; write to the Free Software Foundation at this address: + +;; Free Software Foundation +;; 51 Franklin Street, Fifth Floor +;; Boston, MA 02110-1301 +;; USA + +;;; Code: + +(eval-when-compile + (require 'color-theme)) + +(defun color-theme-tangotango () + "A color theme based on Tango Palette colors." + ;; Color codes : + ;; - blue : "dodger blue" + ;; - yellow : "#edd400" + ;; - green : "#6ac214" + ;; - orange/red : "tomato" + (interactive) + (color-theme-install + '(color-theme-tangotango + ((background-color . "#2e3434") + (background-mode . dark) + (border-color . "#888a85") + (cursor-color . "#fce94f") + (foreground-color . "#eeeeec") + (mouse-color . "#8ae234")) + ((help-highlight-face . underline) + (ibuffer-dired-buffer-face . font-lock-function-name-face) + (ibuffer-help-buffer-face . font-lock-comment-face) + (ibuffer-hidden-buffer-face . font-lock-warning-face) + (ibuffer-occur-match-face . font-lock-warning-face) + (ibuffer-read-only-buffer-face . font-lock-type-face) + (ibuffer-special-buffer-face . font-lock-keyword-face) + (ibuffer-title-face . font-lock-type-face)) + (highlight ((t (:background "brown4" :foreground nil)))) + (border ((t (:background "#888a85")))) + (fringe ((t (:background "grey10")))) + (mode-line ((t (:foreground "#bbbbbc" :background "#222222" :box (:line-width 1 :color nil :style released-button))))) + (mode-line-inactive ((t (:foreground "#bbbbbc" :background "#555753")))) + (mode-line-buffer-id ((t (:bold t :foreground "orange" :background nil)))) + (region ((t (:background "dark slate blue")))) + (link ((t (:underline t :foreground "dodger blue")))) + (custom-link ((t (:inherit 'link)))) + (match ((t (:bold t :background "#e9b96e" :foreground "#2e3436")))) + (tool-tips ((t (:inherit 'variable-pitch :foreground "black" :background "lightyellow")))) + (tooltip ((t (:inherit 'variable-pitch :foreground "black" :background "lightyellow")))) + (bold ((t (:bold t :underline nil :background nil)))) + (italic ((t (:italic t :underline nil :background nil)))) + (font-lock-builtin-face ((t (:foreground "#729fcf")))) + (font-lock-comment-face ((t (:foreground "#888a85")))) + (font-lock-constant-face ((t (:foreground "#8ae234")))) + (font-lock-doc-face ((t (:foreground "#888a85")))) + (font-lock-keyword-face ((t (:foreground "#729fcf" :bold t)))) + (font-lock-string-face ((t (:foreground "#ad7fa8" :italic t)))) + (font-lock-type-face ((t (:foreground "#8ae234" :bold t)))) + (font-lock-variable-name-face ((t (:foreground "tomato")))) + (font-lock-warning-face ((t (:bold t :foreground "#f57900")))) + (font-lock-function-name-face ((t (:foreground "#edd400" :bold t)))) + (comint-highlight-input ((t (:italic t :bold t)))) + (comint-highlight-prompt ((t (:foreground "#8ae234")))) + (isearch ((t (:background "#f57900" :foreground "#2e3436")))) + (isearch-lazy-highlight-face ((t (:foreground "#2e3436" :background "#e9b96e")))) + (show-paren-match-face ((t (:foreground "#2e3436" :background "#73d216")))) + (show-paren-mismatch-face ((t (:background "#ad7fa8" :foreground "#2e3436")))) + (minibuffer-prompt ((t (:foreground "#729fcf" :bold t)))) + (info-xref ((t (:foreground "#729fcf")))) + (info-xref-visited ((t (:foreground "#ad7fa8")))) + (diary-face ((t (:bold t :foreground "IndianRed")))) + (eshell-ls-clutter-face ((t (:bold t :foreground "DimGray")))) + (eshell-ls-executable-face ((t (:bold t :foreground "Coral")))) + (eshell-ls-missing-face ((t (:bold t :foreground "black")))) + (eshell-ls-special-face ((t (:bold t :foreground "Gold")))) + (eshell-ls-symlink-face ((t (:bold t :foreground "White")))) + (widget-button ((t (:bold t)))) + (widget-mouse-face ((t (:bold t :foreground "white" :background "brown4")))) + (widget-field ((t (:foreground "orange" :background "gray30")))) + (widget-single-line-field ((t (:foreground "orange" :background "gray30")))) + (custom-group-tag ((t (:bold t :foreground "#edd400" :height 1.3)))) + (custom-variable-tag ((t (:bold t :foreground "#edd400" :height 1.1)))) + (custom-face-tag ((t (:bold t :foreground "#edd400" :height 1.1)))) + (custom-state-face ((t (:foreground "#729fcf")))) + (custom-button ((t (:box (:line-width 1 :style released-button) :background "grey50" :foreground "black")))) + (custom-variable-button ((t (:inherit 'custom-button)))) + (custom-button-mouse ((t (:inherit 'custom-button :background "grey60")))) + (custom-button-unraised ((t (:background "grey50" :foreground "black")))) + (custom-button-mouse-unraised ((t (:inherit 'custom-button-unraised :background "grey60")))) + (custom-button-pressed ((t (:inherit 'custom-button :box (:style pressed-button))))) + (custom-button-mouse-pressed-unraised ((t (:inherit 'custom-button-unraised :background "grey60")))) + (custom-documentation ((t (:italic t)))) + (message-cited-text ((t (:foreground "#edd400")))) + (gnus-cite-face-1 ((t (:foreground "#ad7fa8")))) + (gnus-cite-face-2 ((t (:foreground "sienna4")))) + (gnus-cite-face-3 ((t (:foreground "khaki4")))) + (gnus-cite-face-4 ((t (:foreground "PaleTurquoise4")))) + (gnus-group-mail-1-empty-face ((t (:foreground "light cyan")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "light cyan")))) + (gnus-group-mail-2-empty-face ((t (:foreground "turquoise")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "turquoise")))) + (gnus-group-mail-3-empty-face ((t (:foreground "#729fcf")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "#edd400")))) + (gnus-group-mail-low-empty-face ((t (:foreground "dodger blue")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "dodger blue")))) + (gnus-group-news-1-empty-face ((t (:foreground "light cyan")))) + (gnus-group-news-1-face ((t (:bold t :foreground "light cyan")))) + (gnus-group-news-2-empty-face ((t (:foreground "turquoise")))) + (gnus-group-news-2-face ((t (:bold t :foreground "turquoise")))) + (gnus-group-news-3-empty-face ((t (:foreground "#729fcf")))) + (gnus-group-news-3-face ((t (:bold t :foreground "#edd400")))) + (gnus-group-news-low-empty-face ((t (:foreground "dodger blue")))) + (gnus-group-news-low-face ((t (:bold t :foreground "dodger blue")))) + (gnus-header-name-face ((t (:bold t :foreground "#729fcf")))) + (gnus-header-from ((t (:bold t :foreground "#edd400")))) + (gnus-header-subject ((t (:foreground "#edd400")))) + (gnus-header-content ((t (:italic t :foreground "#8ae234")))) + (gnus-header-newsgroups-face ((t (:italic t :bold t :foreground "LightSkyBlue3")))) + (gnus-signature-face ((t (:italic t :foreground "dark grey")))) + (gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "rotal blue")))) + (gnus-summary-high-read-face ((t (:bold t :foreground "lime green")))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "tomato")))) + (gnus-summary-high-unread-face ((t (:bold t :foreground "white")))) + (gnus-summary-low-ancient-face ((t (:italic t :foreground "lime green")))) + (gnus-summary-low-read-face ((t (:italic t :foreground "royal blue")))) + (gnus-summary-low-ticked-face ((t (:italic t :foreground "dark red")))) + (gnus-summary-low-unread-face ((t (:italic t :foreground "white")))) + (gnus-summary-normal-ancient-face ((t (:foreground "royal blue")))) + (gnus-summary-normal-read-face ((t (:foreground "lime green")))) + (gnus-summary-normal-ticked-face ((t (:foreground "indian red")))) + (gnus-summary-normal-unread-face ((t (:foreground "white")))) + (gnus-summary-selected ((t (:background "brown4" :foreground "white")))) + (message-header-name-face ((t (:foreground "tomato")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "LightSkyBlue3")))) + (message-header-other-face ((t (:foreground "LightSkyBlue3")))) + (message-header-xheader-face ((t (:foreground "DodgerBlue3")))) + (message-header-subject ((t (:foreground "white")))) + (message-header-to ((t (:foreground "white")))) + (message-header-cc ((t (:foreground "white")))) + (org-hide ((t (:foreground "#2e3436")))) + (org-level-1 ((t (:bold t :foreground "dodger blue" :height 1.5)))) + (org-level-2 ((t (:bold nil :foreground "#edd400" :height 1.2)))) + (org-level-3 ((t (:bold t :foreground "#6ac214" :height 1.0)))) + (org-level-4 ((t (:bold nil :foreground "tomato" :height 1.0)))) + (org-date ((t (:underline t :foreground "magenta3")))) + (org-footnote ((t (:underline t :foreground "magenta3")))) + (org-link ((t (:foreground "skyblue2" :background "#2e3436")))) + (org-special-keyword ((t (:foreground "brown")))) + (org-verbatim ((t (:foreground "#eeeeec" :underline t :slant italic)))) + (org-block ((t (:foreground "#bbbbbc")))) + (org-quote ((t (:inherit org-block :slant italic)))) + (org-verse ((t (:inherit org-block :slant italic)))) + (org-todo ((t (:bold t :foreground "Red")))) + (org-done ((t (:bold t :foreground "ForestGreen")))) + (org-agenda-structure ((t (:weight bold :foreground "tomato")))) + (org-agenda-date ((t (:foreground "#6ac214")))) + (org-agenda-date-weekend ((t (:weight normal :foreground "dodger blue")))) + (org-agenda-date-today ((t (:weight bold :foreground "#edd400")))) + (anything-header ((t (:bold t :background "grey15" :foreground "#edd400")))) + (ess-jb-comment-face ((t (:background "#2e3436" :foreground "firebrick" :slant italic)))) + (ess-jb-hide-face ((t (:background "#2e3436" :foreground "#243436")))) + (ess-jb-h1-face ((t (:height 1.6 :foreground "dodger blue" :slant normal)))) + (ess-jb-h2-face ((t (:height 1.4 :foreground "#6ac214" :slant normal)))) + (ess-jb-h3-face ((t (:height 1.2 :foreground "#edd400" :slant normal)))) + (ecb-default-highlight-face ((t (:background "#729fcf")))) + (ecb-tag-header-face ((t (:background "#f57900")))) + (magit-header ((t (:foreground "#edd400")))) + (magit-diff-add ((t (:foreground "#729fcf")))) + (magit-item-highlight ((t (:weight extra-bold :inverse-video t)))) +))) + +(provide 'color-theme-tangotango) diff --git a/emacs.d/textmate.el b/emacs.d/textmate.el index a08c36e..910a399 100644 --- a/emacs.d/textmate.el +++ b/emacs.d/textmate.el @@ -126,7 +126,7 @@ the project root.") (define-key map [(super \])] 'textmate-shift-right) (define-key map [(super \[)] 'textmate-shift-left) (define-key map [(super /)] 'comment-or-uncomment-region-or-line) - (define-key map [(super t)] 'textmate-goto-file) +;; (define-key map [(super t)] 'textmate-goto-file) (define-key map [(super shift l)] 'textmate-select-line) (define-key map [(super shift t)] 'textmate-goto-symbol)) (t ;; Any other version