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.