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.
我需要在所有打开的缓冲区中运行此命令:perldo s / assigned_to(?!_ member | _role)/ assigned_to_member / g。我正在使用:perldo,因为内置的vim正则表达式(即%s / foo / bar / g)由于某种原因无法使用我的负向前瞻。
Through my research I've found the :bufdo
and :execute "normal <foo>"
commands but I haven't yet figured out how to combine them.
通过我的研究,我发现:bufdo和:执行“普通
Does anyone know how I would be able to run the perldo command on all my open buffers? Thanks!
有谁知道我怎么能在我所有的开放缓冲区上运行perldo命令?谢谢!
1 个解决方案
#1
8
What's wrong with:
出了什么问题:
:bufdo! perldo s/assigned_to(?!_member|_role)/assigned_to_member/g
#1
8
What's wrong with:
出了什么问题:
:bufdo! perldo s/assigned_to(?!_member|_role)/assigned_to_member/g