summaryrefslogtreecommitdiffstats
path: root/autoload/polyglot.vim
diff options
context:
space:
mode:
Diffstat (limited to 'autoload/polyglot.vim')
-rw-r--r--autoload/polyglot.vim10
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