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.

Both more and less seem to be heavily influenced by the vi commands. Are there any pagers that are more emacs like out of the box?

share|improve this question

3 Answers 3

up vote 3 down vote accepted

less supports actually a subset of both vi and emacs commands. You should be able to add the ones you are missing using the lesskey command.

share|improve this answer
    
The lesskey pointer is very helpful--thanks! –  apgwoz Oct 11 '12 at 18:10

Not exactly a pager, but GNU Info uses the same bindings as Emacs.

Though I wonder why you would need a pager if you use Emacs…

Emacs can browse man pages with woman, you can « tail » a file with auto-revert-tail-mode.

share|improve this answer
    
You use pagers for a lot more than man and info pages... –  apgwoz Oct 11 '12 at 18:15
    
My shell run in emacs and if I need to do complex operations on the output, I can simply put it in a buffer and write some elisp, run some shell command (M-|) or use some keyboard macros (C-x k (). Thus I only use a pager when I'm don't have (my) emacs. –  Daimrod Oct 11 '12 at 21:25
    
Which shell are you using? I guess I could force myself to do more things within emacs. I already do do a lot of things. I'm just so used to using an xterm I guess... –  apgwoz Oct 12 '12 at 2:11
    
I use multi-term to run multiple terminals inside emacs. github.com/daimrod/Emacs-config/blob/master/… And then, you can switch between term-char-mode and term-line-mode with respectively C-c C-k and C-c C-j. term-char-mode has the standard term bindings, and with term-line-mode you can navigate in the buffer like in any other buffers. –  Daimrod Oct 12 '12 at 6:14
    
I've used multi-term in the past, but stopped for some reason--not sure why, but perhaps it's time to try again. My config is here: github.com/apgwoz/emacs-config –  apgwoz Oct 12 '12 at 11:54

I use this bash function to view files (from memory):

ev() {
  emacs "$1" -nw --eval '(setq buffer-read-only t)'
}

It opens the file $1 in a read only buffer.
I don't know the best way to set a bash function as a pager, I suppose you could put it in a shellscript instead and use that as pager instead.

(Not on a computer with bash to test on)

share|improve this answer
    
Yeah, it'd be trivial to convert this to a shell script. I'd probably use emacsclient though to avoid the hefty startup time. –  apgwoz Oct 11 '12 at 18:11

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.