From 2fc6065b2fcd417ef93387d37f093d006b3c6782 Mon Sep 17 00:00:00 2001 From: Mary Rose Cook Date: Wed, 15 Feb 2012 17:57:23 +0000 Subject: [PATCH] Set terminal prompt colour to suit theme. --- init.el | 61 +- js2.el | 11927 ----------------------------- js2.elc | Bin 1577206 -> 0 bytes themes/color-theme-blackboard.el | 4 + vendor/README.markdown | 65 - 5 files changed, 43 insertions(+), 12014 deletions(-) delete mode 100644 js2.el delete mode 100644 js2.elc delete mode 100644 vendor/README.markdown diff --git a/init.el b/init.el index ba53b13..d3dc370 100644 --- a/init.el +++ b/init.el @@ -2,6 +2,7 @@ (add-to-list 'load-path "~/.emacs.d/") (add-to-list 'auto-mode-alist '("\\.rb\\'" . ruby-mode)) +(add-to-list 'load-path "~/.emacs.d/vendor/ruby-mode") (autoload 'ruby-mode "ruby-mode" "Major mode for editing Ruby code" t) (add-hook 'ruby-mode-hook (lambda () (local-set-key "\r" 'newline-and-indent))) @@ -14,6 +15,10 @@ (add-to-list 'load-path "~/.emacs.d/vendor/coffee-mode") (require 'coffee-mode) +;; clojure mode +(add-to-list 'load-path "~/.emacs.d/vendor/coffee-mode") +(require 'clojure-mode) + ;; vc-diff colours (require 'diff-mode-) @@ -29,9 +34,21 @@ (setq backup-inhibited t) (setq auto-save-default nil) -;; auto-revert all buffers that were changed in the backgroun +;; set all buffers to auto-revert when they were changed in the background (global-auto-revert-mode t) +;; smooth scrolling +(require 'smooth-scroll) +(smooth-scroll-mode t) + +;; multi web mode +(require 'multi-web-mode) +(setq mweb-default-major-mode 'html-mode) +(setq mweb-tags '((js-mode "") + (css-mode ""))) +(setq mweb-filename-extensions '("htm" "html" "erb")) +(multi-web-global-mode 1) + ;; Standard Emacs functionality (setq-default comint-prompt-read-only t) (setq-default indent-tabs-mode nil) @@ -44,7 +61,6 @@ (tool-bar-mode 0) (scroll-bar-mode nil) (column-number-mode) -(show-paren-mode) (add-hook 'before-save-hook 'delete-trailing-whitespace) ;; Put backup files (ie foo~) in one place too. (The backup-directory-alist @@ -54,9 +70,6 @@ (setq backup-directory-alist (list (cons "." backup-dir))) (require 'color-theme) -(color-theme-initialize) -(color-theme-blackboard) -(set-face-background 'fringe "#0C1021") (require 'haml-mode) @@ -105,8 +118,9 @@ ;; narrower window, better line wrapping for prose (defun write-words () (interactive) - (set-frame-width nil 70) - (set-frame-height nil 45) + (color-theme-emacs-21) + (setq-default line-spacing 2) + (set-frame-width nil 90) (visual-line-mode t) (setq mode-line-format nil) (show-paren-mode nil)) @@ -114,7 +128,11 @@ ;; widescreen, no line-wrap (defun write-code () (interactive) + (color-theme-initialize) + (color-theme-blackboard) + (set-face-background 'fringe "#0C1021") (global-visual-line-mode 0) + (setq-default line-spacing 0) (show-paren-mode 1) (setq mode-line-format (list "-" @@ -163,6 +181,7 @@ ;; Don't auto-truncate lines in shell mode (add-hook 'shell-mode-hook '(lambda () (toggle-truncate-lines 1))) +;; no more accidental minimising (global-unset-key "\C-z") ;; Key bindings @@ -189,7 +208,7 @@ ;; remap dynamic expansion to escape (global-set-key (kbd "") 'dabbrev-expand) -;; go full screen (os x and fullscreen brew install of emacs 23 only) +;; bind key to go full screen (os x and fullscreen brew install of emacs 23 only) (global-set-key (read-kbd-macro "C-x t") 'ns-toggle-fullscreen) ;; set indent levels @@ -220,19 +239,20 @@ ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(default ((t (:height 125 :family "Inconsolata")))) - '(diff-added ((((background dark)) (:background "#113311")))) - '(diff-changed ((((background dark)) (:foreground "Yellow")) (t (:foreground "MediumBlue")))) - '(diff-context ((((background dark)) (:foreground "White")) (t (:foreground "Black")))) - '(diff-file-header ((((background dark)) (:background "#000088")))) + '(diff-added ((((background dark)) (:foreground "#FFFF9B9BFFFF")) (t (:foreground "DarkGreen"))) t) + '(diff-changed ((((background dark)) (:foreground "Yellow")) (t (:foreground "MediumBlue"))) t) + '(diff-context ((((background dark)) (:foreground "White")) (t (:foreground "Black"))) t) + '(diff-file-header ((((background dark)) (:foreground "Cyan" :background "Black")) (t (:foreground "Red" :background "White"))) t) '(diff-file2-hunk-header ((((background dark)) (:background "#000088")))) '(diff-function ((t nil))) - '(diff-header ((((background dark)) (:background "#000088")))) - '(diff-hunk-header ((((background dark)) (:background "#000088")))) - '(diff-index ((((background dark)) (:foreground "#00ff00")))) + '(diff-header ((((background dark)) (:foreground "Cyan")) (t (:foreground "Red"))) t) + '(diff-hunk-header ((((background dark)) (:foreground "Black" :background "#05057F7F8D8D")) (t (:foreground "White" :background "Salmon"))) t) + '(diff-index ((((background dark)) (:foreground "Magenta")) (t (:foreground "Green"))) t) '(diff-indicator-added ((((background dark)) (:background "#003300" :foreground "#fff")))) '(diff-indicator-removed ((((background dark)) (:background "#550000" :foreground "#FFFFFF")))) - '(diff-nonexistent ((((background dark)) (:foreground "#FFFFFFFF7474")) (t (:foreground "DarkBlue")))) - '(diff-removed ((((background dark)) (:background "#550000"))))) + '(diff-nonexistent ((((background dark)) (:foreground "#FFFFFFFF7474")) (t (:foreground "DarkBlue"))) t) + '(diff-removed ((((background dark)) (:foreground "#7474FFFF7474")) (t (:foreground "DarkMagenta"))) t) + '(js2-external-variable-face ((t (:foreground "white"))))) ;; add bash completion (autoload 'bash-completion-dynamic-complete @@ -255,10 +275,7 @@ (setq-default cursor-type '(bar . 1)) (set-cursor-color '"#FFFFFF") -;;(set-frame-width nil 320) - -;; maximise window vertically -(set-frame-height nil 95) +(set-frame-height nil 53) ;; start with the shell open -(shell) \ No newline at end of file +(shell) diff --git a/js2.el b/js2.el deleted file mode 100644 index 2f5d76a..0000000 --- a/js2.el +++ /dev/null @@ -1,11927 +0,0 @@ -;;; js2.el -- an improved JavaScript editing mode -;;; -;;; This file was auto-generated on Thu Jul 23 16:21:42 2009 from files: -;;; js2-externs.el -;;; js2-vars.el -;;; js2-util.el -;;; js2-scan.el -;;; js2-messages.el -;;; js2-ast.el -;;; js2-highlight.el -;;; js2-browse.el -;;; js2-parse.el -;;; js2-indent.el -;;; js2-mode.el - -;;; js2-mode.el --- an improved JavaScript editing mode - -;; Author: Steve Yegge (steve.yegge@gmail.com) -;; Version: 20090723 -;; Keywords: javascript languages - -;; 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 of -;; the License, 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., 59 Temple Place, Suite 330, Boston, -;; MA 02111-1307 USA - -;;; Commentary: - -;; This JavaScript editing mode supports: -;; -;; - the full JavaScript language through version 1.8 -;; - support for most Rhino and SpiderMonkey extensions from 1.5 to 1.8 -;; - accurate syntax highlighting using a recursive-descent parser -;; - syntax-error and strict-mode warning reporting -;; - "bouncing" line indentation to choose among alternate indentation points -;; - smart line-wrapping within comments (Emacs 22+) and strings -;; - code folding: -;; - show some or all function bodies as {...} -;; - show some or all block comments as /*...*/ -;; - context-sensitive menu bar and popup menus -;; - code browsing using the `imenu' package -;; - typing helpers (e.g. inserting matching braces/parens) -;; - many customization options -;; -;; It is only compatible with GNU Emacs versions 21 and higher (not XEmacs). -;; -;; Installation: -;; -;; - put `js2.el' somewhere in your emacs load path -;; - M-x byte-compile-file RET RET -;; Note: it will refuse to run unless byte-compiled -;; - add these lines to your .emacs file: -;; (autoload 'js2-mode "js2" nil t) -;; (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode)) -;; -;; To customize how it works: -;; M-x customize-group RET js2-mode RET -;; -;; The variable `js2-mode-version' is a date stamp. When you upgrade -;; to a newer version, you must byte-compile the file again. -;; -;; Notes: -;; -;; This mode is different in many ways from standard Emacs language editing -;; modes, inasmuch as it attempts to be more like an IDE. If this drives -;; you crazy, it IS possible to customize it to be more like other Emacs -;; editing modes. Please customize the group `js2-mode' to see all of the -;; configuration options. -;; -;; Some of the functionality does not work in Emacs 21 -- upgrading to -;; Emacs 22 or higher will get you better results. If you byte-compiled -;; js2.el with Emacs 21, you should re-compile it for Emacs 22. -;; -;; Unlike cc-engine based language modes, js2-mode's line-indentation is not -;; customizable. It is a surprising amount of work to support customizable -;; indentation. The current compromise is that the tab key lets you cycle among -;; various likely indentation points, similar to the behavior of python-mode. -;; -;; This mode does not yet work with "multi-mode" modes such as mmm-mode -;; and mumamo, although it could possibly be made to do so with some effort. -;; This means that js2-mode is currently only useful for editing JavaScript -;; files, and not for editing JavaScript within