Sylvain wrote:
But I have another little problem, if, always for example, I put let lineString="\r".substitute(lineString, '\(\w\+\)\(\s\+\)\(\w\+\)','\3\2\1', 'g') or change the \r by \n or \r\n or \n\r (always between double quote ;-)) Vim add ^M or ^@Looks like the same mistake -- if you want to have backslashes in your strings, you've got to either use single quotes (') or double up the backslashes.
So, use '\r' ... -or- "\\r" ..., NOT "\r". Regards, Chip Campbell