/gc ask before each replacement I recently came to appreciate this in combination with multi-file operation http://usevim.com/2012/04/06/search-and-replace-files/
when I changed the name of a class On Fri, Aug 22, 2014 at 1:28 PM, Edward K. Ream <[email protected]> wrote: > First, the P.S. tells what vim's :s and :%s commands do. So yes, I've done > my homework. > > The question is, how much, if any, of either the syntax or the function of > these substitution commands is really needed? > > At present, both the :s and :%s commands do exactly the same thing: they > simply execute Leo's search-with-present-options command. (They are supposed > to set the node-only radio button, but they don't yet.) > > To ask this question another way, is there anything much to be gained by > using the fairly clumsy vim syntax discussed in the P.S.? > > Your comments, please. > > Edward > > P.S. From direct observation of vim, I can report that vim's :s and :%s > commands work as follows. Note that none of the commands affect the dot in > any way:: > > :%s/foo/bar > :%s/foo/bar/ > Replace first occurrence of 'foo' with 'bar' in all lines. > > :%s/foo/bar/g > Replace all occurrences of 'foo' with 'bar' in all lines. > > :s/foo/bar/ > Replace first occurrence of 'foo' (on the current line) with 'bar' > > :s/foo/bar/g > Replace all occurrence of 'foo' (on the current line ), with 'bar'. > > The trailing slash may be followed by both the 'g' flag, as shown above, or: > > /gi case insensitive > /gI case sensitive > > EKR > > -- > You received this message because you are subscribed to the Google Groups > "leo-editor" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/leo-editor. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
