sustained / coffeescript-sublime-plugin Goto Github PK
View Code? Open in Web Editor NEWSyntax highlighting and checking, commands, shortcuts, snippets, compilation and more.
License: MIT License
Syntax highlighting and checking, commands, shortcuts, snippets, compilation and more.
License: MIT License
Would be nice if there was a way to make project code available to scripts ran via run_script.
Using the "alt" key on the Mac keyboard interferes with the usage of "alt" (with and without "shift") to produce other characters. This is especially difficult because the keymap is not restricted to coding in CoffeeScript, but also seems to be active in other modes.
In general, the only way to avoid this problem is to avoid "alt" as a modifier unless accompanied by "ctrl" or "super", as almost all keys produce some special character when modified by "alt".
I'm not sure whats going on. Everytime I try to compile a snippet or coffeescript file I see the error below (shows up in the console).
Only change I made is I started using NVM to manage my node versions. Any help?
Traceback (most recent call last):
File "./sublime_plugin.py", line 362, in run_
File "./CoffeeScript.py", line 105, in run
File "./CoffeeScript.py", line 32, in brew
File "./CoffeeScript.py", line 22, in run
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 623, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1141, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I'm using this command to compile and output CoffeeScript in JS:
{ "keys": ["super+b"], "command": "compile_and_display", "args": {"opt": "-p"}}
If there is any cyrillic characters, it gives me blank output. Selective compiling without including cyrillic characters works just fine.
Fortunately, compile to .js file works sharp.
An expampe of cyrillic + western characters mixed code for testing:
http.createServer(app).listen(app.get('port'), -> console.log "Сайт доступен по адресу: http://localhost:#{app.get 'port'}")
I just removed this package, and now I'm getting the following warning when I start Sublime:
Error loading syntax file "Packages/CoffeeScript/CoffeeScript.tmLanguage": Error parsing plist xml: Failed to open file In file "Packages/CoffeeScript/CoffeeScript.tmLanguage"
I think the clone URL in the README is for the read/write access. I got a "Public key denied" error when I used it. Replacing it with the HTTP URL worked.
That must will be useful for everyone.
File watching suport (coffee --watch).
On Debian Testing+Sid, when I try, for example, check the syntax (Alt+Shift+S), or invoke any other action of this plugin, an error occurs (showed in the new tab or status bar):
/usr/bin/env: node: No such file or directory
This happens with the default settings.
When I correct binDir
value to /usr/bin
, it just silently fails.
Accidentally discovered that the variable PATH (in terminal) contains /usr/bin
and /usr/local/bin
, so I tried to set binDir
value to /usr/local/bin:/usr/bin
… and it worked!
Further investigation revealed that this happens because node
is in /usr/bin
, but coffee
in /usr/local/bin
.
Also tried on Ubuntu 12.04 and there is the same situation.
So I thought it's would be nice if plugin use /usr/local/bin:/usr/bin
as a default value for binDir
.
PS. I'm sorry for my google-translated English. :)
I'm not sure if this is a Sublime 2217 issue or if it's this package. But it doesn't work in 2217. Is anyone else having this problem?
Good morning,
I just downloaded Sublime Text and pasted the contents of this script's installation commands into the `Cmd+`` window. Nothing happened though. If I try to close that window, it offers to save the file. How do I make it run? That step is not included in the readme.
Thanks!
Hi!
First of all-- this is not a feature that should be added to this project. I'm just hoping for some input from you guys.
.tmLanguage
structure back to a .JSON-tmLanguage
? None of the tutorials I've found deal with straight xml.How would I do that? Is this even possible? Can language packages reference other packages? I'll be making my own branch of this project, but I'm curious for all your input.
Sorry for the noob questions! I'll close this issue in 48 hours.
In the old Tomorrow theme there was a .terminal file for OS X's built in Terminal.app. Is there a way to use any of the included files in Terminal.app?
Hey Joe.
I switched over to Sublime a few months back, and have been greatly enjoying your CoffeeScript bundle -- fun stuff.
Over the last few days, I've been hacking on it a bit in an effort to get it to recognize the newly-merged "literate" CoffeeScript style. I was wondering if you'd like me to start maintaining the plugin officially, and publishing updates alongside the Textmate bundle ... or if you'd prefer me to send you a pull request here.
Whatever works best.
I search for coffescript but I get several results, none of them pointing to this repo Xavura/CoffeeScript-Sublime-Plugin.
Hi, I've got a problem with syntax check, syntax highlighting is Okay. When I try to syntax-check with Alt-shift-s, here is the Sublime Console output :
Traceback (most recent call last):
File "/opt/sublime_text_3/sublime_plugin.py", line 549, in run_
return self.run(edit)
File "CoffeeScript in /home/slash4/.config/sublime-text-3/Installed >Packages/CoffeeScript.sublime-package", line 105, in run
File "CoffeeScript in /home/slash4/.config/sublime-text-3/Installed >Packages/CoffeeScript.sublime-package", line 32, in brew
File "CoffeeScript in /home/slash4/.config/sublime-text-3/Installed >Packages/CoffeeScript.sublime-package", line 22, in run
File "X/subprocess.py", line 818, in init
File "X/subprocess.py", line 1344, in _execute_child
File "X/subprocess.py", line 1344, in
File "X/os.py", line 800, in fsencode
TypeError: expect bytes or str, not NoneType
Thanks for this wonderfull plugin :)
As of 0.5.3 - single or double quotes break when not spaced from equal
// syntax highlights normal
sampleVar = "/url/path"
// syntax highlights break. Code from here on out highlights as if a quote is missing
sampleVar="/url/path"
Valid CoffeeScript won't compile using the 'Display JavaScript' command if there are Japanese or other non-ASCII characters in the file. Instead an error is logged and blank window appears.
This code compiles and displays fine:
foo = "It works with ASCII text."
But, if you add some non-ASCII to the mix, like this, it doesn't work anymore:
foo = "It works with ASCII text."
bar = "日本語だったらダメだ。"
The error printed to console is:
Traceback (most recent call last):
File "./sublime_plugin.py", line 356, in run_
File "./CoffeeScript.py", line 88, in run
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 58: ordinal not in range(128)
The version I am using is the current one from Package Control: v2012.07.19.12.47.26; xavura.github.com/CofffeeScript-Sublime-Plugin
On a Mac with French keyboard the Alt+Shift+L
combination is used to insert the pipe character |
.
It'd be nice if this plugin could use a different shortcut for the compile and display command.
Thanks.
Sorry, I'm new to Sublime and plugins.
If I super+shift+p, Coffee: Compile File
literally nothing happens. Or at least nothing is indicated to me. I'm running sublime version 2.0.1 build 2217
In one of my files I get the following error on command console when I try alt+shift+d
:
Traceback (most recent call last):
File "./sublime_plugin.py", line 356, in run_
File "./CoffeeScript.py", line 96, in run
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 20497: ordinal not in range(128)
The Code is :
It compiles fine with alt+shift+c
and the output is:
What could be the problem here? Python is just a couple of hissSses for me :(
Recently, when I use Ctrl-R to list functions in c code, It shows some mess.
After I uninstalled CoffeeScript plugin, It shows good.
Could you check this issue?
I try it in both Windows and Linux(Ubuntu)
CoffeeScript 1.5 introduced literate CoffeeScript. I was wondering if there's any plan of implementing it. So far it works well without any change, except for the use of '
inside a block of text, which screws up the formatting of everything below because the highlighter interpreted it as the start of a string.
I would like to have source map support (http://coffeescript.org/#changelog > 1.6.1) on compile
Inside console, suggested command line for installation is currently throwing the following:
>>> import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'
File "<string>", line 1
import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'
^
SyntaxError: invalid syntax
I don't know how to fix it, can anyone help?
I get this error when trying to Build. I'm not sure if building is equivalent to compiling for this plug-in. Does anyone have any suggestions?
/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:111
throw new Error("Cakefile not found in " + (process.cwd()));
^
Error: Cakefile not found in /Users/robgordon/Music/Max/skewDrum
at cakefileDirectory (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:111:11)
at cakefileDirectory (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:109:14)
at cakefileDirectory (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:109:14)
at cakefileDirectory (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:109:14)
at cakefileDirectory (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:109:14)
at cakefileDirectory (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:109:14)
at Object.exports.run (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:51:19)
at Object.<anonymous> (/usr/local/lib/node_modules/coffee-script/bin/cake:7:38)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.runMain (module.js:492:10)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
[Finished in 0.2s with exit code 1]
I cannot get any of the commands for this plugin to work. Any time I try to do something like check syntax (Alt+Shift+S) nothing happens and I get this line in the status bar:
"Syntax env: node: No such file or directory"
I'm on OS X 10.8.1
I assumed this was a path problem, but the Sublime path and my system path match:
import os
os.environ["PATH"]
'/usr/local/mysql/bin:/usr/local/share/npm/bin:/Users/greg/.rvm/gems/ruby-1.9.3-p194/bin:/Users/greg/.rvm/gems/ruby-1.9.3-p194@global/bin:/Users/greg/.rvm/rubies/ruby-1.9.3-p194/bin:/Users/greg/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/greg/.rvm/bin:$HOME/bin'
In the command line:
which node
/usr/local/bin/node
So 'node' should be on the path.
I had a similar problem with not being able to find 'coffee', but I was able to resolve that after finding 'binDir' in 'CoffeeScript.sublime-settings'. It defaults to '/usr/local/bin' while the directory 'coffee' is in is '/usr/local/share/npm/bin'.
I installed 'coffee' the recommended way:
npm install -g coffee-script
And I installed 'node' with:
brew install node
Hi..I'm not sure if it is possible inside sublime or if it's implemented yet...but is possible compile only a region or selection of code?..in emacs is possible but I'm newbie with sublime and I'm not sure how do it...
Does this plugin support sublime text 3? Please clarify in the readme.
Is @Xavura maintining this anymore?
Create a package for Sublime Package Control (see: http://git.io/aCVcfg).
I could just be doing something incorrectly but when I run the Coffee: Compile File command through the Command Palette I get a different result than if I run it through command line.
EXAMPLE: Command Line 'coffee -c example.coffee'
(function() {
var cube, square;
square = function(x) {
return x * x;
};
cube = function(x) {
return square(x) * x;
};
}).call(this);
EXAMPLE: Command Palette > Coffee Compile File
var cube, square;
square = function(x) {
return x \* x;
};
cube = function(x) {
return square(x) \* x;
};
When parentheses are used in the expression for the value of a default argument of a function, it breaks highlighting for its function's argument list. It's easier to understand with an example:
func = (arg1, arg2 = 'item(s)') ->
Here's how it looks:
Here are some similar examples of how it should look:
Here are some other examples of it being broken:
Hi there
Thks for the package its really cool
Just one little problem I don't get string interpolation highlight
I have no idea if this because of my color scheme config or is it something that can be fixed in the plugin ?
CoffeeScript.py#run()
overwrites the PATH
environment variable. I can specify binDir
in my ST2 settings, but if I've already got my environment set correctly, this overwrites it. Note that if I don't specify binDir
that the PATH
is set to /usr/local/bin
.
Attempts to build any Coffeescript file using the Sublime Text build system results in the following error:
/usr/local/lib/node_modules/coffee-script/lib/cake.js:38
throw new Error("Cakefile not found in " + (process.cwd()));
^
Error: Cakefile not found in <my_directory>/<my_coffeescript_file>
at /usr/local/lib/node_modules/coffee-script/lib/cake.js:38:15
at path.js:292:19
[Finished in 0.4s with exit code 1]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.