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

19246Re: using mode lines to source files

Expand Messages
  • Benji Fisher
    Jun 30, 2001
      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
    • Show all 2 messages in this topic