From cd2fded0e0abb6b31fceaca128699eca0f300c63 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Sun, 6 Sep 2020 20:51:38 +0200 Subject: Add support for Visual Basic and Basic --- autoload/polyglot.vim | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'autoload/polyglot.vim') 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 -- cgit v1.2.3