How can I change the file type association of an existing file in WebStorm?

后端 未结 10 1320
予麋鹿
予麋鹿 2020-12-23 00:28

I accidentally created a file with no extension and I chose the wrong file type association. Text Document I think. I renamed it to have the .js extension which is what I

10条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-23 01:02

    I have found in phpstorm that I can use the Refactor > Rename... function to associate a file of unspecified file type (e.g. a name with no extension) with a file type.

    For example if I have a bash script named do_the_things I can Refactor > Rename it to do_the_things.sh which causes it to pick up the bash highlighting, then when I Refactor > Rename it back to do_the_things it keeps the bash highlighting.

提交回复
热议问题