Open mtlynch opened 8 years ago
I would prefer not to favor one editor over another in the ansible files. Particularly when there are the other methods you noted. Specifying the formatting commands in vim or emacs or whatever may make sense, but requiring the modeline in the ansible files feels like the wrong choice.
(I am a vim user)
I would be ok with the modeline, especially if adding something comparable for another editor would ease the concern. But that puts us on a road of fighting exclusive speech with ever more inclusive speech.
Therefore, if we choose to prioritize an editor-agnostic stance (probably the right choice for re-usability), then my second favorite choice is to use the parent folder option because inheritance is nice. That said, I'm usually wrong about this kind of thing and defer to others who have stronger experiential opinions.
I don't know that we necessarily need to require a vim modeline, but I don't see any harm in having one there. For developers who don't use vim, then it's just a one line comment. More interesting than syntax highlighting for me is specifying the indent level and wrapping... or is that just 4 and 80, respectively, for every language we use?
For Vim users, having the following modeline near the top or bottom lets Vim know to treat the file as Ansible and use Ansible-specific Vim plugins:
Do we want to make this standard for all Ansible files? I believe Vim Ansible plugins have other ways of detecting file type such as:
.ansible