moved CoffeeScript.tmbundle to extras and rewrote the installation instructions in plain text
This commit is contained in:
parent
a732e578ea
commit
8efcaf6eec
2
Rakefile
2
Rakefile
|
@ -25,7 +25,7 @@ namespace :build do
|
||||||
|
|
||||||
desc "Compile and install the Ultraviolet syntax highlighter"
|
desc "Compile and install the Ultraviolet syntax highlighter"
|
||||||
task :ultraviolet do
|
task :ultraviolet do
|
||||||
sh "plist2syntax lib/coffee_script/CoffeeScript.tmbundle/Syntaxes/CoffeeScript.tmLanguage"
|
sh "plist2syntax extras/CoffeeScript.tmbundle/Syntaxes/CoffeeScript.tmLanguage"
|
||||||
sh "sudo mv coffeescript.yaml /usr/local/lib/ruby/gems/1.8/gems/ultraviolet-0.10.2/syntax/coffeescript.syntax"
|
sh "sudo mv coffeescript.yaml /usr/local/lib/ruby/gems/1.8/gems/ultraviolet-0.10.2/syntax/coffeescript.syntax"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -22,5 +22,6 @@ Gem::Specification.new do |s|
|
||||||
s.require_paths = ['lib']
|
s.require_paths = ['lib']
|
||||||
s.executables = ['coffee']
|
s.executables = ['coffee']
|
||||||
|
|
||||||
s.files = Dir['bin/*', 'examples/*', 'lib/**/*', 'coffee-script.gemspec', 'LICENSE', 'README', 'package.json']
|
s.files = Dir['bin/*', 'examples/*', 'extras/**/*', 'lib/**/*',
|
||||||
|
'coffee-script.gemspec', 'LICENSE', 'README', 'package.json']
|
||||||
end
|
end
|
|
@ -0,0 +1,20 @@
|
||||||
|
This folder includes rough cuts of CoffeeScript syntax highlighters for
|
||||||
|
TextMate and Vim. Improvements to their lexing ability are always welcome.
|
||||||
|
|
||||||
|
To install the TextMate bundle, run `bin/coffee --install-bundle`, or drop it
|
||||||
|
into "~/Library/Application Support/TextMate/Bundles".
|
||||||
|
|
||||||
|
To install the Vim highlighter, copy "coffee.vim" into the "syntax" directory of
|
||||||
|
your vim72, and enable it in either of the following two ways:
|
||||||
|
|
||||||
|
* Manually, by running `:set syntax=coffee`
|
||||||
|
|
||||||
|
* Or automatically, by creating a "filetype.vim" file within "~/.vim", which
|
||||||
|
contains something along these lines:
|
||||||
|
|
||||||
|
if exists("did_load_filetypes")
|
||||||
|
finish
|
||||||
|
end
|
||||||
|
augroup filetypedetect
|
||||||
|
au! BufRead,BufNewFile *.coffee setfiletype coffee
|
||||||
|
augroup END
|
|
@ -1,21 +0,0 @@
|
||||||
##Syntax Highlighting For .coffee Files in vim72
|
|
||||||
|
|
||||||
After copying the coffee.vim file into the `syntax` directory for your vim72 install, you have two options for enabling syntax highlighting of .coffee files
|
|
||||||
|
|
||||||
### Manually
|
|
||||||
|
|
||||||
In the vim console, do:
|
|
||||||
|
|
||||||
:set syntax=coffee
|
|
||||||
|
|
||||||
### Automagically
|
|
||||||
The "least intrusive" way to add syntax highlighting for `.coffee` files in vim72 is to create a file (named, say, `filetype.vim`) in your `~/.vim` (or platform appropriate) folder. In it, you would put someting like:
|
|
||||||
|
|
||||||
if exists("did_load_filetypes")
|
|
||||||
finish
|
|
||||||
end
|
|
||||||
augroup filetypedetect
|
|
||||||
au! BufRead,BufNewFile *.coffee setfiletype coffee
|
|
||||||
augroup END
|
|
||||||
|
|
||||||
And the next time you open a `.coffee` file, voila!
|
|
|
@ -25,9 +25,11 @@ Usage:
|
||||||
# Seconds to pause between checks for changed source files.
|
# Seconds to pause between checks for changed source files.
|
||||||
WATCH_INTERVAL = 0.5
|
WATCH_INTERVAL = 0.5
|
||||||
|
|
||||||
|
# Path to the root of the CoffeeScript install.
|
||||||
|
ROOT = File.expand_path(File.dirname(__FILE__) + '/../..')
|
||||||
|
|
||||||
# Command to execute in Narwhal
|
# Command to execute in Narwhal
|
||||||
PACKAGE = File.expand_path(File.dirname(__FILE__) + '/../..')
|
LAUNCHER = "narwhal -p #{ROOT} -e 'require(\"coffee-script\").run(system.args);'"
|
||||||
LAUNCHER = "narwhal -p #{PACKAGE} -e 'require(\"coffee-script\").run(system.args);'"
|
|
||||||
|
|
||||||
# Run the CommandLine off the contents of ARGV.
|
# Run the CommandLine off the contents of ARGV.
|
||||||
def initialize
|
def initialize
|
||||||
|
@ -159,7 +161,7 @@ Usage:
|
||||||
# Install the CoffeeScript TextMate bundle to ~/Library.
|
# Install the CoffeeScript TextMate bundle to ~/Library.
|
||||||
def install_bundle
|
def install_bundle
|
||||||
bundle_dir = File.expand_path('~/Library/Application Support/TextMate/Bundles/')
|
bundle_dir = File.expand_path('~/Library/Application Support/TextMate/Bundles/')
|
||||||
FileUtils.cp_r(File.dirname(__FILE__) + '/CoffeeScript.tmbundle', bundle_dir)
|
FileUtils.cp_r("#{ROOT}/extras/CoffeeScript.tmbundle", bundle_dir)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Use OptionParser for all the options.
|
# Use OptionParser for all the options.
|
||||||
|
|
Loading…
Reference in New Issue