How to change file type associations for one file

Answered

How come we can't do that? Seems to be a common feature in other text editors/IDEs, yet jetbrains has not implmented this feature.

My use case:

I am serving web pages using cgi scripts with a shebang to denote filetype rather than an extension.
Rubymine does not detect the file type from the shebang and sets the file type to text.

5 comments
Comment actions Permalink

Andrew,

I've checked this project in RubyMine 2018.3.1 EAP but all the 3 Ruby files in the bin folder with shebang are considered to be of Ruby file type. Probably you've encountered a similar problem mentioned here: https://youtrack.jetbrains.com/issue/RUBY-18277

1
Comment actions Permalink

What kind of files are not detected by shebang?

Regards, Oleg.

0
Comment actions Permalink

I was having an issue with Ruby files not detecting the shebang ("#!/usr/bin/env ruby"), however now I am trying to reproduce the issue and I cannot.

Thank you!

0
Comment actions Permalink

Experience the same issue at RubyMine 2018.3.1 EAP (build 183.4588.30) built on December 3, 2018 (macOS). Particularly in the https://github.com/mperham/sidekiq project, there are 3 ruby scripts with the appropriate shebang in `bin` directory. All of them are considered as "Text" type instead of "Ruby" one.

0
Comment actions Permalink

Thanks, I've got an idea. I removed `*.` registered pattern from File Types > Text and everything works as expected.

0

Please sign in to leave a comment.