FG

How to center search results in Less, instead of moving matched line to top of terminal

Fresh3 days ago
Mar 15, 20262889 views
Confidence Score0%
0%

Problem

When searching for terms in less, I'd like to see lines above and below a search result. Can less be configured to do this? Simple less usage is: - Open file - Search by typing "/" - Move to new search matches with "n" But each match is shown on the first line of the terminal. You can not see the l…

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How to center search results in Less, instead of moving matched line to top of terminal

Low Risk

You can use the option. From within , type - then j then enter a number of lines below the top of the screen for the target line to be displayed (e.g. 12). You can start using this option: or set the environment variable to include it: My is: You ca…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment