Permalink
Browse files

Documentation: suggest using modelines.

After PR #19, ansible is a filetype, so it can be set from a modeline.
1 parent da25019 commit b1a3f5710c84cae3df5c2108f6f4e514d5ee1964 Benji Fisher committed Dec 19, 2014
Showing with 10 additions and 1 deletion.
  1. +6 −1 README.md
  2. +4 −0 doc/ansible.txt
View
@@ -2,7 +2,7 @@
Adds additional syntax highlighting and fixes indentation for Ansible's dialect of YAML.
-Ansible YAML files are detected based on the presence of a
+Ansible YAML files are detected based on the presence of a modeline or a
[structure following Ansible's Playbook Best Practices](http://www.ansibleworks.com/docs/playbooks_best_practices.html#directory-layout).
For details, see the Detection section below.
@@ -45,6 +45,11 @@ For details, see the Detection section below.
## Detection
+You can tell vim to recognize a file as Ansible by adding a modeline near the top or bottom of the file:
+```
+# vim:ft=ansible:
+```
+
A file is recognized as an Ansible YAML file, and its filetype is set to `ansible`, if
1. The extensions is `.yml`
View
@@ -56,6 +56,10 @@ This plugin is only available if 'compatible' is not set.
2. Detection *ansible-detection*
+You can tell vim to recognize a file as Ansible by adding a |modeline| near
+the top or bottom of the file: >
+ # vim:ft=ansible:
+
A file is recognized as an Ansible YAML file, and its filetype is set to
`ansible`, if

0 comments on commit b1a3f57

Please sign in to comment.