9

Do they share code, or is that just a tradition? Are there any other programs with similar keybindings?

17

Short answer, common historical roots in vi. Their creators were both users of an earlier Unix program, vi.

Here is a rough diagram to put their initial release dates and influence in perspective:

vi 1976
 | \      more 1978
 |  \     /
 |   \   /
 |     v
 |   less 1983
 v
vim 1991

Sources:

Vim

Vim, by Bram Moolenaar, is a clone of the Unix program vi. From within vim you can look at the help intro: :help intro, you see:

Vim is a text editor which includes almost all the commands from the Unix program "Vi" and ...

Less

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 vi and more when he created less to overcome the limitations of both vi and more at that time.

When you do man less, you see the connection to vi:

Commands are based on both more and vi.

Vim and Less

So less and 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.

| improve this answer | |
  • I suspected they have similar roots but how about authors ? Are the vi and less authors the same ? – Sergiy Kolodyazhnyy Nov 26 '15 at 2:17
  • @Serg Nope. vi was written Bill Joy, Vim by Bram Moolenaar, less by Mark Nudelman. As quoted above, the author says they first tried vi, but it couldn't handle the files, and then they tried more, which couldn't move back. So they wrote less. So, presumably, vi is the first option for them, and they are used to vi-like keybindings. – muru Nov 26 '15 at 4:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.