diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-09-06 20:51:38 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-09-06 20:51:38 +0200 |
commit | cd2fded0e0abb6b31fceaca128699eca0f300c63 (patch) | |
tree | e796660cd3f9e056566b72e3a104f56f11b51504 /autoload/polyglot.vim | |
parent | 255345bf9525c94479a7ff9b787d2f9848cb7a18 (diff) | |
download | vim-polyglot-cd2fded0e0abb6b31fceaca128699eca0f300c63.tar.gz vim-polyglot-cd2fded0e0abb6b31fceaca128699eca0f300c63.zip |
Add support for Visual Basic and Basic
Diffstat (limited to 'autoload/polyglot.vim')
-rw-r--r-- | autoload/polyglot.vim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/autoload/polyglot.vim b/autoload/polyglot.vim index eca7e304..ffb3c43f 100644 --- a/autoload/polyglot.vim +++ b/autoload/polyglot.vim @@ -256,6 +256,16 @@ func! polyglot#DetectLidrFiletype() setf lidris2 | return endfunc +func! polyglot#DetectBasFiletype() + for lnum in range(1, min([line("$"), 5])) + let line = getline(lnum) + if line =~? 'VB_Name\|Begin VB\.\(Form\|MDIForm\|UserControl\)' + setf vb | return + endif + endfor + setf basic | return +endfunc + " Restore 'cpoptions' let &cpo = s:cpo_save unlet s:cpo_save |