Syntax highlighting doesn't change when you rename a file.

Dan Robinson 8 ár síðan updated by jan otte 8 ár síðan 4

When you rename a file in Sublime Text 2 to a new filename with a different extension, the syntax highlighting doesn't change to match the new extension.

The syntax changes on 'Save As' changes of extension on my ST2 (2220) and ST3 (3021) installations on OSX.

So I am not replicating your issue.

Can you give us a lot more details of:

- what your environment is

- what ST2 build you are running?

- the exact steps you take to produce the issue

    - what is the filename and extension?

    - how do you do the renaming?

    - what is the new filename and extension?

I am not saying there is not an issue here just that your report does not describe it in enough detail for it to be replicated and unless we can see it happening on our machine the support for a 'fix' is going to be limited.

I'm on Version 2.0.1, build 2217.

I have a file open. I'm right clicking on the file in the Folders dropdown on the left, renaming it from init.pp (for which there is no syntax highlighting) to init.rb. The syntax highlighting doesn't change until I close the file and reopen it, after which everything works perfectly.

I'm on Mac OS X, Version 10.8, if that matters. Could try to repro on a linux box, if it'd be helpful, but not for a few days.

Ah ha. I misunderstood what you meant by 'rename'.

I agree I can replicate this on ST2 and ST3 on OS X.

Not the biggest annoyance in the world but I agree that if the file extension was rechecked on a rename through the side bar that would be a nice addition to fit and polish.

Nice pickup!