Does less have an incremental search?

I'm on xubuntu.

link|improve this question

74% accept rate
feedback

3 Answers

up vote 4 down vote accepted

Unfortunately the less pager does not have this functionality. The only search options available are / for a forward search, and ? for a backward search.

link|improve this answer
someone should implement that ability then ;) – hasen j Feb 26 '10 at 6:23
according to the manpage: "n .. repeat previous search" ... isnt that incremental? – akira Feb 26 '10 at 7:20
2  
Incremental usually means "search as you type". See codinghorror.com/blog/2005/10/… – mrucci Feb 26 '10 at 16:28
feedback

You can use view (vim in read only mode) as a replacement for less.. vim has incremental search, just add:

set incsearch

to your .vimrc

link|improve this answer
I know about it but can you pipe text to it? i.e. use it as a pager for other tools (such as git) – hasen j Feb 27 '10 at 2:08
1  
looks like vim comes with a script for that.. export PAGER=/usr/share/vim/vim71/macros/less.sh or if you google 'vimpager' there is a supposedly better replacement.. git sort of has issues with it because of the terminal escape codes for color, but there might be an easy fix for that... – user23307 Feb 27 '10 at 11:04
I forgot about view – at. Feb 27 '10 at 23:55
feedback

I added incremental search to less and pushed it to a fork on GitHub.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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