Do they share code, or is that just a tradition? Are there any other programs with similar keybindings?
Short answer, common historical roots in
vi. Their creators were both users of an earlier Unix program,
Here is a rough diagram to put their initial release dates and influence in perspective:
| \ more 1978
| \ /
| \ /
| less 1983
Vim is a text editor which includes almost all the commands from the Unix program "Vi" and ...
Whereas the creator of
less, Mark Nudelman explains on his FAQ:
Back in 1983, I was working for a now-defunct company called Integrated Office Systems. Some of our software ran on a Unix system and produced enormous log files of its transactions. We wanted to be able to search these log files for error messages. But the version of "vi" we were using couldn't handle files larger than a certain size, and our log files often exceeded that size. So we were forced to use "more" to view the files. The problem was, once we found an error message, what we really wanted to see was the transactions leading up to the error; that is, the lines in the log file immediately before the error message. But more didn't allow backward movement in the file.
So he was already using
more when he created
less to overcome the limitations of both
more at that time.
When you do
man less, you see the connection to
Commands are based on both more and vi.
Vim and Less
vim seem to coincidentally have commands similar to each other, only because, those commands are actually based on
vi, which can be seen as their common ancestor.