jasonwryan.com

Miscellaneous ephemera…

Changing Keybinds in vifm

Vifm is a ncurses based file manager with vi-like keybindings; it gives you complete keyboard control over your files without having to learn a new set of commands.

Vifm

The only drawback, for me, is that as of the current version (0.5-1) you can’t map keys. While the developer has indicated it is on the todo list, he also flagged that it is some way off. If, like me, you map : ; in Vim, then not having this functionality is a minor irritant. Fortunately, it is also easily fixed. Ken Steen, the Vifm developer, was kind enough to point me in the right direction…

Download the tarball from AUR and untar it etc.,

1
$ tar -xzf vifm.tar.gz cd vifm/

Build the package

1
$ makepkg -s

Then you will need to edit the file, keys.c

1
vim src/vifm-0.5/src/keys.c

Search for the command key

1
/case ':':

In this version it is at line 982. Change the entry to your key of choice — in my case ; — and save and quit.

Recompile Vifm and you are done…

1
$ makepkg -efi

Update 18/2/10

Vifm has now been moved to Community, so you can use ABS to build the package.

Comments