diff options
author | Christian Clason <c.clason@uni-graz.at> | 2022-01-28 18:44:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-28 18:44:03 +0100 |
commit | 65529dd7a13d5f5340c44c36c443bcd830522cef (patch) | |
tree | ef70ee0b3e6eb7d56e56b00d3e893bef804cd405 /runtime/autoload | |
parent | 6cb670cb2ce83a50177eaf37656c0b3c07c3ffde (diff) | |
parent | 5b9980f01eb021b0d84f540a6618f94ad2727153 (diff) | |
download | rneovim-65529dd7a13d5f5340c44c36c443bcd830522cef.tar.gz rneovim-65529dd7a13d5f5340c44c36c443bcd830522cef.tar.bz2 rneovim-65529dd7a13d5f5340c44c36c443bcd830522cef.zip |
Merge pull request #17223 from clason/vim-8.2.4238
vim-patch:8.2.4238: *.tf file could be fileytpe "tf" or "terraform"
Diffstat (limited to 'runtime/autoload')
-rw-r--r-- | runtime/autoload/dist/ft.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim index 69712046a5..86c71fa52d 100644 --- a/runtime/autoload/dist/ft.vim +++ b/runtime/autoload/dist/ft.vim @@ -862,6 +862,21 @@ func dist#ft#FTfoam() endwhile endfunc +" Determine if a *.tf file is TF mud client or terraform +func dist#ft#FTtf() + let numberOfLines = line('$') + for i in range(1, numberOfLines) + let currentLine = trim(getline(i)) + let firstCharacter = currentLine[0] + if firstCharacter !=? ";" && firstCharacter !=? "/" && firstCharacter !=? "" + setf terraform + return + endif + endfor + setf tf +endfunc + + " Restore 'cpoptions' let &cpo = s:cpo_save unlet s:cpo_save |