domingo, 20 de septiembre de 2009

Fully vim style linux - part 3 - Get geeker

In this third part (part1, part2) , I'll explain how to get a couple of programs act like vim. With 'act like vim' I mean understand hjkl, and probably nothing more, but if you are really addicted to vim, you know it makes a great difference, right?

pdf viewer

If you're on ubuntu (then you should try vectorlinux, really) , you probably use evince to open pdf files. Well, surprise! evince (at least in ubuntu 8.04 with no extra tweaks) knows what hjkl mean, so you're done :)

If you use xpdf, you can teach it hjkl adding the next lines to your ~/.xpdfrc

bind h any scrollLeft(16)
bind l any scrollRight(16)
bind k any scrollUp(16)
bind j any scrollDown(16)
you can find out more about theese comands in xpdf's man page

xchm viewer

Chances here are xchm, kchmviewer or firefox with a chm viewer plugin.

I haven't seen any option if you use xchm, but kchmviewer can be configured to behave vim-ish (only if compiled with qt libs enabled). pressing ctrl in kchmviewer underlines all links in the view, and makes them accessible with a keystroke.

One of the safest options is using any firefox plugin. Then, hopefully, vimperator will do all the dirty job.


Apart from all those programs, you'll end writing your own tools to help you in your daily tasks.

Then I recommend you a couple of apps/libs.

First is ratmen/9menu/ratmenu . A simple menu aplication that generates menus navigable with hjkl. Priceless

If you feel like programming your own tools, perl module Curses::UI has all bindings you need... by DEFAULT!

On part 4 I'll talk about shells and gtk, and maybe...emacs!

PS: If you have suggestions, or you just liked the post, or... please comment!