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

Re: insert space after comma based on context

Expand Messages
  • Vigil
    You can also ctrl-v, which will prevent the , map. ... -- .
    Message 1 of 7 , Jul 3, 2006
    • 0 Attachment
      You can also ctrl-v, which will prevent the , map.

      On Thu, 29 Jun 2006, Zhang Le wrote:

      > Hi,
      > Most of time I want a space after a comma, so I use "imap , , "
      > The problem is, sometime I do not want a comma inside square
      > brackets in some programming language such python and matlab:
      > a[10,:] or a(10,:)
      >
      > Is there a way to not insert a space based on context around the
      > cursor so that if the text before cursor is [xxx, or (xxx, no space
      > will be inserted?
      > Any tips?
      > Zhang Le
      >

      --

      .
    • A.J.Mechelynck
      ... I suppose there is: see :help pattern.txt Then maybe you ll want not to replace it between digits, as in 123,456,789.01 (decimal notation with thousands,
      Message 2 of 7 , Jul 14, 2006
      • 0 Attachment
        Zhang Le wrote:
        > Hi,
        > Most of time I want a space after a comma, so I use "imap , , "
        > The problem is, sometime I do not want a comma inside square
        > brackets in some programming language such python and matlab:
        > a[10,:] or a(10,:)
        >
        > Is there a way to not insert a space based on context around the
        > cursor so that if the text before cursor is [xxx, or (xxx, no space
        > will be inserted?
        > Any tips?
        > Zhang Le
        >
        >

        I suppose there is: see :help pattern.txt

        Then maybe you'll want not to replace it between digits, as in
        123,456,789.01 (decimal notation with thousands, Anglo-Saxon style) or
        123.456.789,01 (the same, Latin style). (BTW, I don't know whether the
        Chinese people use a comma or a period for the decimal point, and I'm
        not sure whether they separate thousands, millions, etc., or maybe
        tens-of-thousands [aka myriads], myriads of myriads, etc., in large
        numbers written with the characters 0123456789).


        Best regards,
        Tony.
      Your message has been successfully submitted and would be delivered to recipients shortly.