How to change the file type of a single file?

Answered

Hi!

I created a model using New->File and named it blah.rb. Then I copied the class contents to it. But RubyMine still thinks it is a plain text file. How to change that? I was searching for this basic feature for more than 30 minutes now!

iGEL

5 comments

Hello Klaus,

Settings | File Types, remove the name of the file from the list of associations
for Plain Text file type.

I created a model using New->File and named it blah.rb. Then I copied

the class contents to it. But RubyMine still thinks it is a plain text
file. How to change that? I was searching for this basic feature for
more than 30 minutes now!


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Hi!

Thanks for the answer, now it works. Still I think it's hard to find that solution and I would not expect, that creating a file will change my (global) IDE settings.

Why don't you add a "Change file type" option to the files context menu?

iGEL

3

Any update on this? 

Why not just select the syntax for a single file? Like in Sublime. Sometimes I have files with extension (Linux script for example, with a shebang) and simply to set the correct syntax would be so much easier...

Since script like this don't need to have an extension). So a generic .cgi extension can almost be any language.

0

Hello Roger,

there seems to be a usability problem related, please take a look:

https://youtrack.jetbrains.com/issue/RUBY-18277

0

@olga, thanks that clears is up!

0

Please sign in to leave a comment.