Вопрос

I'm generating some JavaScript dynamically in Ruby. Is there a way to get RubyMine to recognize that this code is JavaScript for syntax highlighting, among other things? Funny that as I type this, I notice that Stack Overflow seems to get it.

  def script
    <<-EOS
      var blah = function() {
        alert('hello');
      }
    EOS
  end
Это было полезно?

Решение

You can replace EOS with JS or JAVASCRIPT and it should be picked up if you have JavaScript plugin enabled

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top