Get the latest tech news
The POSIX specification of vi
— screen-oriented (visual) display editor [UP] vi [-rR] [-c command] [-t tagstring] [-w size] [file...] This utility shall be provided on systems that both support the User Portability Utilities option and define the POSIX2_CHAR_TERM symbol. On other systems it is optional.
POSIX.1-2024 does not specify a standard behavior because there may be external issues, such as connection speed, the number of characters necessary to redraw as opposed to scroll, or terminal capabilities that implementations will have to accommodate. Implementations supporting this functionality are encouraged to base it on the tildedop edit option and handle the text regions and cursor positioning identically to the yank command. While a reasonable and unambiguous extension would be to permit the r command on empty lines, it would require that too large a count be adjusted to match the number of characters at or after the cursor for consistency, which is sufficiently different from historical practice to be avoided.
Or read this on Hacker News