How do I block the message "Pattern not found" in :s

2013-03-12 Thread James Kanze
I've written a couple of functions which change the formatting of C++ code, to bring it in line with our coding guidelines; things along the lines of: function! FixParen() s/( */( /g s/ *)/ )/g s/( *)/()/g endfunction The problem is that when calling these over a range (t

Re: How do I block the message "Pattern not found" in :s

2013-03-12 Thread Tim Chase
On 2013-03-12 08:30, James Kanze wrote: > function! FixParen() > s/( */( /g > s/ *)/ )/g > s/( *)/()/g > endfunction > > The problem is that when calling these over a range (the usual > procedure), vim invokes the function once per line; a lot of lines > don't have anything which

Re: How do I block the message "Pattern not found" in :s

2013-03-12 Thread James Kanze
On Tuesday, 12 March 2013 15:39:16 UTC, Tim Chase wrote: > On 2013-03-12 08:30, James Kanze wrote: > > function! FixParen() > > s/( */( /g > > s/ *)/ )/g > > s/( *)/()/g > > endfunction > > The problem is that when calling these over a range (the usual > > procedure), vim invokes the