I use this for identifying *.cfn.json
and *.cfn.yml
files as JSON and YAML format cloudformation templates.
Their filetypes are set to cfn_json
and cfn_yaml
respectively. I can then have custom highlighting of key attributes
and/or custom snippets set up that are not polluting my editor when I am working with straight javascript/yaml intended
for other purposes. This in on mac os x after installing vim 7.3 along with vim-snipmate and vim-snippets plugins. Someone feel free to improve on this.
au BufRead,BufNewFile *.cfn.json set ft=cfn_json
au BufRead,BufNewFile *.cfn.yml set ft=cfn_yaml
au BufRead,BufNewFile *.cfn.yaml set ft=cfn_yaml