Sublime Forum

Sublime Text 4 - defaults to YAML when saving Ansible Playbook

#1

Hello all,

I run Sublime Text 4169 on Fedora 40. I am a new user of Sublime Text - after hearing good news - I bought a license.

I work with a lot of Ansible Playbooks - when I load my playbooks and select type as Ansible - after modding them when I save - it goes back to YAML file type?

Is there a way for it to remain type Ansible?

I have installed Ansible Package and ApplySyntax . I even enable Open all with current extension as Ansible.

Thank you.

0 Likes

#2

Generally speaking, you don’t need ApplySyntax for that; you would just open a playbook file and then tell Sublime to open all files with that extension as the syntax you want.

Since you’ve done that and it’s not working, my guess would be that a plugin (e.g. ApplySyntax is overriding that behaviour and forcing the syntax to be something else, or such).

0 Likes

#3

Hello OdatNurd,

Thank you replying.

When I opee the properties of ApplySyntax - I see this:

{
“syntax”: “YAML/YAML”,
“extensions”: [".gemrc", “yml”, “yml.dist”, “YAML-tmLanguage”]
},

Should I change something there?

Thank you.

0 Likes

#4

Thank you - I removed ApplySyntax and it worked.

Sorry for the delay. I was quite sick for a few days.

1 Like

#5

You can try AutoSetSyntax or report to ApplySyntax if you still want it.

0 Likes