Alan G Isaac wrote:
On Thu, 10 Aug 2006, "A.J.Mechelynck" apparently wrote:
What is "the raw string notation from Python" ? IMHO it would only create one additional type of string. We already have single-quoted 'raw' strings in Vim, yet many people constantly forget that double-quoted strings in Vim are "cooked".

Yes, that is my point:
Many people forget the difference between single and double quoted strings. Indeed when reading vimscript the difference
is not immediately obvious (easily forgettable), which is
unfortunate.

Taking the Python approach that values explicitness,
http://docs.python.org/ref/strings.html
a raw string can be created
r'like this' or r"like this".
The preceding 'r' is obviously for 'raw'.
Very explicit; unlikely ever to be forgotten;
and I think backwards compatible (i.e.,
ordinary single and double quoted strings
can remain what they are).

Cheers,
Alan Isaac





Dunno what Bram would think of your proposal, but I wouldn' bet a eurocent on it.

And what about

        :let q=r"like this"

where r happens to be a variable? With current Vim syntax, it is legal (move r to q, the rest is a Vim comment). Similarly

        :if q==r"like this"
        :while q<r"like this"

or any command which can end in an expression and be followed by a comment.


Best regards,
Tony.

Reply via email to