summaryrefslogtreecommitdiff
path: root/coreutils/shuf.c
diff options
context:
space:
mode:
authorRon Yorston2021-03-28 13:21:34 +0100
committerDenys Vlasenko2021-03-29 12:16:21 +0200
commit1e84daf054113b97dad2d1201b8ec7fbebc9aeb3 (patch)
treeb30495efb5a37331cabbad4c739ad8e33593dec3 /coreutils/shuf.c
parentd4c46037a6c595c42aab22b6910c56f5ccadb96e (diff)
downloadbusybox-1e84daf054113b97dad2d1201b8ec7fbebc9aeb3.zip
busybox-1e84daf054113b97dad2d1201b8ec7fbebc9aeb3.tar.gz
vi: allow motion count for change/delete/yank/shift
The motion that determines the range of a change, delete, yank or shift operation can have its own count. Thus the commands '5dd' and 'd5d' are equivalent: both delete 5 lines. When the command itself also has a count the two values are multiplied. Thus the command '2d3w' deletes 6 words and '2D3G' deletes from the current line to line 6. (When dealing with structured data it might make sense to think in units of 3 words so '2d3w' is deleting 2 such units. It doesn't seem quite as sensible to express 'delete from current line to line 6' as '2D3G' but vi permits it.) function old new delta get_motion_char - 68 +68 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/0 up/down: 68/0) Total: 68 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils/shuf.c')
0 files changed, 0 insertions, 0 deletions