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

Re: syntax highligting for more than one language simultaneously

Expand Messages
  • Christian Brabandt
    ... Only, if the second syntax files is prepared for that kind of thing, otherwise it won t load (as described in :h syntax ) and you should really use the
    Message 1 of 5 , Nov 1, 2011
    • 0 Attachment
      On Tue, November 1, 2011 1:34 pm, György Kiss wrote:
      > If you set the filetype to another type with a dot, vim will syntax
      > highlight both types ex.:
      > :set ft=php.html
      >
      > See :h 'ft'

      Only, if the second syntax files is prepared for that kind of thing,
      otherwise it won't load (as described in :h 'syntax') and you should
      really use the 'syntax' option and not the 'ft' option, but this
      depends on your specific needs.

      There is however a workaround, that has been documented in the help
      (with revision 887d6d91882e) for using embedded awk code within a
      shell script. See :h sh-awk (works only with a recent enough version
      of your runtime files).

      regards,
      Christian

      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • Ben Fritz
      ... Probably. Also see: http://vim.wikia.com/wiki/Different_syntax_highlighting_within_regions_of_a_file -- You received this message from the vim_use
      Message 2 of 5 , Nov 1, 2011
      • 0 Attachment
        On Nov 1, 3:45 am, Elias Diem <pub.li...@...> wrote:
        > On Tue, Nov 01, 2011 at 09:25:48AM +0100, Eric Smith wrote:
        > > I am sorry if this has been around before, but how may I have
        > > highlighting of two languages at the same time.
        >
        > I think you are looking for this
        >
        > :help :syn-include
        >

        Probably. Also see:

        http://vim.wikia.com/wiki/Different_syntax_highlighting_within_regions_of_a_file

        --
        You received this message from the "vim_use" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php
      Your message has been successfully submitted and would be delivered to recipients shortly.