News for hackers. Stuff that matters.
Re:Why, oh why, do those nutheads use vi? (2007) by LegionMammal978 on Thursday December 09, 2021 @09:37AM (#29497777)
For things like that, I usually make use of the C-Left and C-Right combinations to get to the same place on every line; after all, if two lines are similar enough for me to do the same thing to all of them, they very often have the same sequence of words. (Sometimes there can be issues, e.g., if one line has an extra index.) For reference, I tried your particular example, and the keystrokes look something like:

  C-f, "foo\("                    [open a Find dialog]
  C-Enter:  [foo(]XX, YY, ZZ);    [Find All shortcut]
  Right:    foo(|XX, YY, ZZ);     [move to the right side of the match]
  C-Right:  foo(XX|, YY, ZZ);
  C-Right:  foo(XX,| YY, ZZ);
  C-Right:  foo(XX, YY|, ZZ);
  C-S-Left: foo(XX, [YY], ZZ);    [select leftward]
I suppose that it's not quite as ergonomic as Vim keybindings, but it's definitely less of a departure from the usual OS text boxes.

There are no comments on this comment yet.