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
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
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