Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Does less have an incremental search?

I'm on xubuntu.

share|improve this question

3 Answers 3

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.

share|improve this answer
    
someone should implement that ability then ;) –  hasenj 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

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

share|improve this answer

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

share|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) –  hasenj 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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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