For example function(null,null,10)
, How to change to function(null,10,10)
?
I used
%s/(function(null,)null/\110
to achieve the same, I want to know more abstract method that can replace the second to any number
This line will change the 2nd parameter into 10
, without checking if the first parameter is null
or something else. (You didn't ask for that in your question):
s/function(\S*,\zs[^,]*\ze,/10/