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

Re: using mode lines to source files

Expand Messages
  • Benji Fisher
    ... You could :set ft=custom in a modeline. Read ... for how to detect the custom filetype. Then, read ... (perhaps you already have) to define a syntax
    Message 1 of 2 , Jun 30, 2001
    • 0 Attachment
      Eric Smith wrote:
      >
      > I want to put a command in a modeline to source specific syntax files.
      >
      > The faq says that the modeline system is crippled for security reasons
      > but there is a function from Benjamin Elijah Griffin at:
      > http://www.netusa.net/~eli/src/modeline.html
      >
      > It dont seem to be there though?

      You could :set ft=custom in a modeline. Read

      :help myfiletypefile

      for how to detect the "custom" filetype. Then, read

      :help mysyntaxfile

      (perhaps you already have) to define a syntax file for "custom". The
      custom.vim syntax file could look like

      :set ft=c
      :syn match Foo "foo"
      :hi Foo guibg=lightyellow guifg=blue

      HTH --Benji Fisher
    Your message has been successfully submitted and would be delivered to recipients shortly.