3

Sometimes, if I know I'm not going to do any edits in a window, I use less instead of vi. However, vi displays percentage and cursor position in the bottom right corner. Is there a way to mimic this behavior when using less?

PS - I'm 98% that I could see this ruler-type information at my last job, but maybe they were using an older version or an alias?

I tried to find the information in these locations:
vi set ruler and line numbers in less

  • I know that I could, in theory, use vi -R, but that's not the question. :) – goodguy5 Apr 5 '16 at 15:07
4

I was able to reach out to an old coworker and get their less alias.

less -M

From the man-page:

-m or --long-prompt
Causes less to prompt verbosely (like more), with the percent into the file. By default, less prompts with a colon.

-M or --LONG-PROMPT
Causes less to prompt even more verbosely than more.

This experience has made me think that vi might be better for most things...

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.