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

Changing the default syntax for a file

Expand Messages
  • Dave D
    My apologies if this has already been asked, but in a current project we are using the perl module HTML::Template to code a web based tool. In using this I ve
    Message 1 of 3 , May 2, 2001
    • 0 Attachment
      My apologies if this has already been asked, but in a current project we
      are using the perl module HTML::Template to code a web based tool. In
      using this I've found that I can force the syntax to html (all of the files
      are .tmpl for easy identification) by using
      ":set syntax=html"

      My question is how can I get vim to automagically use the html syntax
      highlighting for the .tmpl files?
    • Chouser
      Dave D wrote: [Wed May 2 2001, 11:43:51AM EDT] ... Try adding this to your .vimrc: au BufRead *.tmpl set syntax=html --Chouser
      Message 2 of 3 , May 2, 2001
      • 0 Attachment
        Dave D wrote: [Wed May 2 2001, 11:43:51AM EDT]
        > My question is how can I get vim to automagically use the html syntax
        > highlighting for the .tmpl files?

        Try adding this to your .vimrc:

        au BufRead *.tmpl set syntax=html

        --Chouser
      • Dave D
        ... Worked like a charm! Thanks.
        Message 3 of 3 , May 2, 2001
        • 0 Attachment
          >Try adding this to your .vimrc:
          >
          >au BufRead *.tmpl set syntax=html

          Worked like a charm! Thanks.
        Your message has been successfully submitted and would be delivered to recipients shortly.