pearofducks / ansible-vim

A vim plugin for syntax highlighting Ansible's common filetypes
MIT License
796 stars 98 forks source link

Use standard YAML key value pairs #40

Closed barlik closed 7 years ago

barlik commented 7 years ago

Hi, I like the standard syntax for defining Ansible modules. (using attr: value on a new line instead of using > on the first line and then attr=value on subsequent lines)

It's everywhere in Ansible documentation and is also preferred by Ansible team.

Maybe add an option to toggle this behaviour when generating the snippets?

pearofducks commented 7 years ago

Maybe add an option to toggle this behaviour when generating the snippets?

Have you added this option?

I'd say: 1) I'd prefer the original behavior to be the default 2) Would be great to have this option documented in the README

barlik commented 7 years ago

Have you added this option?

Not yet, but I'm happy to implement it. Probably next weekend as I'm quite busy right now.

barlik commented 7 years ago

Hi @pearofducks,

I've added some argument parsing for the 'dictionary style', output filename and keyword arguments sorting.

Please have a look.

The default script behaviour hasn't changed, all modifications are optional. Although, I would suggest to make the sorting enabled by default, but it's up to you.

pearofducks commented 7 years ago

Looks good, thanks for adding this!