summaryrefslogtreecommitdiffstats
path: root/autoload
diff options
context:
space:
mode:
Diffstat (limited to 'autoload')
-rw-r--r--autoload/polyglot.vim10
-rw-r--r--autoload/sleuth.vim2
2 files changed, 12 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
diff --git a/autoload/sleuth.vim b/autoload/sleuth.vim
index e70169cb..18344723 100644
--- a/autoload/sleuth.vim
+++ b/autoload/sleuth.vim
@@ -35,6 +35,7 @@ let s:globs = {
\ 'automake': '[Mm]akefile.am,GNUmakefile.am',
\ 'ave': '*.ave',
\ 'awk': '*.awk',
+ \ 'basic': '*.basic',
\ 'blade': '*.blade,*.blade.php',
\ 'brewfile': 'Brewfile',
\ 'c': '*.c,*.cats,*.h,*.idc',
@@ -200,6 +201,7 @@ let s:globs = {
\ 'unison': '*.u,*.uu',
\ 'v': '*.v',
\ 'vala': '*.vala,*.vapi,*.valadoc',
+ \ 'vb': '*.bas,*.cls,*.frm,*.frx,*.vba,*.vbs,*.dsm,*.ctl,*.sba',
\ 'vbnet': '*.vb,*.vbhtml',
\ 'vcl': '*.vcl',
\ 'velocity': '*.vm',