Does anybody know a good text editor for Mac that supports syntax highlighting in CoffeeScript? Is it possible to do this in TextWrangler or BBEdit?
Cheers :)
On http://jashkenas.github.com/coffee-script/ there is a list of what is available.
For Emacs there is CoffeeScript Major Mode (Emacs for mac: http://aquamacs.org/)
For Vim there is Vim CoffeeScript (Vim for mac: http://code.google.com/p/macvim/)
For Textmate there is CoffeeScript TextMate Bundle (how noted by Trevor, this is maintained by CoffeeScript creator Jeremy Ashkenas. And how noted by Chocohound, it works on Sublime Text 2 too)
For Gedit there is gedit-coffeescript
For IntelliJ IDEA and RubyMine there is coffeescript-idea
I can find nothing for TextWrangler or BBEdit.
Edit:
The list moved to the wiki and now there is an attempt to make a BBEdit plugin too ;)
As mb21 said, you can find TextWrangler instructions here.
To highlight coffeescript in Eclipse:
Download
http://www.gstaff.org/colorEditor/cbg.editor_1.2.6.jar
Download https://raw.github.com/dhotson/coffeescript-jedit/master/coffeescript.xml
Open cbg.editor_1.2.6.jar with a zip editor.
Put coffeescript.xml into the cbg.editor_1.2.6.jar\modes directory
Edit cbg.editor_1.2.6.jar\modes\catalog (it's an XML file)
Add a line for Coffeescript:
<MODE NAME="coffee" FILE="coffeescript.xml"
FILE_NAME_GLOB="*.coffee" />
Save the .jar and put it into Eclipse's plugin directory. Restart Eclipse and .coffee files should now be highlighted.
WARNING: For some reason, this plugin's default colours are TERRIFYINGLY UNUSABLE. I recommend editing the colours to the attached first, before viewing any files. Honestly, just save yourself the heartache.
TextMate have good bundle:
TextMate bundle
RubyMine / IDEA have also good plugin (but this is IDE and is crossplatform):
Idea plugin
Espresso 2 has CoffeeScript.sugar
Aptana has it now in version 3.0.4, but due to a bug with control over tabs/spaces, you'll need to install the 3.0.5 beta.
This is the beta Eclipse update site: http://preview.appcelerator.com/aptana/studio3/plugin/update/beta/
I'm pretty happy with Aptana. In my opinion, the editors for css, scss, coffeescript, html, etc. are all better than the built-in eclipse editors for these languages.
Adobe Brackets has native CoffeeScript support and the 'Interactive Linter' extension (downloadable from within the app) will even lint it to some extent, tell you that your lines are too long and so on.
However, there is no comment/uncomment keyboard shortcut, which gets old fast and there are other bugs, as you'd expect with software in such hard-development.
Worth checking out, none-the-less.
Did you give Eclipse a try?
Here's a plist file for syntax highlighting, etc, for CoffeeScript in BBEdit:
https://gist.github.com/3219871
Related
I'm using the latest build of Sublime Text 3. When typing %i[foo bar] Sublime does not seem to recognize this and I don't get the proper highlighting.
Has anyone else experienced this? If so, is there a way I can fix this on my end or is this something that Sublime HQ would have to fix?
The %i[foo bar] # [:foo :bar] literal notation for a symbol array was only implemented in Ruby 2.0, while the Ruby language definition that ships with ST3 is mostly focused on 1.9 and earlier. I searched around a bit, but unfortunately I couldn't find any .tmLanguage files that are updated for 2.0, let alone include this literal notation, so I can't point you to a ready-made solution. But, I do have a few suggestions.
First, head over to the unofficial Sublime Text Issues tracker and post a bug report. We're not sure how much attention is paid to this list by the developer, but it at least broadens the issue's visibility and may prompt someone to post a fix. You can also reply to this thread on the Sublime Text forum and perhaps reference your issue.
The second option, if you have good regex-fu, is to hack the Ruby.tmLanguage file and add support yourself. I was going to post directions on how to do it, but then I tried it myself and it seemed to work, so feel free to use my work:
Go to Preferences -> Browse Packages to open up the Packages folder in your system's file explorer.
Create a folder called Ruby2.
Copy the contents of this gist into a new file, and save it in your Ruby2 directory as Ruby2.tmLanguage.
Restart Sublime, switch to your problematic code, and select View -> Syntax -> Ruby2. Both lines should now be highlighted the same way. Here's a before and after screenshot using the Neon Color Scheme:
I hope this helps. I'm not a Rubyist, so if I made any blatant errors please let me know.
From my (brief) research there definitely seems to be a need for an updated version of Ruby.tmLanguage for all the new features in 2.0, so hopefully any issues you post will prompt someone to start/publish a project. I've already done something similar for Python, but my Ruby skillz just aren't there for this project :)
Good luck!
What is the best IDE plugin for VIM?
I'm looking for a VIM plugin that
is easy to use and install
supports auto-completion
supports jumping to method/class definitions
does not change the files of my Rails project (I'm co-working in a software project where not everybody uses VIM)
should be compatible with the latest Rails versions
Rails.vim is the best for now
https://github.com/tpope/vim-rails
http://www.vim.org/scripts/script.php?script_id=1567
There's a few auto-completion-ish plug-ins around for vim, but probably the most straightforward one is just the built-in "keyword completion". It does not know any particular language, but if you use, eg, set complete=.,b,k, it will scan the current file (.), other loaded files (b), and any files set as dictionaries (use set dictionary=/some/file) for matches. Add that stuff to your .vimrc. To use completion, type a couple letters and hit ctrl-p in INSERT mode, you'll get a pop-up of cantidates. It's unobtrusive and easy to use. For more info on complete try :help E535.
WRT to class/method indexing, there's the taglist plugin:
http://vim-taglist.sourceforge.net/feature.html
Which will index a bunch of languages including ruby (nice if you are are working in js at the same time, etc). It will take about 30 seconds to figure out. Slightly more awkward to use in the pure ncurses version (ie, not gvim) if you can't use the mouse to switch windows.
Here is an info about how to use VIM as ror ide.
http://biodegradablegeek.com/2007/12/using-vim-as-a-complete-ruby-on-rails-ide/
Moreover following plugins can be useful.
NERDTree
FuzzyFinder
snipMate
One of Xcode's most powerful features is it's Intellisense completion, which brings up a list of potential candidates as you type the name of a Foundation/Cocoa/UIKit API. I am very interested in MacRuby, PyObjC, or the more recent RubyMotion, however without code completion these tools seem like more trouble than they're worth.
Is there any code completion feature (not necessarily Intellisense) for any of the three technologies above, for any text editor (but preferably for Vim or Xcode)? Bonus points for an IDE solution which allows for building and running the application in a single command (like Xcode's Run button).
It's my understanding that Xcode 4 dropped support for MacRuby/PyObjC, so Intellisense is no longer available. Should I install Xcode 3 alongside Xcode 4 for the code completion? How is everyone else doing it (surely you guys use some form of code completion -- I can't believe anyone can remember all the classes in Foundation/Cocoa/UIKit)?
RubyMotion comes with vi ctag support. Run rake ctags to create them.
FWIW, there is a Code completion package for Sublime Text 2, which can also be installed via the package manager of the Sublime text.
And it seems to work rather well for me.
Yes, you can give yourself Vim code completion by running $ rake ctags in the root directory of your RubyMotion app. To take that a step further, use a shell script to generate ctags automatically every time you create a new RubyMotion app. This article shows how to build such a script:
http://rayhightower.com/blog/2013/02/12/automatic-ctags-with-rubymotion-and-vim/
Is there any IDE with syntax highlight support for LESS?
Eclipse does not support .less fully (nested rules, single line comments, etc) but you can at least configure it so that it would open .less files and treat them as .css.
Preferences > General > Content Types:
find "CSS" entry and add .less extension.
Then, Preferences > General > Editors > File Assoc:
add .less extension and associate with CSS editor.
Better than nothing, especially if you're into Eclipse world ;)
JetBrains PHPStorm has built-in support for LESS :)
You could use Netbeans plugin for LESS.
In Netbeans 6.9:
tools-> Available Plugins-> LessCSS Module
Version: 1.0.6 Source: Plugin Portal
Plugin Description
This module is to allow for tighter integration of netbeans with LessCSS (using the LessPHP standard).
Sublime Text. It's good lightweight editor.
If you use Textmate there is a syntax highlighting bundle for LESS:
https://github.com/appden/less.tmbundle
Here is an Eclipse plugin for LESS : http://www.normalesup.org/~simonet/soft/ow/eclipse-less.fr.html
Syntax highlighting for LESS is included in the newest version of rails.vim.
You can use Komodo IDE or Edit for this purpose. It has an add-on named LESS
I just tried Crunch and I like it.It has syntax highlighting (but no intellisense) and can save as .css.
It requires Adobe AIR.
Does anyone know of an application (for mac) which will format a page of html code nicely?
ie Open the html file and indent all of the code/blocks, put character returns in and format it into sections so that it is readable rather than being just a big block of code. Then also give the ability to minimize/collapse sections of the code to make it more readable.
I've been trying Coda and Expresso - Expresso has the feature to minimize/collapse code but does not seem to be able to format code.
Please help?
TextMate is a really cool app. There are hundreds of bundles for all possible languages.
Try TACO HTML Edit
or
JEdit (Freeware)
Bye.
Try using tidy. I think it is included in OSX (at least the command is there on my system) so you won't need to install anything to use it.
I use BBEdit for this.
Textmate will do a nice job.
If you are a java or ruby programmer, Intellj or Rubymine does an excellent job of auto-formatting code(including HTML).