Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

The layout of my netbook's keyboard means that using the arrow keys for navigation is slightly uncomfortable. Is there a way to make GNU Info pages use vim-style hjkl navigation? I know I can

info printf | less

...and use j and k to scroll up and down, which is good enough as I use info pages for reading so navigating to specific characters isn't vital; but it would be nice if I could do this within info, rather than resorting to a pipe.

share|improve this question
2  
This doesn't answer the question so I'll just post it as a comment. You can also use info --subnodes -o - "$@" | less. That way, you will be able to see all of the info about an item. –  paraxor Jul 23 '13 at 18:48
    
Note that the info standalone browser documentation is available at info "info stand-alone". Where you can type i then vi or key and then TAB twice to see the matching index entries. –  Stéphane Chazelas Jul 24 '13 at 2:54

2 Answers 2

up vote 4 down vote accepted

Yes, info has support for pretty much any key binding scheme you like; see http://www.gnu.org/software/texinfo/manual/info-stnd/html_node/Custom-Key-Bindings.html and note in particular the --vi-keys startup option for Info.

share|improve this answer
    
I think we have a winner, alias info='info --vi-keys' and done. –  evilsoup Jul 23 '13 at 18:25

The arrow keys are the least meaingful way to navigate info documents; as well, the hjkl keys are the least meaningful ways to navigate with vim-style keybindings.

Info uses emacs-style keybindings which aren't so bad once you figure them out. try info info to get started and then hit h to check out some of the keys. just the same, open a file with less file and hit h to see what it has to offer.

In vim itself, you aren't doing it right until you're using the many different keys for navigating through text-objects. :help text-objects.

Push comes to shove, here is a vim plugin to add an :Info command for viewing info pages with all the magic of vim keybindings. i would fully recommend learning how to just use info instead, as it was designed in a very particular fashion to be extremely efficiently navigable.

share|improve this answer
    
Thanks for this; the 'skip to next node' option is very interesting in particular. –  evilsoup Jul 23 '13 at 18:27

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.