Both Ruby and Vim use "g" with substitution commands to mean "all occurrences." What does the "g" stand for?
Specifically, in Ruby, the String class has two "sub" commands:
string = "One potato, two potato, three potato, four."
string.sub('potato','banana') # => "One banana, two potato, three potato, four."
string.gsub('potato','banana') # => "One banana, two banana, three banana, four."
If I remember correctly it means
global, which this Wiki page seems to confirm:
The g flag means global – each occurrence in the line is changed, rather than just the first.