Hi,
Benoit Mortgat wrote: > On Fri, Nov 20, 2009 at 07:04, viZpal <[email protected] > <mailto:[email protected]>> wrote: > > > :s/%/ /g - replaces only the first '%' with an empty space. I was > expecting all '%' to get replaced ! > :s/%/ / - replaces all '%' with spaces.. > > I saw this behavior only for the character '%' . > Can this be explained ?? > > > you must have set 'gdefault'. > Maybe a script has set it, use « :verb set gdefault? » to know. there is also the 'edcompatible' option which, when set, makes the 'g' flag toggle between on and off every time it is given. This would explain why the substitute command failed on the first invocation with '%' and succeede on a second invocation with a different character. Regards, Jürgen -- Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us. (Calvin) --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
