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

vim.vim organization

Expand Messages
  • Kartik Agaram
    I notice many keywords in runtime/syntax/vim.vim are split across multiple lines. For example, I assume all the lines beginning with syn keyword vimCommand
    Message 1 of 4 , Oct 31, 2012
    • 0 Attachment
      I notice many keywords in runtime/syntax/vim.vim are split across
      multiple lines. For example, I assume all the lines beginning with
      "syn keyword vimCommand" could logically be assumed to be a single
      (very long) command. Is that accurate?

      If this is correct, I'm curious if there's some pattern to how they
      are organized. It seems each line is in alphabetical order. But
      there's a's in each line. Is there some way to decide which line each
      keyword goes to?

      Or am I just over-thinking things? :)

      Kartik
      http://akkartik.name

      --
      You received this message from the "vim_dev" 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
    • Charles E Campbell Jr
      ... You re likely looking at the automatically generated keyword lists ; vimCommands are generated automatically. The keywords are sorted in the usual
      Message 2 of 4 , Oct 31, 2012
      • 0 Attachment
        Kartik Agaram wrote:
        > I notice many keywords in runtime/syntax/vim.vim are split across
        > multiple lines. For example, I assume all the lines beginning with
        > "syn keyword vimCommand" could logically be assumed to be a single
        > (very long) command. Is that accurate?
        >
        > If this is correct, I'm curious if there's some pattern to how they
        > are organized. It seems each line is in alphabetical order. But
        > there's a's in each line. Is there some way to decide which line each
        > keyword goes to?
        >
        > Or am I just over-thinking things? :)
        >
        You're likely looking at the "automatically generated keyword lists";
        vimCommands are generated automatically. The keywords are sorted in the
        usual ascending alphabetical order with 100 keywords per line.

        Regards,
        C Campbell

        --
        You received this message from the "vim_dev" 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
      • Tony Mechelynck
        ... As Dr.Chip said, parts of the syntax/vim.vim script are generated automatically. When the interpreter sources the script, every line starts a new
        Message 3 of 4 , Nov 1, 2012
        • 0 Attachment
          On 01/11/12 01:19, Kartik Agaram wrote:
          > I notice many keywords in runtime/syntax/vim.vim are split across
          > multiple lines. For example, I assume all the lines beginning with
          > "syn keyword vimCommand" could logically be assumed to be a single
          > (very long) command. Is that accurate?
          >
          > If this is correct, I'm curious if there's some pattern to how they
          > are organized. It seems each line is in alphabetical order. But
          > there's a's in each line. Is there some way to decide which line each
          > keyword goes to?
          >
          > Or am I just over-thinking things? :)
          >
          > Kartik
          > http://akkartik.name
          >

          As Dr.Chip said, parts of the syntax/vim.vim script are generated
          automatically. When the interpreter sources the script, every line
          starts a new statement, except of course in the case of "continuation
          lines", i.e. if (in 'nocompatible' mode) the first nonblank on the line
          is a backslash, in which case the interpreter disregards the backslash,
          all (zero or more) tabs or spaces preceding it, and the line break
          between that line and the one before it.

          Best regards,
          Tony.
          --
          Someone will try to honk your nose today.

          --
          You received this message from the "vim_dev" 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
        • Kartik Agaram
          ... Yeah I see the comments now that these lines are auto-generated: syn keyword vimCommand contained abc[lear] argdo argu[ment] bel[owright] bN[ext] ...
          Message 4 of 4 , Nov 1, 2012
          • 0 Attachment
            > You're likely looking at the "automatically generated keyword lists";
            > vimCommands are generated automatically. The keywords are sorted in the
            > usual ascending alphabetical order with 100 keywords per line.

            Yeah I see the comments now that these lines are auto-generated:

            syn keyword vimCommand contained abc[lear] argdo argu[ment]
            bel[owright] bN[ext] ...
            syn keyword vimCommand contained abo[veleft] arge[dit] as[cii]
            bf[irst] bo[tright] ...
            syn keyword vimCommand contained al[l] argg[lobal] bad[d] bl[ast]
            bp[revious] ...

            Each of them is internally in alphabetical order. But how are the
            boundaries between lines decided? They're all keyword vimCommand.

            Also, is the generator in the repo?

            --
            You received this message from the "vim_dev" 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.