Reputation: 446
I need to run this command :perldo s/assigned_to(?!_member|_role)/assigned_to_member/g
in all open buffers. I'm using :perldo
because the builtin vim regex (i.e. %s/foo/bar/g
) isn't working with my negative lookahead for some reason.
Through my research I've found the :bufdo
and :execute "normal <foo>"
commands but I haven't yet figured out how to combine them.
Does anyone know how I would be able to run the perldo command on all my open buffers? Thanks!
Upvotes: 5
Views: 276
Reputation: 51693
What's wrong with:
:bufdo! perldo s/assigned_to(?!_member|_role)/assigned_to_member/g
Upvotes: 8