Created
December 22, 2016 09:00
-
-
Save mmriis/5930d2d6766deb40c3019ce9336efdce to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
au BufNewFile,BufRead *.yml,*.yaml call s:DetectAnsibleVault() | |
fun! s:DetectAnsibleVault() | |
let n=1 | |
while n<10 && n < line("$") | |
if getline(n) =~ 'ANSIBLE_VAULT' | |
set filetype=ansible-vault | |
endif | |
let n = n + 1 | |
endwhile | |
endfun |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment