Loading ...
Sorry, an error occurred while loading the content.

Re: little question

Expand Messages
  • A.T. Hofkamp
    ... I think the confusion arises from the use of substitutions as unit while substituting, and the use of changes as unit with the undo. Maybe vim should
    Message 1 of 6 , Jun 30, 2003
    • 0 Attachment
      On Sun, 29 Jun 2003, Stahlman Family wrote:

      > > > > When I do
      > > > >
      > > > > :%s/spam/yuck/g
      > > > >
      > > > > in a particular file, I get back
      > > > >
      > > > > 181 substitutions on 155 lines
      > > > >
      > > > > However, if I press u, I get back
      > > > >
      > > > > 155 changes
      > > > >
      > > > > Shouldn't this say "181 changes" or "155 lines changed"?
      > > > >
      > > > Steve,
      >
      > Tony,
      > :s/pat/repl/ is a single command that can be executed on all lines in a
      > range - in this case all lines in the file. Thus, the substitute command to
      > "replace all occurrences of spam on a line" was executed on 155 lines - hence,
      > 155 changes. I guess I confused things a little by mistakenly equating a
      > single undo with a single "change". Undo can undo more than one "change" if
      > all of the changes were part of a single command-line operation.
      >
      > Brett S.

      I think the confusion arises from the use of 'substitutions' as unit
      while substituting, and the use of 'changes' as unit with the undo.
      Maybe vim should use the same unit in both cases.

      Albert
      --
      Unlike popular belief, the .doc format is not an open publically available format.
    Your message has been successfully submitted and would be delivered to recipients shortly.