VIM can't highlight vb script upon loading

1 view
Skip to first unread message

worker

unread,
Dec 1, 2008, 1:12:53 PM12/1/08
to vim_use
Dear all,
I have VIM 7.2 on WinXP box.
I can't get to automatically do the syntax highlighting for vb
script. It can do all other program file types, just not vb script.
I've already put syntax enable and syntax on in the vimrc file and it
works for all other filetypes except vb.
Please help!
T

John Beckett

unread,
Dec 1, 2008, 4:40:22 PM12/1/08
to vim...@googlegroups.com
worker wrote:
> I can't get to automatically do the syntax highlighting
> for vb script. It can do all other program file types, just
> not vb script.
> I've already put syntax enable and syntax on in the vimrc
> file and it works for all other filetypes except vb.

Following is how you could associate two file extensions with two different
filetypes, in file $HOME/vimfiles/filetype.vim:

---start---
if exists("did_load_filetypes")
finish
endif
augroup filetypedetect
au! BufNewFile,BufRead *.cls setf vb
au! BufNewFile,BufRead *.csv setf csv
augroup END
---end---

You should be able to adapt this (removing the csv line) for your purpose.

John

Reply all
Reply to author
Forward
0 new messages