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

modeline error

Expand Messages
  • Muddassirali Mirzani
    I m trying to source a syntax script using modeline // vim:so $HOME/.vim/syntax/vera.vim I m getting the following error: Error detected while processing
    Message 1 of 3 , Feb 1, 2007
    • 0 Attachment
      I'm trying to source a syntax script using modeline
      // vim:so $HOME/.vim/syntax/vera.vim

      I'm getting the following error:

      Error detected while processing modelines:
      line 46:
      E518: Unknown option: $HOME/.vim/syntax/vera.vim

      What is wrong ?

      Thanks in advance..



      ____________________________________________________________________________________
      Expecting? Get great news right away with email Auto-Check.
      Try the Yahoo! Mail Beta.
      http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html
    • Tim Chase
      ... A couple things: 1) the modeline can only be used to set options, not to perform arbitrary Ex commands. ... ... {options} a list of option settings,
      Message 2 of 3 , Feb 1, 2007
      • 0 Attachment
        > I'm trying to source a syntax script using modeline
        > // vim:so $HOME/.vim/syntax/vera.vim
        >
        > I'm getting the following error:
        >
        > Error detected while processing modelines:
        > line 46:
        > E518: Unknown option: $HOME/.vim/syntax/vera.vim
        >
        > What is wrong ?

        A couple things:

        1) the modeline can only be used to set options, not to perform
        arbitrary Ex commands.

        :help modeline

        ...
        {options} a list of option settings, separated with
        white space or ':', where each part between
        ':' is the argument for a ":set" command
        ...

        2) even if it were to allow arbitrary Ex commands, they are
        executed within the sandbox which prohibits access to other files:

        :help sandbox
        These items are not allowed in the sandbox
        ...
        -reading or writing a file
        ...


        It looks like what you want is a custom filetype for your
        particular "vera" filetype. You can learn more about creating
        your own custom file types than any sane person should want to
        know by reading

        :help new-filetype

        Hope this gives you some direction,

        -tim
      • Phil Edwards
        ... I can testify that while new custom filetype entries are a little daunting (and even tedious, if you are not modifying or appending to existing settings)
        Message 3 of 3 , Feb 1, 2007
        • 0 Attachment
          On 2/1/07, Tim Chase <vim@...> wrote:
          > It looks like what you want is a custom filetype for your
          > particular "vera" filetype. You can learn more about creating
          > your own custom file types than any sane person should want to
          > know by reading
          >
          > :help new-filetype

          I can testify that while new custom filetype entries are a little
          daunting (and even tedious, if you are not modifying or appending to
          existing settings) the first time, once you have your files in place,
          they become much easier to do for additional entries.
        Your message has been successfully submitted and would be delivered to recipients shortly.