It took me far too long to figure out how to do this, and I seem to have found this patch when trying to figure it out again but a year later I've forgotten how I figured it out.
I'm sure I messed up the formatting terribly, but being able to remember `:.,'cs/foo/bar/` by looking in the manual would make me happy. I always expect the backtick to do it. Comments, OK? Index: usr.bin/vi/docs/USD.doc/vi.man/vi.1 =================================================================== RCS file: /cvs/src/usr.bin/vi/docs/USD.doc/vi.man/vi.1,v retrieving revision 1.75 diff -u -p -r1.75 vi.1 --- usr.bin/vi/docs/USD.doc/vi.man/vi.1 12 Feb 2018 01:10:46 -0000 1.75 +++ usr.bin/vi/docs/USD.doc/vi.man/vi.1 14 May 2019 20:38:22 -0000 @@ -537,6 +537,21 @@ A cursor movement command which indicate of text, the first being the current cursor position. Repeating the command character makes it affect the whole current line. +.It Ar range +A +.Op Ar start,end +range of lines from 'start' to an optional 'end'. +The 'start' and 'end' are either line numbers or +.Ar \&. +for the current line, +.Ar $ +for the end of the file, +.Ar 'c +the line marked by 'c', +.Ar % +all the lines in the file, +.Ar g/pattern/ +all lines that match 'pattern'. .It Ar word A sequence of letters, digits or underscores. .El
