I just found out I can use
less with multiple files. less status line tells me
(END) - Next: file2.txt
But how do I navigate previous/next from less?
We read in the manpage:
:n Examine the next file (from the list of files given in the com‐ mand line). If a number N is specified, the N-th next file is examined. :p Examine the previous file in the command line list. If a number N is specified, the N-th previous file is examined.
Note: you actually have to type the
: for these commands (even though there is a colon visible already).
:n jump to next file
:p jump to previous file
:x jump to first file
3:n jump 3 files ahead
3:p jump 3 files back
3:x jump to 3rd file
:f print current file name/info (helpful if you forget where you are)
Not strictly an answer for that question but maybe someone can find this useful nevertheless.
If the number of files is reasonably small, one could use
vim for that:
vim -O files*
In this way all the files are displayed at once by splitting the screen automatically.
-o to split horizontally.)
vim survival commands for this use case: