开发者

Good code highlighting, syntax analysis and code assist editor on js.erb and css.erb files

I want to know if there is an api that supports nicely eRuby (erb) and JavaScript highlighting, sintax analysis and 开发者_如何学编程code assist.

I've already tried Eclipse with Aptana RadRails. Perhaps I'm configuring something wrong, but it guesses that I'm using html.erb on both css.erb and js.erb files. Tried in both windows and linux (Fedora 12).

I've tried too the Emacs with nXhtml, MuMaMo, js2 and Rinari modes. Again, it works fine for html.erb, but it detects the css.erb and js.erb as html.erb files. Maybe it's possible to configure it to accept that files and be compatible. Tried in both windows and linux (Fedora 12).

Also, doesn't matter the operative system, just getting the code analysis, assist and highlighting I'm happy with it.


Normally Emacs decide what major mode (multi major with nXhtml) to use from the file extension. It can however use the whole file name path or the contents too.

If you send a bug report for nXhtml we can try to work it out.


A simple solution is to use indirect buffers : On a buffer with multiple languages, do a C-x 4 c It shows the same buffer in another window. Each window can have its own major mode. You could have one window in ruby mode, one another with java-mode for your javascript, etc. Behind all those windows is one single buffer.

For syntax analysis, you should use flymake, but it requires you to configure it properly for eRuby.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜