Difference between revisions of "Vifm"

From ArchWiki
Jump to: navigation, search
m (Key Mapping: Changed autostart filename to its correct name, startup)
(rm useless cat)
Line 1: Line 1:
[[Category: Utilities (English)]]
 
 
[[Category: File managers (English)]]
 
[[Category: File managers (English)]]
 
[[Category: File systems (English)]]
 
[[Category: File systems (English)]]

Revision as of 16:05, 7 September 2011

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

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

Key Mapping

As of 0.6.2 you can customize key bindings in Vifm. These can be set from the command mode using the map command, like so:

 :map ] :

However, these mappings will not be saved between sessions. To map a key permanently, copy the Template:Filename file from the source directory to Template:Filename (or create one there), and enter your mappings for all modes (map) or normal (nmap) and visual (vmap) modes, eg.

nmap s :shell<cr>
nmap S :sort<cr>

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).

Torrent Creation

make a .torrent of the current file in the other tab's dir

COMMAND=mkt=mktorrent -p -a [your announce url here] -o %D/%f.torrent %d/%f

Alternative

Another text based filemanager with vi like keybinds is Ranger.