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

Re: erroformat, unknown option

Expand Messages
  • Gary Johnson
    ... The message says that the error in on line 54. There are not 54 lines in what you provided. Nevertheless, the problem is the last line: execute
    Message 1 of 5 , Apr 5, 2013
      On 2013-04-05, FlashBurn wrote:
      > I'm trying to create a compiler plugin for my own needs and I'm
      > trying to do it the proper way, i.e. by using the compiler
      > directory. When I execute
      >
      > compiler iar
      >
      > Vim gives me an error:
      > Error detected while processing C:\Documents and Settings\user\vimfiles\compiler\iar.vim
      >
      > line 54:
      > E518: Unknown option: %A%p~,%C
      >
      > Does anybody know what is the issue? To me all those values look correct.
      >
      > The code is provided below. Any help is appreciated.

      The message says that the error in on line 54. There are not 54
      lines in what you provided.

      Nevertheless, the problem is the last line:

      execute 'CompilerSet errorformat = '.myerrorformat

      ":help :CompilerSet" shows that the CompilerSet command is a type of
      :set command, and :set commands do not accept spaces on either side
      of the =. The following should solve that problem.

      execute 'CompilerSet errorformat='.myerrorformat

      Regards,
      Gary

      --
      --
      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

      ---
      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • FlashBurn
      ... Gary, You were right. I needed to eliminate the spaces. But then I also needed to to the following execute CompilerSet
      Message 2 of 5 , Apr 8, 2013
        On Friday, April 5, 2013 6:49:43 PM UTC-4, Gary Johnson wrote:
        > On 2013-04-05, FlashBurn wrote:
        >
        > > I'm trying to create a compiler plugin for my own needs and I'm
        >
        > > trying to do it the proper way, i.e. by using the compiler
        >
        > > directory. When I execute
        >
        > >
        >
        > > compiler iar
        >
        > >
        >
        > > Vim gives me an error:
        >
        > > Error detected while processing C:\Documents and Settings\user\vimfiles\compiler\iar.vim
        >
        > >
        >
        > > line 54:
        >
        > > E518: Unknown option: %A%p~,%C
        >
        > >
        >
        > > Does anybody know what is the issue? To me all those values look correct.
        >
        > >
        >
        > > The code is provided below. Any help is appreciated.
        >
        >
        >
        > The message says that the error in on line 54. There are not 54
        >
        > lines in what you provided.
        >
        >
        >
        > Nevertheless, the problem is the last line:
        >
        >
        >
        > execute 'CompilerSet errorformat = '.myerrorformat
        >
        >
        >
        > ":help :CompilerSet" shows that the CompilerSet command is a type of
        >
        > :set command, and :set commands do not accept spaces on either side
        >
        > of the =. The following should solve that problem.
        >
        >
        >
        > execute 'CompilerSet errorformat='.myerrorformat
        >
        >
        >
        > Regards,
        >
        > Gary

        Gary,

        You were right. I needed to eliminate the spaces. But then I also needed to to the following

        execute 'CompilerSet errorformat='.escape(s:myerrorformat,'",\'), i.e I needed to escape comma, quotation mark, and backslash. I can't quite to figure out why, does anybody have any ideas?

        --
        --
        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

        ---
        You received this message because you are subscribed to the Google Groups "vim_use" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Gary Johnson
        ... The comma is the separator between entries of the errorformat . Therefore, any comma within an errorformat entry must be escaped. In the context of a
        Message 3 of 5 , Apr 8, 2013
          On 2013-04-08, FlashBurn wrote:

          > Gary,
          >
          > You were right. I needed to eliminate the spaces. But then I also
          > needed to to the following
          >
          > execute 'CompilerSet errorformat='.escape(s:myerrorformat,'",\'),
          > i.e I needed to escape comma, quotation mark, and backslash. I
          > can't quite to figure out why, does anybody have any ideas?

          The comma is the separator between entries of the 'errorformat'.
          Therefore, any comma within an 'errorformat' entry must be
          escaped.

          In the context of a :set command, a quotation mark starts a comment,
          so a quotation mark that is part of the :set command must be
          escaped.

          The backslash is the escape character, so to include a literal
          escape in just about any context in Vim, it must be escaped.

          See
          :help efm-entries
          :help option-backslash

          Regards,
          Gary

          --
          --
          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

          ---
          You received this message because you are subscribed to the Google Groups "vim_use" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        • FlashBurn
          ... Gary, Thanks for the help. I really appreciate it. -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the
          Message 4 of 5 , Apr 8, 2013
            On Monday, April 8, 2013 11:09:55 AM UTC-4, Gary Johnson wrote:
            > On 2013-04-08, FlashBurn wrote:
            >
            >
            >
            > > Gary,
            >
            > >
            >
            > > You were right. I needed to eliminate the spaces. But then I also
            >
            > > needed to to the following
            >
            > >
            >
            > > execute 'CompilerSet errorformat='.escape(s:myerrorformat,'",\'),
            >
            > > i.e I needed to escape comma, quotation mark, and backslash. I
            >
            > > can't quite to figure out why, does anybody have any ideas?
            >
            >
            >
            > The comma is the separator between entries of the 'errorformat'.
            >
            > Therefore, any comma within an 'errorformat' entry must be
            >
            > escaped.
            >
            >
            >
            > In the context of a :set command, a quotation mark starts a comment,
            >
            > so a quotation mark that is part of the :set command must be
            >
            > escaped.
            >
            >
            >
            > The backslash is the escape character, so to include a literal
            >
            > escape in just about any context in Vim, it must be escaped.
            >
            >
            >
            > See
            >
            > :help efm-entries
            >
            > :help option-backslash
            >
            >
            >
            > Regards,
            >
            > Gary

            Gary,

            Thanks for the help. I really appreciate it.

            --
            --
            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

            ---
            You received this message because you are subscribed to the Google Groups "vim_use" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
          Your message has been successfully submitted and would be delivered to recipients shortly.