3 ms·
Any idea why the period became repeat in VIM? I've checked through old manuals, and can't quite figure out where it came from.
by soperj 9y ago
Any idea why the period became repeat in VIM? I've checked through old manuals, and can't quite figure out where it came from.
- gp2000 9y agoIn command contexts "." refers to the current line (e.g., :.,$s/a/b/ will perform the a -> b substitution from the current line to the last line of the file). That comes from ex which likely copied that from ed. I've seen "." used similarly in other contexts. 8-bit Microsoft BASIC used "." for the current line -- "LIST ." would list the last line that had been listed or edited. A number of assemblers use "." for the current assembly address. The point being that there is a bit of a tradition of using "." for "the current thing" so there's a sort of sense in using it for the most recent command. If you're really curious get in touch with Bill Joy.
- flukus 9y agoAlso ./ for the current folder is still used on all OS's. I think your examples predate computers having folders though.
- kps 9y agoUNIX's ‘.’ predates Microsoft BASIC. (Possibly inherited from Multics, but I don't know.)
- flukus 9y agoI was thinking more of ed, for some reason I thought folders were a later invention, 70's or early 80's, but they were first used in 1958: https://en.wikipedia.org/wiki/Directory_(computing) https://en.wikipedia.org/wiki/Directory_(computing)