I have an XML file that I want to make some changes to. For example, I want to open a file in Vim and run find and replace all instances of the attribute memory="..." with memory="24G" , but only if the element is from name="node-0..." . Here is an example:
process name="node-0-3" numaNode="3" memory="14G" logConfig="logback-shards.xml" process name="node-0-4" numaNode="4" memory="34G" logConfig="logback-shards.xml" process name="node-0-5" numaNode="5" memory="44G" logConfig="logback-shards.xml"
replace
process name="node-0-3" numaNode="3" memory="24G" logConfig="logback-shards.xml" process name="node-0-4" numaNode="4" memory="24G" logConfig="logback-shards.xml" process name="node-0-5" numaNode="5" memory="24G" logConfig="logback-shards.xml"
How can I do this in vim?
source share