Loading ...
Sorry, an error occurred while loading the content.

VIM can't highlight vb script upon loading

Expand Messages
  • worker
    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
    Message 1 of 2 , Dec 1, 2008
    • 0 Attachment
      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

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • John Beckett
      ... Following is how you could associate two file extensions with two different ... if exists( did_load_filetypes ) finish endif augroup filetypedetect au!
      Message 2 of 2 , Dec 1, 2008
      • 0 Attachment
        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


        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      Your message has been successfully submitted and would be delivered to recipients shortly.