Vifm

From ArchWiki
Revision as of 20:49, 16 August 2010 by Jasonwryan (Talk | contribs) (Added colourscheme info & example)

Jump to: navigation, search

Tango-document-new.pngThis article is a stub.Tango-document-new.png

Notes: please use the first argument of the template to provide more detailed indications. (Discuss in Talk:Vifm#)

Vifm is a ncurses based file manager with vi like keybindings. If you use vi, vifm gives you complete keyboard control over your files without having to learn a new set of commands. Source: Vifm on sourceforge.

Installation

Vifm is in Community:

# pacman -S vifm

For tiling window managers

With tiling window managers, the command "xterm -e vifm" may result in Vifm restricted to only a small part of the window. The following AUR package, vifm-for-tiling-wm, takes care of this problem.

Customizing Vifm

Copy the default config file to your home folder

$ cp /usr/share/vifm/vifmrc ~/.vifm/vifmrc

You can then make any changes that suit your working style.

To get started, read the information avaliable in:

  • /usr/share/vifm/vifm.txt
  • /usr/share/vifm/vifm-help.txt

Colorschemes

The ~/.vifm/colorschemes file contains the color schemes. The format is outlined in the file but it is basically:

COLOR=Window_name_or_filetype=foreground_color_number=background_color_number

An example colorscheme looks like:

COLORSCHEME=Default
DIRECTORY=/
COLOR=MENU=white=-1
COLOR=BORDER=-1=-1
COLOR=WIN=white=-1
COLOR=STATUS_BAR=white=-1
COLOR=CURR_LINE=8=cyan
COLOR=DIRECTORY=cyan=-1
COLOR=LINK=yellow=-1
COLOR=SOCKET=magenta=-1
COLOR=DEVICE=red=-1
COLOR=EXECUTABLE=green=-1
COLOR=SELECTED=magenta=-1
COLOR=CURRENT=blue=-1

Opening filetypes in Vifm

You can assign applications to filetypes in vifmrc, eg.

FILETYPE=Images=jpg,jpeg,gif,tif,tiff,png,bmp=feh
FILETYPE=Movies=avi,flv,mpg,mpeg,mov,ogg,ogv=vlc

User commands

You can also create custom commands in vifmrc, eg.

COMMAND=feh=feh -Fp. *.*

Creating symbolic links

COMMAND=ln=ln -s %d/%f %D

When you call :ln, a link of the selected file is made in the other directory (if you are in split view). It even works with multiple files selected with visual (v) or tag (t).

Alternative

Another text based filemanager with vi like keybinds is Ranger.