|
For v0.14.3 (04 Jun 2025)
All versions
|
Table of contentsNAMESYNOPSIS DESCRIPTION OPTIONS General keys Basic Movement Movement with Count Scrolling panes Pane manipulation Marks Searching File Filters Tree-related Keys Other Normal Mode Keys Using Count Registers Selectors Visual Mode View Mode Command line Mode Fast navigation Pasting special values Command line editing More Mode Commands Ranges :command parameters Command macros Command backgrounding Cancellation Selection Patterns Regular expressions Globs :set options Mappings Expression syntax Functions Menus and dialogs Menus history Custom views Compare views Startup Configure Sessions Automatic FUSE mounts View look ls-like view Column view Color schemes Trash directory File copying Client-Server External Renaming Using mouse Plugin Reserved ENVIRONMENT SEE ALSO AUTHOR NAMEvifm - vi file manager SYNOPSISvifm [OPTION]...
DESCRIPTIONVifm is an 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. OPTIONSvifm starts in the current directory unless it is given a different directory on the command line or 'vifminfo' option includes "savedirs" (in which case last visited directories are used as defaults).
<path> <path> Starts Vifm in the specified paths. Specifying two directories triggers split view even when vifm was in single-view mode on finishing previous run. To suppress this behaviour :only command can be put in the vifmrc file. When only one path argument is found on command-line, the left/top pane is automatically set as the current view. Paths to files
are also allowed in case you want vifm to start with some
archive opened. Open parent directory of the given path and select specified file in it.
--choose-files <path>|- Sets output file to write selection into on exit instead of opening files. "-" means standard output. Use empty value to disable it. --choose-dir <path>|- Sets output file to write last visited directory into on exit. "-" means standard output. Use empty value to disable it. --delimiter <delimiter> Sets separator for list of file paths written out by vifm. Empty value means null character. Default is new line character. --on-choose <command> Sets command to be executed on selected files instead of opening them. The command may use any of macros described in "Command macros" section below. The command is executed once for whole selection. --plugins-dir <path> Additional plugins directory (can appear multiple times). The last one added has the highest priority. --logging[=<startup log path>] Log some operational details to $XDG_DATA_HOME/vifm/log or $VIFM/log. If the optional startup log path is specified and permissions allow one to open it for writing, then logging of early initialization (before configuration directories are determined) is put there. --server-list List available server names and exit. --server-name <name> Name of target or this instance (sequential numbers are appended on name conflict). --remote Sends the rest of the command line to another instance of vifm, --server-name is treated just like any other argument and should precede --remote on the command line. When there is no server, quits silently. There is no limit on how many arguments can be processed. One can combine --remote with -c <command> or +<command> to execute commands in already running instance of vifm. See also "Client-Server" section below. --remote-expr passes expression to vifm server and prints result. See also "Client-Server" section below. -c <command> or +<command> Run command-line mode <command> on startup. Commands in such arguments are executed in the order they appear in command line. Commands with spaces or special symbols must be enclosed in double or single quotes or all special symbols should be escaped (the exact syntax strongly depends on shell). "+" argument is equivalent to "$" and thus picks last item of of the view. --help, -h Show a brief command summary and exit vifm. --version, -v Show version information and quit. --no-configs Skip reading vifmrc and vifminfo. See "Startup" section below for the explanations on $VIFM. General keysCtrl-C or Escape cancel most operations (see "Cancellation" section below), clear all selected files. In addition to that Escape also aborts waiting for more input when the current input is insufficient for determining the shortcut.
Basic MovementThe basic vi key
bindings are used to move through the files and pop-up
windows. move cursor up one line. j, gj or Ctrl-N move cursor down one line.
gl or Enter enter directory or launch a file. See "Selection" section below.
Ctrl-F or Page Down move forward one page. Ctrl-B or Page Up move back one page.
Movement with CountMost movement
commands also accept a count, 12j would move down 12 move to percent of the file list. [count]j move down [count] files. [count]k move up [count] files. [count]G or [count]gg move to list position [count]. [count]h go up [count] directories. Scrolling panes
Pane manipulationSecond character
can be entered with or without Control key. move the pane to the far left. Ctrl-W J move the pane to the very bottom. Ctrl-W K move the pane to the very top. Ctrl-W L move the pane to the far right. Ctrl-W h switch to the left pane. Ctrl-W j switch to the pane below. Ctrl-W k switch to the pane above. Ctrl-W l switch to the right pane. Ctrl-W b switch to bottom-right window. Ctrl-W t switch to top-left window. Ctrl-W p switch to previous window. Ctrl-W w switch to other pane. Ctrl-W o leave only one pane. Ctrl-W s split window horizontally. Ctrl-W v split window vertically. Ctrl-W x exchange panes. Ctrl-W z quit preview pane or view modes. Ctrl-W - decrease size of the view by count. Ctrl-W + increase size of the view by count. Ctrl-W < decrease size of the view by count. Ctrl-W > increase size of the view by count. Ctrl-W | set current view size to count. Ctrl-W _ set current view size to count. Ctrl-W = make size of two views equal. For Ctrl-W +, Ctrl-W -, Ctrl-W <, Ctrl-W >, Ctrl-W | and Ctrl-W _ commands count can be given before and/or after Ctrl-W. The resulting count is a multiplication of those two. So "2 Ctrl-W 2 -" decreases window size by 4 lines or columns. Ctrl-W | and Ctrl-W _ maximise current view by default. MarksMarks are set the same way as they are in vi. You can use
these characters for marks [a-z][A-Z][0-9]. set a mark for the file at the current cursor position. '[a-z][A-Z][0-9] navigate to the file set for the mark. There are also several special marks that can't be set manually:
Searching/regular expression pattern search for files matching regular expression in forward direction and advance cursor to next match.
?regular expression pattern search for files matching regular expression in backward direction and advance cursor to previous match.
Trailing slash for directories
is taken into account, so /\/ searches go to the next file matching last search pattern. Takes last search direction into account. [count]N go to the previous file matching last search pattern. Takes last search direction into account. If 'hlsearch' option is set,
hitting n/N to perform a search and go to See also
"Regular expressions" section. search forward for file with [character] as first character in name. Search wraps around the end of the list. [count]F[character] search backward for file with [character] as first character in name. Search wraps around the end of the list. [count]; find the next match of f or F. [count], find the previous match of f or F. Note: f, F, ; and , wrap around list beginning and end when they are used alone and they don't wrap when they are used as selectors. File FiltersThere are three basic file filters:
Permanent filter essentially allows defining a group of files names which are not desirable to be seen by default, like temporary or backup files, which might be created alongside normal ones. Just like you don't usually need to see hidden dot files (files starting with a dot). Local filter on the other hand is for temporary immediate filtering of file list at hand, to get rid of uninterested files in the view or to make it possible to use % range in a :command. For the purposes of more deterministic editing permanent filter is split into two parts:
Files are tested
against both parts and a match counts if at least one of the
parts matched. " filter
directories which names end with '.files' " filter
files which names end with '.d' " filter
files and directories which names end with '.o' See also "Regular expressions" and "Patterns" sections. The basic Vim folding key bindings are used for managing filters.
=regular expression pattern filter out files that don't match regular expression. Whether view is updated as regular expression is changed depends on the value of the 'incsearch' option. This kind of filter is automatically reset when directory is changed. Tree-related KeysWhile some of the keys make sense outside of tree-view, they are most useful in trees.
Other Normal Mode Keys[count]: enter command line mode. [count] generates range.
[count]!! and [count]!<selector> enter command line mode with entered ! command. [count] modifies range.
Shift-Tab enter view mode (works only after activating view pane with :view command).
If file under cursor is selected, each selected item is processed, otherwise only current file is updated.
same as l key, but tries to run program with administrative privileges.
[reg]gs if register is present, then all files listed in that register that are visible in current view are selected. When no register is specified, restore the last selection saved for this view (similar to what gv does for visual mode selection). When you leave a directory, its saved selection is remembered for that path and visiting the directory again restores it. Selection for up to 10 distinct file-system locations are remembered. gu<selector> make names of selected files lowercase. [count]guu and [count]gugu make names of [count] files starting from the current one lowercase. Without [count] only current file is affected. gU<selector> make names of selected files uppercase. [count]gUU and [count]gUgU make names of [count] files starting from the current one uppercase. Without [count] only current file is affected.
change file owner.
change file group. [count]cp change file attributes (permission on *nix and properties on Windows). If [count] is specified, it's treated as numerical argument for non-recursive ‘chmod‘ command (of the form [0-7]{3,4}). See "Menus and dialogs" section for controls. [count]C clone file(s) [count] times. [reg][count]dd move files to trash directory if 'trash' option is set, otherwise delete them permanently. See "Trash directory" section below. When "s" is present in 'cpoptions', operates on selected files or, in the absence of selection, the current one. When the flag isn't set, always operates on the current file only. [reg]d[count]<selector> like dd, but accepts motions/selectors. [count]DD or D[count]<selector> like dd and d<selector>, but always omits trash directory (even when 'trash' option is set). Affected by "s" flag in 'cpoptions'. [reg][count]Y or [reg][count]yy yank files. When "s" is present in 'cpoptions', operates on selected files or, in the absence of selection, the current one. When the flag isn't set, always operates on the current file only. [reg]y[count]<selector> yank files specified by motion/selector.
[reg]al put symbolic links with absolute paths. [reg]rl put symbolic links with relative paths.
The semantics is as follows:
[count]Ctrl-A increment first number in file name by [count] (1 by default). [count]Ctrl-X decrement first number in file name by [count] (1 by default).
Using CountYou can use
count with commands like yy. yank count files starting from current cursor position downward. Or you can use count with
motions passed to y, d or D. delete (count + 1) files starting from current cursor position downward. Registersvifm supports multiple registers to temporary store lists of yanked and/or deleted files. Registers are specified by pressing double quote key followed by a register name before typing a command. Count is specified after a register name. By default commands use unnamed register, which has double quote as its name. Though all commands accept registers, most commands ignore them (for example, H or Ctrl-U). Other commands fill a register, append new files to it or use it as a source of list of files. Presently vifm supports ", _, a-z and A-Z characters as register names. As mentioned above " is unnamed register and has special meaning of the default register. Every time a named register (a-z and A-Z) is used, unnamed register is updated to contain the same list of files. _ is black hole register. It can be used for writing, but its list is always empty. Registers with names from a to z and from A to Z are named ones. Lowercase registers are cleared before adding new files, while uppercase ones aren't and should be used to append new files to the existing file list of a corresponding lowercase register (A for a, B for b, ...). Registers contain each file at most once. Nonexistent files are dropped from them. In particular, registers can be changed on :empty command if they include files under trash directory (see "Trash directory" section below). Example: "a2yy puts names of two files to register a (and to the unnamed register), "Add removes one file and appends its name to register a (and to the unnamed register), p or "ap or "Ap inserts previously yanked and deleted files into current directory. Selectorsy, d, D, !, gu
and gU commands accept selectors. You can combine them Most of selectors are like vi motions: j, k, gg, G, H, L, M, %, f, F, ;, comma, ', ˆ, 0 and $. But there are some additional ones.
Examples:
When you pass a count to whole command and its selector they are multiplied. So:
Visual ModeVisual mode has two generic operating submodes:
Both modes select files in range from cursor position at which visual mode was entered to current cursor position (let's call it "selection region"). Each of two borders can be adjusted by swapping them via "o" or "O" keys and updating cursor position with regular cursor motion keys. Obviously, once initial cursor position is altered this way, real start position becomes unavailable. Plain Vim-like visual mode starts with cleared selection, which is not restored on rejecting selection ("Escape", "Ctrl-C", "v", "V"). Contrary to it, selection editing doesn't clear previously selected files and restores them after reject. Accepting selection by performing an operation on selected items (e.g. yanking them via "y") moves cursor to the top of current selection region (not to the top most selected file of the view). In turn, selection editing supports three types of editing (look at status bar to know which one is currently active):
No matter how you activate selection editing it starts in "append". One can switch type of operation (in the order given above) via "Ctrl-G" key. Almost all normal mode keys work in visual mode, but instead of accepting selectors they operate on selected items.
v, V, Ctrl-C or Escape leave visual mode if not in amending mode, otherwise switch to normal visual selection.
View ModeThis mode tries
to imitate the less program. List of builtin shortcuts can
be found below. Shortcuts can be customized using :qmap,
:qnoremap and :qunmap command-line commands. return to normal mode. [count]e, [count]Ctrl-E, [count]j, [count]Ctrl-N, [count]Enter scroll forward one line (or [count] lines). [count]y, [count]Ctrl-Y, [count]k, [count]Ctrl-K, [count]Ctrl-P scroll backward one line (or [count] lines). [count]f, [count]Ctrl-F, [count]Ctrl-V, [count]Space scroll forward one window (or [count] lines). [count]b, [count]Ctrl-B, [count]Alt-V scroll backward one window (or [count] lines). [count]z scroll forward one window (and set window to [count]). [count]w scroll backward one window (and set window to [count]). [count]Alt-Space scroll forward one window, but don't stop at end-of-file. [count]d, [count]Ctrl-D scroll forward one half-window (and set half-window to [count]). [count]u, [count]Ctrl-U scroll backward one half-window (and set half-window to [count]). r, Ctrl-R, Ctrl-L repaint screen.
[count]/pattern search forward for ([count]-th) matching line. [count]?pattern search backward for ([count]-th) matching line. [count]n repeat previous search (for [count]-th occurrence). [count]N repeat previous search in reverse direction (for [count]-th occurrence). [count]g, [count]<, [count]Alt-< scroll to the first line of the file (or line [count]). [count]G, [count]>, [count]Alt-> scroll to the last line of the file (or line [count]). [count]p, [count]% scroll to the beginning of the file (or N percent into file).
All "Ctrl-W x" keys work the same was as in Normal mode. Active mode is automatically changed on navigating among windows. When less-like mode activated on file preview is left using one by "Ctrl-W x" keys, its state is stored until another file is displayed using preview (it's possible to leave the mode, hide preview pane, do something else, then get back to the file and show preview pane again with previously stored state in it). Command line ModeThese keys are available in all submodes of the command line mode: command, search, prompt and filtering. Down, Up, Left,
Right, Home, End and Delete are extended keys and they are
not available if vifm is compiled with
--disable-extended-keys option. leave command line mode, cancels input. Cancelled input is saved into appropriate history and can be recalled later. Ctrl-M, Enter execute command and leave command line mode. Ctrl-I, Tab complete command or its argument on editing of a :command, complete file names in file name prompts, move cursor onto the next search match in file search prompt (including in navigation) when 'incsearch' is set. Shift-Tab complete in reverse order or move cursor onto the previous file search match.
Ctrl-B, Left move cursor to the left. Ctrl-F, Right move cursor to the right. Ctrl-A, Home go to line beginning. Ctrl-E, End go to line end.
Ctrl-H, Backspace remove character before the cursor. Ctrl-D, Delete remove character under the cursor.
Ctrl-R = insert result of evaluating an expression. Expression is to be entered via nested command-line prompt (where this key does nothing). Expansion of an erroneous expression is empty. Fast navigationIn order to streamline navigation through directory tree, you can enter a special form of command-line mode from search or local filter prompt. Once activated, pressing Enter opens currently selected directory and clears the prompt in anticipation of the next component of the path. If entry under the cursor is a file, it is opened and the mode is finished. This behaviour is embedded in a command-line mode, but doesn't update input histories nor expands abbreviations and redefines some of the mode's mappings for the purpose of faster navigation through the file system rather than command-line editing. When on, prompt gets "nav" prefix. You can enable this behaviour on search by default via a mapping like: nnoremap / /<c-y>
Enter, Right either enter a directory under the cursor without leaving the mode and clear the prompt or leave the mode for files. If 'navoptions' specifies "open:all" a file under the cursor is opened after leaving the mode. Ctrl-O, Left go to parent directory.
Ctrl-N, Down move view cursor down. Ctrl-P, Up move view cursor up. Page Down scroll view down. Page Up scroll view up.
Pasting special valuesThe shortcuts
listed below insert specified values into current cursor
position. Last key of every shortcut references value that
it inserts: - a -
[a]utomatic filter Values related
to filelist in current pane are available through Ctrl-X
prefix, while values from the other pane have doubled Ctrl-X
key as their prefix (doubled Ctrl-X is presumably easier to
type than uppercase letters; it's still easy to remap the
keys to correspond to names of similar macros). name of the current file of the active pane. Ctrl-X d path to the current directory of the active pane. Ctrl-X e extension of the current file of the active pane. Ctrl-X r name root of current file of the active pane. Ctrl-X t the last component of path to the current directory of the active pane. Ctrl-X Ctrl-X c name of the current file of the inactive pane. Ctrl-X Ctrl-X d path to the current directory of the inactive pane. Ctrl-X Ctrl-X e extension of the current file of the inactive pane. Ctrl-X Ctrl-X r name root of current file of the inactive pane. Ctrl-X Ctrl-X t the last component of path to the current directory of the inactive pane. Ctrl-X a value of implicit permanent filter (old name "automatic") of the active pane. Ctrl-X m value of explicit permanent filter (old name "manual") of the active pane. Ctrl-X = value of local filter of the active pane. Ctrl-X / last pattern from search history. Command line editingvifm provides a
facility to edit several kinds of data, that is usually
edited in command-line mode, in external editor (using
command specified by 'vicmd' or 'vixcmd' option). This has
at least two advantages over built-in command-line mode:
The facility is
supported by four input submodes of the command-line: Editing command-line using external editor is activated by the Ctrl-G shortcut. It's also possible to do almost the same from Normal and Visual modes using q:, q/ and q? commands. Temporary file created for the purpose of editing the line has the following structure:
After editing application is finished the first line of the file is taken as the result of operation, when the application returns zero exit code. If the application returns an error (see :cquit command in Vim), all the edits made to the file are ignored, but the initial value of the first line is saved in appropriate history. More ModeThis is the mode that appears when status bar content is so big that it doesn't fit on the screen. One can identify the mode by "-- More --" message at the bottom. The following
keys are handled in this mode: scroll one line down. Backspace, k or Up scroll one line up.
Space, f or PageDown scroll down a screen. b or PageUp scroll up a screen.
q, Escape or Ctrl-C quit the mode.
CommandsCommands are executed with :command_name<Enter> Commented out lines should start with the double quote symbol ("), which may be preceded by whitespace characters intermixed with colons. Inline comments can be added at the end of the line after double quote symbol, only last line of a multi-line command can contain such comment. Not all commands support inline comments as it's not always possible to identify one unambiguously:
Most of the commands have two forms: complete and the short one. Example: :noh[lsearch] This means the complete command is nohlsearch, and the short one is noh. Most of command-line commands completely reset selection in the current view. However, there are several exceptions:
'|' can be used to separate commands, so you can give multiple commands in one line. If you want to use '|' in an argument, precede it with '\'. These commands see '|' as part of their arguments even when it's escaped: :[range]! To be able to use another command after one of these, wrap it with the :execute command. An example: if filetype('.')
== 'reg' | execute '!!echo regular file' | endif move to the file number. :[count]command The only builtin :[count]command are :[count]d[elete] and :[count]y[ank].
:command [args] execute command via shell. Accepts macros. :[range]!command & same as above, but the command is run in the background using vifm's means. Programs that write to stderr create error dialogs showing errors of the command. Note the space before ampersand symbol, if you omit it, command will be run in the background using job control of your shell. Accepts macros.
same as :!, but pauses before returning.
:alink create absolute symbolic links to files in directory of inactive view. With "?" prompts for destination file names in an editor. "!" forces overwrite. :[range]alink[!] path create absolute symbolic links to files in directory specified by the path (absolute or relative to directory of inactive view). :[range]alink[!] name1 name2... create absolute symbolic links of files in directory of other view giving each next link a corresponding name from the argument list. :[range]alink[!?] -skip ... see "-skip parameter" section below. :apropos create a menu of items returned by the apropos command. Selecting an item in the menu opens corresponding man page. By default the command relies on the external "apropos" utility, which can be customized by altering value of the 'aproposprg' option. See "Menus and dialogs" section for controls. :autocmd register autocommand for the
{event}, which can be: {pat} is a
comma-separated list of modified globs patterns, which can
contain tilde or environment variables. All paths use slash
('/') as directory separator. The pattern can start with a
'!', which negates it. Patterns that do not contain slashes
are matched against the last item of the path only (e.g.
"dir" in "/path/dir"). Literal comma can
be entered by doubling it. Two modifications to globs
matching are as follows: {cmd} is a :command or several of them separated with '|'. Examples of
patterns: :au[tocmd] [{event}] [{pat}] list those autocommands that
match given event-pattern combination. :au[tocmd]! [{event}] [{pat}] remove autocommands that match given event-pattern combination. Syntax is the same as for listing above. :apropos repeat last :apropos command. :bmark bookmark current directory with specified tags. :bmark! path tag1 [tag2 [tag3...]] same as :bmark, but allows bookmarking specific path instead of current directory. This is for use in vifmrc and for bookmarking files. Path can contain macros that expand to single path (%c, %C, %d, %D) or those that can expand to multiple paths, but contain only one (%f, %F, %rx). The latter is done for convenience on using the command interactively. Complex macros that include spaces (e.g. "%c:gs/ /_") should be escaped. :bmarks display all bookmarks in a menu. :bmarks [tag1 [tag2...]] display menu of bookmarks that include all of the specified tags. See "Menus and dialogs" section for controls. :bmgo when there are more than one match acts exactly like :bmarks, otherwise navigates to single match immediately (and fails if there is no match). :cabbrev display menu of command-line mode abbreviations. See "Menus and dialogs" section for controls. :ca[bbrev] lhs-prefix display command-line mode abbreviations which left-hand side starts with specified prefix. :ca[bbrev] lhs rhs register new or overwrites existing abbreviation for command-line mode. rhs can contain spaces and any special sequences accepted in rhs of mappings (see "Mappings" section below). Abbreviations are expanded non-recursively. :call invoke a {function} discarding
its return value. :chistory display menu of saved menus. See "Menus and dialogs" section for controls, also see "Menus history" section. :cnoreabbrev display menu of command-line mode abbreviations. See "Menus and dialogs" section for controls. :cnorea[bbrev] lhs-prefix display command-line mode abbreviations which left-hand side starts with specified prefix. :cnorea[bbrev] lhs rhs same as :cabbrev, but mappings in rhs are ignored during expansion. :cd change to home directory.
:cd ˜/dir change directory to ˜/dir. :cd /curr/dir /other/dir change directory of the current pane to /curr/dir and directory of the other pane to /other/dir. Relative paths are assumed to be relative to directory of current view. Command won't fail if one of directories is invalid. All forms of the command accept macros. :cd! /dir same as :cd /dir /dir. :cds navigate to path obtained by substituting first match in current path. Arguments can include slashes, but starting first argument with a separator will activate below form of the command. Specifying "!" changes directory of both panes. Available flags:
:cds[!]/pattern/string/[flags] same as above, but with :substitute-like syntax. Other punctuation characters can be used as separators. :change show a dialog to alter properties of files. :chmod display file attributes (permission on *nix and properties on Windows) change dialog. :[range]chmod[!] arg... only for *nix :chown only for *nix :[range]chown [user][:][group] only for *nix :clone clones files in current directory. With "?" vifm will open vi to edit file names. "!" forces overwrite. Macros are expanded. :[range]clone[!] path clones files to directory specified with the path (absolute or relative to current directory). "!" forces overwrite. Macros are expanded. :[range]clone[!] name1 name2... clones files in current directory giving each next clone a corresponding name from the argument list. "!" forces overwrite. Macros are expanded. :colorscheme print current color scheme name on the status bar. :colo[rscheme] display a menu with a list of available color schemes. You can choose primary color scheme here. It is used for view if no directory specific colorscheme fits current path. It's also used to set border color (except view titles) and colors in menus and dialogs. See "Menus and dialogs" section for controls. :colo[rscheme] color_scheme_name change primary color scheme to color_scheme_name. In case of errors (e.g. some colors are not supported by terminal) either nothing is changed or color scheme is reset to builtin colors to ensure that TUI is left in a usable state. :colo[rscheme] color_scheme_name directory associate directory with the color scheme. The directory argument can be either absolute or relative path when :colorscheme command is executed from command line, but mandatory should be an absolute path when the command is executed in scripts loaded at startup (until vifm is completely loaded). :colo[rscheme] color_scheme_name color_scheme_name... loads the first color scheme in the order given that exists and is supported by the terminal. If none matches, current one remains unchanged. For example: " use a
separate color scheme for panes which are inside FUSE mounts
:comclear remove all user defined commands. :command display a menu of user commands. See "Menus and dialogs" section for controls. :com[mand] prefix display user defined commands that start with the prefix. :com[mand] name action[ &] set or redefine a user command.
User commands
are run in a shell by default (see below for syntax of other
options). To run a command in the background you must mark
it as a background command by adding " &"
after the command's action (e.g., ‘:com rm rm %f
&‘). :com[mand] name /pattern set search pattern. :com[mand] name =pattern set local filter value. :com[mand] name filter{:filter args} set file name filter (see :filter command description). For example: " display
only audio files :com[mand] name :commands set kind of an alias for
internal commands (like in a shell). Passes range given to
alias to an aliased command, so running :%cp after :compare listall | listunique |
listdups | :compare! (showidentical | showdifferent | showuniqueleft | showuniqueright)... this invocation form works only when compare view is active and results in redoing of the previous :compare with toggled state of the passed in options. :copen reopens the last visible menu that has navigation to files by default, if any. See also "Menus history" section. :copy copy files to directory of other view. With "?" prompts for destination file names in an editor. "!" forces overwrite. :[range]co[py][!] path[ &] copy files to directory specified with the path (absolute or relative to directory of other view). "!" forces overwrite. :[range]co[py][!] name1 name2...[ &] copy files to directory of other view giving each next file a corresponding name from the argument list. "!" forces overwrite :[range]co[py][!?] -skip ...[ &] see "-skip parameter" below. Also see
"File copying" section below. same as :quit, but also aborts directory choosing via --choose-dir (empties output file) and returns non-zero exit code. :cunabbrev unregister command-line mode abbreviation by its lhs. :cuna[bbrev] rhs unregister command-line mode abbreviation by its rhs, so that abbreviation could be removed even after expansion. :delbmarks remove bookmarks from current directory. :delbmarks tag1 [tag2 [tag3...]] remove set of bookmarks that include all of the specified tags. :delbmarks! remove all bookmarks. :delbmarks! path1 [path2 [path3...]] remove bookmarks of listed paths. :delcommand remove user defined command named user_command. :delete delete selected file or files. "!" means complete removal (omitting trash). :[range]d[elete][!] [reg] [count][ &] delete selected or [count] files to the reg register. "!" means complete removal (omitting trash). :delmarks delete all marks. :delm[arks] marks ... delete specified marks, each argument is treated as a set of marks. :delsession delete specified session if it was stored previously. Deleting current session doesn't detach it. :display display menu with registers content. :di[splay] list ... display the contents of the numbered and named registers that are mentioned in list (for example "az to display "", "a and "z content). :dirs
:echo evaluate each argument as an expression and output them separated with a space. See help on :let command for a definition of <expr>. :edit open selected or passed file(s) in editor. Macros and environment variables are expanded. :else execute commands until next matching :endif if all other conditions didn't match. See also help on :if and :endif commands. :elseif execute commands until next matching :elseif, :else or :endif if conditions of previous :if and :elseif branches were evaluated to zero. See also help on :if and :endif commands. :empty
:endif end conditional block. See also help on :if and :else commands. :execute evaluate each argument as an expression and join results separated by a space to get a single string which is then executed as a command-line command. See help on :let command for a definition of <expr>. :exit same as :quit. :file display menu of programs set for the file type of the current file. " &" forces running associated program in background. See "Menus and dialogs" section for controls. :f[ile] arg[ &] run associated command that begins with the arg skipping opening menu. " &" forces running associated program in background. :filetype associate given program list to each of the patterns. Associated program (command) is used by handlers of l and Enter keys (and also in the :file menu). If you need to insert comma into command just double it (",,"). Space followed by an ampersand as two last characters of a command means running of the command in the background. Optional description can be given to each command to ease understanding of what command will do in the :file menu. Vifm will try the rest of the programs for an association when the default isn't found. When program entry doesn't contain any of vifm macros, name of current file is appended as if program entry ended with %c macro on *nix and %"c on Windows. On Windows path to executables containing spaces can (and should be for correct work with such paths) be double quoted. See "Patterns" section below for pattern definition and "Selection" section for how selection is handled. See also "Automatic FUSE mounts" section below. Example for zip archives and several actions: filetype
*.zip,*.jar,*.war,*.ear Note that on OS X when ‘open‘ is used to call an app, vifm is unable to check whether that app is actually available. So if automatic skipping of programs that aren't there is desirable, ‘open‘ should be replaced with an actual command. :filet[ype] filename list (in menu mode) currently registered patterns that match specified file name. Same as ":filextype filename". :filextype same as :filetype, but this command is ignored if not running in X. In X :filextype is equal to :filetype. See "Patterns" section below for pattern definition and "Selection" section for how selection is handled. See also "Automatic FUSE mounts" section below. For example, consider the following settings (the order might seem strange, but it's for the demonstration purpose): filetype
*.html,*.htm If you're using vifm inside a terminal emulator that is running in graphical environment (when X is used on *nix; always on Windows), vifm attempts to run application in this order: 1. lynx If there is no graphical environment (checked by presence of non-empty $DISPLAY or $WAYLAND_DISPLAY environment variable on *nix; never happens on Windows), the list will look like: 1. lynx Just as if all :filextype commands were not there. The purpose of such differentiation is to allow comfortable use of vifm with same settings in desktop environment/through remote connection (SSH)/in native console. Note that on OS X $DISPLAY isn't defined unless you define it, so :filextype should be used only if you set $DISPLAY in some way. :filext[ype] filename list (in menu mode) currently registered patterns that match specified file name. Same as ":filetype filename". :fileviewer register specified list of commands as viewers for each of the patterns. Viewer is a command which output is captured and displayed in one of the panes of vifm after pressing "e" or running :view command. When the command doesn't contain any of vifm macros, name of current file is appended as if command ended with %c macro. Comma escaping and missing commands processing rules as for :filetype apply to this command. See "Patterns" section below for pattern definition. Supports Lua handlers. Example for zip archives: fileviewer *.zip,*.jar,*.war,*.ear zip -sf %c, echo "No zip to preview:" :filev[iewer] filename list (in menu mode) currently registered patterns that match specified filename. :filter filter files matching the pattern out of directory listings. '!' controls state of filter inversion after updating filter value (see also 'cpoptions' description). Filter is matched case sensitively on *nix and case insensitively on Windows. See "File Filters" and "Patterns" sections. Example: " filter
all files ending in .o from the filelist. :filter[!] {empty-pattern} same as above, but use last search pattern as pattern value. Example: :filter //I :filter reset filter (set it to an empty string) and show all files. :filter! same as :invert. :filter? show information on local, name and auto filters. :find display results of find command in the menu. Searches among selected files if any. Accepts macros. By default the command relies on the external "find" utility, which can be customized by altering value of the 'findprg' option. :[range]fin[d] -opt... same as :find above, but user defines all find arguments. Searches among selected files if any. :[range]fin[d] path -opt... same as :find above, but user defines all find arguments. Ignores selection and range. :[range]fin[d] repeat last :find command. :finish stop sourcing a script. Can only be used in a vifm script file. This is a quick way to skip the rest of the file. :goto change directory if necessary and put specified path under the cursor. The path should be existing non-root path. Macros and environment variables are expanded. :grep will show results of grep command in the menu. Add "!" to request inversion of search (look for lines that do not match pattern). Searches among selected files if any and no range given. Ignores binary files by default. By default the command relies on the external "grep" utility, which can be customized by altering value of the 'grepprg' option. :[range]gr[ep][!] -opt... same as :grep above, but user defines all grep arguments, which are not escaped. Searches among selected files if any. :[range]gr[ep][!] repeat last :grep command. "!" of this command inverts "!" in repeated command. :help show the help file. :h[elp] argument is the same as using ':h argument' in vim. Use vifm-<something> to get help on vifm (tab completion works). This form of the command doesn't work when 'vimhelp' option is off. :hideui hide interface to show previous commands' output. :highlight display information about all highlight groups active at the moment. :hi[ghlight] clear reset all highlighting to builtin defaults and removed all filename-specific rules. :hi[ghlight] clear ( {pat1,pat2,...} | /regexp/ ) remove specified rule. :hi[ghlight] ( group-name | column:name | {pat1,pat2,...} | /regexp/ ) display information on given highlight group or file name pattern of color scheme used in the active view. :hi[ghlight] ( group-name |
column:name | {pat1,pat2,...} | set style (cterm, gui), foreground (ctermfg, guifg) and/or background (ctermbg, guibg) parameters of highlight group or file name pattern for color scheme used in the active view. Group names, style values and color names are case insensitive. Note that this doesn't include column names as that would make builtin and custom columns indistinguishable. Available
group-name values: Column names match names of columns of |vifm-'viewcolumns'| option, which in turn are based on values of |vifm-'sort'| and custom columns added from Lua. Regardless of the source, columns are specified as "column:{name}", for example: highlight column:fileext ctermfg=red Available style
values (some of them can be combined): Available
colors: Light versions of colors are regular colors with bold attribute set automatically in terminals that have less than 16 colors. So order of arguments of :highlight command is important and it's better to put "cterm" in front of others to prevent it from overwriting attributes set by "ctermfg" or "ctermbg" arguments. For convenience
of color scheme authors xterm-like names for 256 color
palette is also supported. The mapping is taken from
http://vim.wikia.com/wiki/Xterm256_color_names_for_console_Vim
0 Black 86
Aquamarine1 172 Orange3 There are two colors (foreground and background) and only one bold attribute. Thus single bold attribute affects both colors when "reverse" attribute is used in vifm run inside terminal emulator. At the same time linux native console can handle boldness of foreground and background colors independently, but for consistency with terminal emulators this is available only implicitly by using light versions of colors. This behaviour might be changed in the future. Although vifm supports 256 colors in a sense they are supported by UI drawing library, whether you will be able to use all of them highly depends on your terminal. To set up terminal properly, make sure that $TERM in the environment you run vifm is set to name of 256-color terminal (on *nixes it can also be set via X resources), e.g. xterm-256color. One can find list of available terminal names by listing /usr/lib/terminfo/. Number of colors supported by terminal with current settings can be checked via "tput colors" command. In order to use 24-bit colors one needs a terminal that supports them, corresponding terminfo record (probably ends in "-direct" like in "xterm-direct") and $TERM pointing to it. When vifm detects direct color support "cterm*" values are ignored for groups which have at least one of "gui*" values set, otherwise they are used after translating via a builtin palette. Here is the
hierarchy of highlight groups, which you need to know for
using transparency: "none" means default terminal color for highlight groups at the first level of the hierarchy and transparency for all others. Here file name
specific highlights mean those configured via globs ({}) or
regular expressions (//). At most one of them is applied per
file entry, namely the first that matches file name, hence
order of :highlight commands might be important in certain
cases. display a menu with list of visited directories. See "Menus and dialogs" section for controls. :his[tory] x x can be: :histnext same as <c-i>. The main use case for this command is to work around the common pain point of <tab> and <c-i> being the same ASCII character: one could alter the terminal emulator settings to emit, for example, the ‘F1‘ keycode when Ctrl-I is pressed, then ‘:noremap <f1> :histnext<cr>‘ in vifm, add "t" flag to the 'cpoptions', and thus have both <c-i> and <tab> working as expected. :histprev same as <c-o>. :if start conditional block. Commands are executed until next matching :elseif, :else or :endif command if {expr1} evaluates to non-zero, otherwise they are ignored. An error during evaluation of {expr1} results in not taking any conditional branches (not even an else-branch). See also help on :else and :endif commands. Example: if $TERM ==
'screen.linux' :invert invert file name filter. :invert? [f] show current filter state. :invert s invert selection. :invert o invert sorting order of the primary sorting key. :invert? o show sorting order of the primary sorting key. :jobs
:keepsel preserve selection during some :command by default. Note that this doesn't save and restore selection to preserve it no matter what, but precludes its clearing at the end of a command and thus won't help if selection is cleared explicitly during operation. Example: :keepsel view :let set an environment variable. Warning: setting environment variable to an empty string on Windows removes it. :let $ENV_VAR .= <expr> append value to environment variable. :let &[l:|g:]opt = <expr> sets option value. :let &[l:|g:]opt .= <expr> append value to string option. :let &[l:|g:]opt += <expr> increasing option value, adding sub-values. :let &[l:|g:]opt -= <expr> decreasing option value, removing sub-values. Where <expr> could be a
single-quoted string, double-quoted string, an use "locate" command to create a menu of filenames. Selecting a file from the menu will reload the current file list in vifm to show the selected file. By default the command relies on the external "locate" utility (it's assumed that its database is already built), which can be customized by altering value of the 'locateprg' option. See "Menus and dialogs" section for controls. :locate repeat last :locate command. :ls
:lstrash display a menu with list of files in trash. Each element of the list is original path of a deleted file, thus the list can contain duplicates. See "Menus and dialogs" section for controls. :mark set mark x (a-zA-Z0-9) at /full/dir/path and filename. By default current file in current directory is used. If no filename was given and /full/dir/path is current directory, then the last file of the [range] is used. Question mark stops the command from overwriting an existing mark. Macros and environment variables are expanded. :marks
:marks list ... display the contents of the marks that are mentioned in list. :media
display media management menu. See "Menus and dialogs" section for controls. See also 'mediaprg' option. :messages shows previously given messages (up to 50). :mkdir create directories at specified paths. The [line] can be used to pick node in a tree-view. "!" means make parent directories as needed. Macros are expanded. :move move files to directory of other view. With "?" prompts for destination file names in an editor. "!" forces overwrite. :[range]m[ove][!] path[ &] move files to directory specified with the path (absolute or relative to directory of other view). "!" forces overwrite. :[range]m[ove][!] name1 name2...[ &] move files to directory of other view giving each next file a corresponding name from the argument list. "!" forces overwrite. :[range]m[ove][!?] -skip ...[ &] see "-skip parameter" section below. :nohlsearch clear selection in current pane. :normal execute normal mode commands. If "!" is used, user defined mappings are ignored. Unfinished last command is aborted as if <esc> or <c-c> was typed. A ":" should be completed as well. Commands can't start with a space, so put a count of 1 (one) before it. :only switch to a one window view. :open open current file, selection or files in the range as if Enter was pressed. :plugin loads all plugins. To be used in configuration file to manually load plugins at an earlier point. The plugins can be loaded only once, additional calls will do nothing. :plugin blacklist {plugin} adds {plugin} to the list of plugins to be ignored. :plugin whitelist {plugin} adds {plugin} to the list of plugins to be loaded while ignoring all other plugins. This list should normally be empty. :plugins open plugins menu. See "Menus and dialogs" section for controls. :popd
:pushd add pane directories to stack and process arguments like :cd command.
:put put files from specified register (" by default) into current directory. The [line] can be used to pick node in a tree-view. "!" moves files "!" moves files from their original location instead of copying them. During this operation no confirmation dialogs will be shown, all checks are performed beforehand. :pwd
:qall exit vifm (add ! to skip saving changes and checking for active backgrounded commands). :quit if there is more than one tab, close the current one, otherwise exit vifm (add ! to skip saving state and checking for active backgrounded commands). :redraw redraw the screen immediately. :regedit edit register contents using external editor. If {reg} is omitted, unnamed register will be edited by default. Edited paths are normalized (no extra ‘.‘, ‘..‘, ‘/‘, etc.) and all relative paths are treated as starting in the directory of the current view. :registers display menu with registers content. :reg[isters] list ... display the contents of the numbered and named registers that are mentioned in list (for example "az to display "", "a and "z content). :regular :rename :[range]rename[!] rename files by editing their names in an editor. "!" renames files recursively in subdirectories. See "External Renaming" section. :[range]rename name1 name2... rename each of selected files to a corresponding name. :restart free a lot of things (histories, commands, etc.), reread vifminfo, vifmrc and session files and run startup commands passed in the argument list, thus losing all unsaved changes (e.g. recent history or keys mapped after starting this instance). Session that wasn't yet stored gets reset. While many things get reset, some basic UI state and current locations are preserved, including tabs. :restart full variation of :restart that makes no attempt to preserve anything. :restore restore file from trash directory, doesn't work outside one of trash directories. See "Trash directory" section below. :rlink create relative symbolic links to files in directory of other view. With "?" prompts for destination file names in an editor. "!" forces overwrite. :[range]rlink[!] path create relative symbolic links of files in directory specified with the path (absolute or relative to directory of other view). "!" forces overwrite. :[range]rlink[!] name1 name2... create relative symbolic links of files in directory of other view giving each next link a corresponding name from the argument list. "!" forces overwrite. :[range]rlink[!?] -skip ...[ &] see "-skip parameter" section below. :screen toggle whether to use the
terminal multiplexer or not. :screen! enable integration with terminal multiplexers. :screen? display whether integration with terminal multiplexers is enabled. Note: the
command is called screen for historical reasons (when tmux
wasn't yet supported) and might be changed in future
releases, or get an alias. select files in the given range (current file if no range is given). :select {pattern} select files that match specified pattern. Possible {pattern} forms are described in "Patterns" section below. Trailing slash for directories is taken into account, so ‘:select! */ | invert s‘ selects only files. :select //[iI] same as item above, but reuses last search pattern. :select !{external command} select files from the list supplied by external command. Files are matched by full paths, relative paths are converted to absolute ones beforehand. :[range]select! [{pattern}] same as above, but resets previously selected items before proceeding. :session print name of the current session. :session detach current session without saving it. Resets v:session. :session name create or load and switch to a session with the specified name. Name can't contain slashes. Session active at the moment is saved before the switch. Session is also automatically saved when quitting the application in usual ways. Sets v:session. :session - switch to a previous session if it still exists (wasn't removed or detached from without saving). :set
:se[t] all display all options. :se[t] opt1=val1 opt2='val2' opt3="val3" ... sets given options. For local
options both values are set. the meaning:
Option name can be prepended and appended by any number of whitespace characters. :setglobal display all global options that differ from their default value. :setg[lobal] all display all global options. :setg[lobal] opt1=val1 opt2='val2' opt3="val3" ... same as :set, but changes/prints only global options or global values of local options. Changes to the latter might be not visible until directory is changed. :setlocal display all local options that differ from their default value. :setl[ocal] all display all local options. :setl[ocal] opt1=val1 opt2='val2' opt3="val3" ... same as :set, but changes/prints only local values of local options. :shell start a shell in current directory. "!" suppresses spawning dedicated window of terminal multiplexer for a shell. To make vifm adaptive to environment it uses $SHELL if it's defined, otherwise 'shell' value is used. :siblnext change directory to [count]th next sibling directory after current path using value of global sort option of current pane. "!" enables wrapping. For example, say, you're at /boot and root listing starts like this: bin/ Issuing :siblnext will navigate to /dev. :siblprev same as :siblnext, but in the opposite direction. :sort display dialog with different sorting methods, where one can select the primary sorting key. When 'viewcolumns' options is empty and 'lsview' is off, changing primary sorting key will also affect view look (in particular the second column of the view will be changed). See "Menus and dialogs" section for controls. :source read command-line commands from the file. :split switch to a two window horizontal view. :sp[lit]! toggle horizontal window splitting. :sp[lit] path splits the window horizontally to show both file directories. Also changes other pane to path (absolute or relative to current directory of active pane). :stop suspend vifm (same as pressing Ctrl-Z). Does nothing if this instance isn't running in a shell. The command exists to allow mapping to the action of Ctrl-Z. :substitute for each file in range replace a match of pattern with string. String can contain \0...\9 to link to capture groups (\0 - all match, \1 - first group, etc.). Pattern is stored in search history. Available flags:
:[range]s[ubstitute]/pattern substitute pattern with an empty string. :[range]s[ubstitute]//string/[flags] use last pattern from search history. :[range]s[ubstitute] repeat previous substitution command. :sync change the other pane to the current pane directory or to some path relative to the current directory. Using macros is allowed.
:sync! [location | cursorpos
| localopts | filters | filelist | tree | change enumerated properties of the other pane to match corresponding properties of the current pane. Arguments have the following meanings:
:tabclose close current tab, unless it's the only one open at current scope. :tabmove without the argument or with ‘$‘ as the argument, current tab becomes the last tab. With the argument, current tab is moved after the tab with the specified number. Argument of ‘0‘ moves current tab to the first position. :tabname set, update or reset (when no argument is provided) name of the current tab. :tabnew create new tab. Accepts optional path for the new tab. Macros and environment variables are expanded. :tabnext switch to the next tab (wrapping around). :tabn[ext] {n} go to the tab number {n}. Tab numeration starts with 1. :tabonly close all tabs but the current one. Closes pane tabs only at the active side. :tabprevious switch to the previous tab (wrapping around). :tabp[revious] {n} go to the {n}-th previous tab. Note that :tabnext handles its argument differently. :touch create files at specified paths. Aborts on errors. Doesn't update time of existing files. The [line] can be used to pick node in a tree-view. Macros are expanded. :tr for each file in range transliterate the characters which appear in pattern to the corresponding character in string. When string is shorter than pattern, it's padded with its last character. :trashes lists all valid trash directories in a menu. Only non-empty and writable trash directories are shown. This is exactly the list of directories that are cleared when :empty command is executed. :trashes? same as :trashes, but also displays size of each trash directory. :tree
To leave tree view go up from its root or use gh at any level of the tree. Any command that changes directory will also do, in particular, ‘:cd ..‘. Tree structure is incompatible with alternative representations, so values of 'lsview' and 'millerview' options are ignored. The "depth" argument specifies nesting level on which loading of subdirectories won't happen (they will be folded). Values start at 1.
:undolist display list of latest changes. Use "!" to see actual commands. See "Menus and dialogs" section for controls. :unlet remove one or more environment (‘$VAR‘) or global (‘g:global‘) variables. Use "!" to omit displaying warnings about nonexistent variables. :unselect unselect files in the given range (current file if no range is given). :unselect {pattern} unselect files that match specified pattern. Possible {pattern} forms are described in "Patterns" section below. Trailing slash for directories is taken into account, so ‘:unselect */‘ unselects directories. :unselect !{external command} unselect files from the list supplied by external command. Files are matched by full paths, relative paths are converted to absolute ones beforehand. :unselect //[iI] same as item above, but reuses last search pattern. :version show menu with version information. :vifm
:view toggle on and off the quick file view (preview of file's contents). See also 'quickview' option. :vie[w]! turn on quick file view if it's off. :volumes only for MS-Windows :vsplit switch to a two window vertical view. :vs[plit]! toggle window vertical splitting. :vs[plit] path split the window vertically to show both file directories. And changes other pane to path (absolute or relative to current directory of active pane). :wincmd same as running Ctrl-W [count] {arg}. :windo execute command for each pane (same as :winrun % command). :wingo navigate to a view by its id number. The {substr} part is used for completion (can be any number of words, only leading whitespace is removed). The view will become the current one by switching to the corresponding tab and pane. Matching is case sensitive substring search in view title or its full current path (with ‘˜‘ expanded regardless of any settings). :wingo {substr} this form navigates to a view that is uniquely identified by {substr} or errors. The form will not be used if the first word of {substr} is a valid number that starts with a digit (i.e., no ‘+‘ or ‘-‘ in front). :winrun execute command for pane(s),
which is determined by type argument: :write write current state to vifminfo and session files (if a session is active). :wq
:wqa[ll][!] same as :qall, but ! disables only the check of backgrounded commands, while state of the application is always written. :xall same as :qall. :xit same as :quit. :yank will yank files to the reg register. :map lhs rhs map lhs key sequence to rhs in normal and visual modes. :map! lhs rhs map lhs key sequence to rhs in command line mode. :amap :cmap :dmap :mmap :nmap
:qmap map lhs to rhs in navigation mode. :cm[ap] lhs rhs map lhs to rhs in command line mode. :dm[ap] lhs rhs map lhs to rhs in dialog modes. :mm[ap] lhs rhs map lhs to rhs in menu mode. :nm[ap] lhs rhs map lhs to rhs in normal mode. :qm[ap] lhs rhs map lhs to rhs in view mode. :vm[ap] lhs rhs map lhs to rhs in visual mode. :*map
:cm[ap] list all maps in command line mode. :dm[ap] list all maps in dialog modes. :mm[ap] list all maps in menu mode. :nm[ap] list all maps in normal mode. :qm[ap] list all maps in view mode. :vm[ap] list all maps in visual mode. :*map beginning list all maps in navigation mode that start with the beginning. :cm[ap] beginning list all maps in command line mode that start with the beginning. :dm[ap] beginning list all maps in dialog modes that start with the beginning. :mm[ap] beginning list all maps in menu mode that start with the beginning. :nm[ap] beginning list all maps in normal mode that start with the beginning. :qm[ap] beginning list all maps in view mode that start with the beginning. :vm[ap] beginning list all maps in visual mode that start with the beginning. :noremap map the key sequence lhs to rhs for normal and visual modes, but don't expand user mappings in rhs. :no[remap]! lhs rhs map the key sequence lhs to rhs for command line mode, but don't expand user mappings in rhs. :anoremap :cnoremap :dnoremap
:mnoremap :nnoremap :qnoremap map the key sequence lhs to rhs for navigation mode, but don't expand user mappings in rhs. :cno[remap] lhs rhs map the key sequence lhs to rhs for command line mode, but don't expand user mappings in rhs. :dn[oremap] lhs rhs map the key sequence lhs to rhs for dialog modes, but don't expand user mappings in rhs. :mn[oremap] lhs rhs map the key sequence lhs to rhs for menu mode, but don't expand user mappings in rhs. :nn[oremap] lhs rhs map the key sequence lhs to rhs for normal mode, but don't expand user mappings in rhs. :qn[oremap] lhs rhs map the key sequence lhs to rhs for view mode, but don't expand user mappings in rhs. :vn[oremap] lhs rhs map the key sequence lhs to rhs for visual mode, but don't expand user mappings in rhs. :unmap remove user mapping of lhs from normal and visual modes. :unm[ap]! lhs remove user mapping of lhs from command line mode. :aunmap :cunmap :dunmap
:munmap :nunmap :qunmap remove user mapping of lhs from navigation mode. :cu[nmap] lhs remove user mapping of lhs from command line mode. :du[nmap] lhs remove user mapping of lhs from dialog modes. :mu[nmap] lhs remove user mapping of lhs from menu mode. :nun[map] lhs remove user mapping of lhs from normal mode. :qun[map] lhs remove user mapping of lhs from view mode. :vu[nmap] lhs remove user mapping of lhs from visual mode. RangesThe ranges
implemented include: Examples: :%delete would delete all files in the directory. :2,4delete would delete the files in the list positions 2 through 4. :.,$delete would delete the files from the current position to the end of the filelist. :3delete4 would delete the files in the list positions 3, 4, 5, 6. If a backward range is given :4,2delete - an query message is given and user can chose what to do next. The builtin commands that accept a range are :d[elete] and :y[ank]. :command parametersSome of the
command-line commands accept parameters in the form of
‘-paramname‘. Arguments of such commands can be
split into two groups: parameters and positional arguments.
Items from the two groups cannot be interleaved and
parameters always come first. List of parameters is
terminated implicitly by the first argument that doesn't
start with a dash ("-") or explicitly via
"--" separator (needs to be a separate argument),
which is just discarded. These strict rules allow arbitrary
positional arguments, such as file names that start with a
dash. This parameter makes :copy, :move, :alink and :rlink automatically skip source files that already exist at the destination rather than refusing to perform the operation. Command macrosThe command macros may be used in user commands.
%rx %"rx Full paths to files in the register {x}. In case of invalid symbol in place of {x}, it's processed with the rest of the line and default register is used.
The following dimensions and coordinates are in characters:
Use %% if you need to put a percent sign in your command. Note that %i, %Iu, %IU, %m, %M, %n, %q, %s, %S, %u, %U and %v macros are mutually exclusive. Only the last one of them in the command will take effect. Note that %Pl and %Pz are mutually exclusive. Only the last one of them in the command will take effect. Note that a previewer containing %pd is considered a pass-through previewer, otherwise a previewer containing both %px and %py is considered to be a graphical previewer, the rest are treated as text previewers. You can use file name modifiers after %c, %C, %f, %F, %b, %d and %D macros. Supported modifiers are:
See ':h filename-modifiers' in Vim's documentation for the detailed description. Using %x means expand corresponding macro escaping all characters that have special meaning. And %"x means using of double quotes and escape only backslash and double quote characters, which is more useful on Windows systems. Position and quantity (if there is any) of %m, %M, %S or %s macros in the command is unimportant. All their occurrences are removed from the resulting command. %c and %f macros
are expanded to relative paths, while %C and %F are always
expanded to full paths. The same applies to %f and %F
implicitly used by %b. set the :move command to move all of the files selected in the current directory to the other directory. The %a macro is replaced with
any arguments given to an alias command. :com lsl !!ls -l %a - set the lsl command to execute ls -l with or without an argument. :lsl<Enter> will list the directory contents of the current directory. :lsl filename<Enter> will list only the given filename. The macros can also be used in
directly executing commands. ":!mv %f
You don't want to run terminal
commands, which require terminal input %m, %M, %s, %S, %u and %U macros cannot be combined with background mark (" &") as it doesn't make much sense. Command backgroundingFile system operations can take a lot of time to proceed. That's why vifm supports backgrounding them. To run :copy, :move or :delete command in background just append " &" to it. For each background operation a new thread is created. Job cancellation can be requested in the :jobs menu via dd shortcut. You can check if a command is still running in the :jobs menu. Backgrounded commands have progress instead of process id at the beginning of the line. Background operations cannot be undone. See "File copying" section below. CancellationNote that cancellation works somewhat different on Windows platform due to different mechanism of break signal propagation. One also might need to use Ctrl-Break shortcut instead of Ctrl-C. There are two types of operations that can be cancelled:
Note that vifm never terminates applications, it sends SIGINT signal and lets the application quit normally. When one of a set of operations is cancelled (e.g. copying of 5th file of 10 files), further operations are cancelled too. In this case undo history will contain only actually performed operations. Cancelled operations are indicated by "(cancelled)" suffix appended to information message on status bar. File system operations Currently the following commands can be cancelled: :alink, :chmod, :chown, :clone, :copy, :delete, :mkdir, :move, :restore, :rlink, :touch. File putting (on p/P key) can be cancelled as well. It's not hard to see that these are mainly long-running operations. Cancelling commands when they are repeated for undo/redo operations is allowed for convenience, but is not recommended as further undo/redo operations might get blocked by side-effects of partially cancelled group of operations. These commands can't be cancelled: :empty, :rename, :substitute, :tr. Mounting with FUSE It's not considered to be an error, so only a notification on the status bar is shown. External application calls Each of these operations can be cancelled: :apropos, :find, :grep, :locate. SelectionIf there is a selection, it's stashed before proceeding further unless file under the cursor is part of that selection. This means that when macros are expanded for :filetype or :filextype programs, ‘%f‘ and ‘%F‘ become equivalent to ‘%c‘ and ‘%C‘ respectively if current file is not selected. So you run selection by running one of selected files, otherwise you're running a single file even if there are other selected entries. When running a selection it must not include broken symbolic links, has to be consistent and set of file handlers must be compatible. Consistency means that selection contains either only directories (including links to them) or only files, but not their mix. Compatibility is a more sophisticated check, but it's defined in a natural way so that you get what you'd expect. The following properties of selection are taken into account while checking it for compatibility and deciding how to handle it:
- backgrounded
Patterns:highlight, :filetype, :filextype, :fileviewer commands and 'classify' option support globs, regular expressions and mime types to match file names or their paths. Directory paths get an implicit trailing slash on matching against a pattern, keep that in mind for globs or regular expressions that end with ‘$‘. There are six possible ways to write a single pattern:
First five forms can include leading exclamation mark that negates pattern matching. The last form is implicitly refers to one of others. :highlight does not accept undecorated form, while :filetype, :filextype, :fileviewer, :select, :unselect and 'classify' treat it as list of name globs. Path patterns receive absolute path of the file that includes its name component as well. To combine
several patterns (AND them), make sure you're using one of
the first five forms and write patterns one after another,
like this: :filetype,
:filextype and :fileviewer commands accept comma-separated
list of patterns instead of a single pattern, thus
effectively handling OR operation on them: Patterns with regular expressions Regular expression patterns are case insensitive by default, see description of commands, which might override default behaviour. Flags of regular
expressions mean the following: There are no implicit ‘ˆ‘ or ‘$‘, so make sure to specify them explicitly if the pattern should match the whole name or path. Patterns with globs "Globs" section below provides short overview of globs and some important points that one needs to know about them. Patterns with mime-types Mime type matching is essentially globs matching applied to mime type of a file instead of its name/path. Note: mime types aren't detected on Windows. Examples Associate ‘evince‘ to PDF-files only inside ‘/home/user/downloads/‘ directory (excluding its subdirectories): :filextype //ˆ/home/user/downloads/[ˆ/]*.pdf$// evince %f Regular expressionsAll regular expressions are modern/extended. See ‘man 7 regex‘ for more details on what's supported. The following
special sequences are additionally parsed: ‘\c‘ and ‘\C‘ have the highest priority in determining whether case is matched or not and exist to override 'ignorecase', 'smartcase' and ‘i‘/‘I‘ flags when necessary. If multiple sequences are present, the one which appears later takes precedence. Note that unlike in Vim character classes are affected by settings and sequences that control case sensitivity in regular expressions. GlobsGlobs are always case insensitive as it makes sense in general case. ‘*‘, ‘?‘, ‘[‘ and ‘]‘ are treated as special symbols in the pattern. E.g. :filetype * less %c matches all files. One can use character classes for escaping, so :filetype [*] less %c matches only one file name, the one which contains only asterisk symbol. ‘*‘ means any number of any characters (possibly an empty substring), with one exception: asterisk at the pattern beginning doesn't match dot in the first position. E.g. :fileviewer *.zip,*.jar zip -sf %c associates using of ‘zip‘ program to preview all files with ‘zip‘ or ‘jar‘ extensions as listing of their content, but ‘.file.zip‘ won't be matched. ‘?‘ means any character at this position. E.g. :fileviewer ?.out file %c calls ‘file‘ tool for all files which have exactly one character before their extension (e.g. a.out, b.out). Square brackets designate character class, which means that whole character class matches against any of characters listed in it. For example :fileviewer *.[ch] highlight -O xterm256 -s dante --syntax c %c makes vifm call ‘highlight‘ program to colorize source and header files in C language for a 256-color terminal. Equal command would be :fileviewer *.c,*.h highlight -O xterm256 -s dante --syntax c %c Inside square brackets ‘ˆ‘ or ‘!‘ can be used for symbol class negation and the ‘-‘ symbol to set a range. ‘ˆ‘ and ‘!‘ should appear right after the opening square bracket. For example :filetype *.[!d]/ inspect_dir associates ‘inspect_dir‘ as additional handler for all directories that have one character extension unless it's "d" letter. And :filetype [0-9].jpg sxiv associates ‘sxiv‘ picture viewer only for JPEG-files that contain single digit in their name. If you need to include literal comma, which normally separates multiple globs, double it. :set optionsLocal options These are kind of options that are local to a specific view. So you can set ascending sorting order for left pane and descending order for right pane. In addition to being local to views, each such option also has two values:
The idea is that current directory can be made a temporary exception to regular configuration of the view, until directory change. Use :setlocal for that. :setglobal changes view value not affecting settings until directory change. :set applies changes immediately to all values. 'aproposprg' type: string 'autocd' type: boolean 'autochpos' type: boolean When this option is enabled, more fine grained control over cursor position is available via 'histcursor' option. 'columns' 'co' type: integer 'caseoptions' type: charset At most one item of each pair takes affect, if both or more are present, only the last one matters. When none of pair's elements are present, the behaviour is default (depends on operating system for path completion and on values of 'ignorecase' and 'smartcase' options for file navigation). 'cdpath' 'cd' type: string list This option doesn't affect completion of :cd command. Example: set cdpath=˜ This way ":cd bin" will switch to "˜/bin" even if directory named "bin" exists in current directory, while ":cd ./bin" command will ignore value of 'cdpath'. 'chaselinks' type: boolean 'classify' type: string list Priority rules:
Either {prefix} or {suffix} or both can be omitted (which is the default for all unspecified file types), this means empty {prefix} and/or {suffix}. {prefix} and {suffix} should consist of at most eight characters. Elements are separated by commas. Neither prefixes nor suffixes are part of file names, so they don't affect commands which operate on file names in any way. Comma (',') character can be inserted by doubling it. List of file type names can be found in the description of filetype() function. 'confirm' 'cf' type: set 'cpoptions' 'cpo' type: charset 'cvoptions' type: set 'deleteprg' type: string 'dirsize' type: enumeration Size obtained via ga/gA overwrites this setting so seeing count of files and occasionally size of directories is possible. 'dotdirs' type: set Note that empty directories always contain "../" entry regardless of value of this option. "../" disappears at the moment at least one file is created. 'dotfiles' type: boolean 'fastrun' type: boolean 'fillchars' 'fcs' type: string list item default
used for An empty string for millersep or vborder is equivalent to a space. An empty string for hborder omits the horizontal border. Example: set fillchars=vborder:".",hborder:"",millersep:"|" 'findprg' type: string macro
value/meaning %A empty or
%u redirect
output to custom view instead of showing a menu Predicate in %a is "-name" on *nix and "-iname" on Windows. If both %u and %U are specified, %U is chosen. Some macros can
be added implicitly: The macros
slightly change their meaning depending on format of :find's
arguments: Starting with Windows Server 2003 a ‘where‘ command is available. One can configure vifm to use it in the following way: set findprg="where /R %s %A" As the syntax of this command is rather limited, one can't use :find command with selection of more than one item because the command ignores all directory paths except for the last one. When using find port on Windows, another option is to setup 'findprg' like this: set findprg="find %s %a" 'followlinks' type: boolean 'fusehome' type: string If you change this option, vifm won't remount anything. It affects future mounts only. See "Automatic FUSE mounts" section below for more information. 'gdefault' 'gd' type: boolean 'grepprg' type: string Optional %u or %U macro could be used (if both specified %U is chosen) to force redirection to custom or unsorted custom view respectively. See 'findprg' option for description of difference between %a and %A. Example of setup to use ack (http://beyondgrep.com/) instead of grep: set grepprg='ack -H -r %i %a %s' or The Silver Searcher (https://github.com/ggreer/the_silver_searcher): set grepprg='ag --line-numbers %i %a %s' 'histcursor' type: set This option has no effect when 'autochpos' is disabled. Note that the list is not exhaustive and there are other situations when cursor is positioned automatically. 'history' 'hi' type: integer vifm-'hloptions' type: string list item default
The
"filehi" item specifies which columns of the view
get colored according to file type and its name: 'hlsearch' 'hls' type: boolean
default: false 'ignorecase' 'ic' type: boolean 'incsearch' 'is' type: boolean 'iooptions' type: set 'laststatus' 'ls' type: boolean 'lines' type: integer 'locateprg' type: string Optional %u or %U macro could be used (if both specified %U is chosen) to force redirection to custom or unsorted custom view respectively. 'mediaprg' type: string The command can
be passed the following parameters: The output of
‘list‘ subcommand is parsed in search of lines
that start with one of the following prefixes: All other lines are ignored. Each ‘device=‘ starts a new section describing a device which should include two other possible prefixes. ‘list‘ subcommand is assumed to always succeed, while exit code of ‘mount‘ and ‘unmount‘ is taken into account to determine whether operation was performed successfully. 'lsoptions' type: string list Configures ls-like view. item used for
'lsview' type: boolean 'milleroptions' type: string list Configures miller view. item default
used for *size specifies ratios of columns. Each ratio is in the range from 0 to 100 and values are adjusted to fit the limits. Zero disables a column, but central (main) column can't be disabled. rpreview specifies what file-system objects should be previewed in the right column and takes three values: dirs (only directories), files (only files) or all. Neither value enables preview of parent directory (".."). Example of two-column mode which is useful in combination with :view command: set milleroptions=lsize:1,csize:2 'millerview' type: boolean 'mintimeoutlen' type: integer 'mouse' type: charset Contains a
sequence of single-character flags: 'navoptions' type: string list Configures behaviour of navigation mode. item default
The "open" item specifies what file-system objects should be opened on Enter and can take two values: dirs (only directories) or all. 'number' 'nu' type: boolean 'numberwidth' 'nuw' type: integer 'previewoptions' type: string list Tweaks how previewing is done (in quick view, miller view's column and view mode). item default
meaning graphicsdelay is needed if terminal requires some timeout before it can draw graphics (otherwise it gets lost). hardgraphicsclear seems to be necessary to get rid of sixel graphics in some terminals, where it otherwise lingers. This can cause flicker on the screen due to erasure followed by redrawing. 0 for maxtreedepth means "unlimited", 1 will only show selected directory, 2 adds its children, and so forth. Default value is used when item is missing from the option. 'previewprg' type: string External command to be used instead of preview programs configured via :fileviewer command. Example: " always
show git log in preview of files inside some repository 'quickview' type: boolean 'relativenumber' 'rnu' type: boolean nonumber number norelativenumber
| first | 1 first relativenumber
| 1 first | 1 first 'rulerformat' 'ruf' type: string Percent sign can be followed by optional minimum field width. Add '-' before minimum field width if you want field to be right aligned. Optional blocks are ignored unless at least one macro inside of them is expanded to a non-empty value. Example: set rulerformat='%2l-%S%[ +%x%]' 'runexec' type: boolean 'scrollbind' 'scb' type: boolean 'scrolloff' 'so' type: integer 'sessionoptions' 'ssop' sessionoptions ssop 'shell' 'sh' type: string 'shellcmdflag' 'shcf' type: string Note that using this option to force interactive mode of the shell is most likely a BAD IDEA. In general interactive host and interactive child shell can't share the same terminal session. You can't even run such a shell in background. Consider writing a wrapper for your shell that preloads aliases and commands without making the shell interactive and ending up using it in a way it was not meant to be used. Note that this option is ignored when 'shell' is set to PowerShell due to the internal use of ‘-encodedCommand‘. 'shortmess' 'shm' type: charset 'showtabline' 'stal' type: enumeration Alternatively 0, 1 and 2 Vim-like values are also accepted and correspond to "never", "multiple" and "always" respectively. 'sizefmt' type: string list item value
meaning Numbers are rounded from zero. Trailing zeros are dropped. Example: set sizefmt=units:iec,precision:2,nospace 'slowfs' type: string list Example for autofs root /mnt/autofs: set slowfs+=/mnt/autofs 'smartcase' 'scs' type: boolean
default: +name on *nix and
+iname on Windows Note: look for st_atime, st_ctime and st_mtime in "man 2 stat" for more information on time keys. '+' means ascending sort for this key, and '-' means descending sort. "dir" key is somewhat similar in this regard but it's added implicitly: when "dir" is not specified, sorting behaves as if it was the first key in the list. That's why if one wants sorting algorithm to mix directories and files, "dir" should be appended to sorting option, for example like this: set sort+=dir or set sort=-size,dir Value of the option is checked to include dir key and default sorting key (name on *nix, iname on Windows). Here is what happens if one of them is missing:
all other keys are left untouched (at most they are moved). This option also changes view columns according to primary sorting key set, unless 'viewcolumns' option is not empty. 'sortnumbers' type: boolean 'sortgroups' type: string The regular expressions are used to extract substrings of file names to serve as keys for sorting. It is essentially a way to ignore uninteresting parts of file names during sorting by name. Each expression should contain at least one group or its value will be considered to be always empty. Also, only the first match of regular expression is processed. The first group divides list of files into sub-groups, each of which is then sorted by substrings extracted using second regular expression and so on recursively. Example: 'sortorder' type: enumeration 'statusline' 'stl' type: string
Percent sign can be followed by optional minimum field width. Add '-' before minimum field width if you want field to be right aligned. On Windows file
properties include the following flags (upper case means
flag is on): Example without colors: set statusline=" %t%= %A %10u:%-7g %15s %20d %{&sort} " Example with colors: highlight User1
ctermbg=yellow 'suggestoptions' type: string list 'syncregs' type: string 'syscalls' type: boolean 'tablabel' type: string When empty, tab label is set to either tab name for named tabs or to view title (usually current path) for unnamed tabs. The following macros can appear in the format (see below for what a flag is):
In global tabs the view in bullets above refers to currently active view of that tab. Flag macros are a special kind of macros that always expand to an empty value and are meant to be used inside optional blocks to control their visibility. Optional blocks are ignored unless at least one macro inside of them is expanded to a non-empty value or is a set flag macro. " %[(%n)%]
-- optional name of the tab 'tabline' 'tal' type: string The following macros can appear in the format:
'tabprefix' type: string 'tabscope' type: enumeration 'tabstop' 'ts' type: integer 'tabsuffix' type: string 'timefmt' type: string 'timeoutlen' 'tm' type: integer 'title' type: boolean 'trash' type: boolean 'trashdir' type: string On *nix, if
element ends with "%u", the mark is replaced with
real user ID and permissions are set so that only that owner
is able to use it. When new file gets cut (deleted) vifm traverses each element of the option in the order of their appearance and uses first trash directory that it was able to create or that is already writable. Default value tries to use trash directory per mount point and falls back to trash common trash directory on failure. Will attempt to create the directory if it does not exist. See "Trash directory" section below. 'tuioptions' 'to' type: charset Each pane title contains the path of the listed directory. If too large, the path is truncated on the left for the active pane and on the right for the other pane. This can be modified with: l - truncation
is always on the left. 'uioptions' type: set 'undolevels' 'ul' type: integer 'vicmd' type: string Background flag is ignored in certain context where vifm waits for the editor to finish. Such contexts include any command that spawns editor to change list of file names or a command, with :rename being one example. ‘-f‘ is also appended to prevent forking in such cases, so the command needs to handle the flag. Additionally ‘+{num}‘ and ‘+'call cursor()'‘ arguments are used to position cursor when location is known. 'viewcolumns' type: string An example of setting the options for both panes (note :windo command): windo set viewcolumns=-{name}..,6{size},11{perms} 'vixcmd' type: string 'vifminfo' type: set bmarks - named
bookmarks (see :bmark command) chistory -
command line history commands - user
defined commands (see :command description) (obsolete) 'vimhelp' type: boolean 'wildinc' type: string " for all
:commands See "Patterns" and "Globs" sections for more information on syntax. 'wildmenu' 'wmnu' type: boolean 'wildstyle' type: enumeration 'wordchars' type: string list The option affects Alt-D, Alt-B and Alt-F, but not Ctrl-W. This is intentionally to allow two use cases: - Moving by
WORDS and deletion by words. To get the latter use the following mapping: cnoremap <c-w> <a-b><a-d> Also used for abbreviations.
default: true 'wrapscan' 'ws' type: boolean MappingsA user mapping like ‘nnoremap lhs rhs‘ defines a substitution of the left-hand-side (LHS) with the right-hand-side (RHS) in the input stream. A regular mapping (without "nore" in :command's name) expands recognized sequences in the RHS, while "*noremap" mapping always interprets RHS as if no user mappings were defined and each key has its builtin meaning. In most cases you want to use noremap variant and if your RHS includes LHS, only noremap variant will work because recursion in a mapping is not allowed. In order to define a mapping determine in which mode you want to activate it and use an appropriate "*noremap" :command (e.g., :nnoremap for a normal mode mapping). RHS doesn't have to limit itself to the mode in which the mapping was started and can span multiple modes. Map arguments LHS of mappings
can be preceded by arguments which take the form of special
sequences: Postpone UI updates until RHS is completely processed.
nnoremap
<wait> tw :set wrap!<cr> Special sequences Since it's not easy to enter special characters there are several special sequences that can be used in place of them. They are:
<space> Space key.
<tab> <s-tab> Tabulation and Shift+Tabulation keys. <home> <end> Home/End. <left> <right> <up> <down> Arrow keys. <pageup> <pagedown> PageUp/PageDown. <del> <delete> Delete key. <del> and <delete> mean different codes, but <delete> is more common. <insert> Insert key. <s-home> <s-end>
Shift + one of the keys from above, if terminal and its terminfo supports it. <c-a>,<c-b>,...,<c-z>,<c-[>,<c->,<c-]>,<c-ˆ>,<c-_> Control + some key (see key conflict description below). <c-@> {only for *nix} Control + Space. <a-a>,<a-b>,...,<a-z>
Alt + some key. <a-s-a>,<a-s-b>,...,<a-s-z>
{only for *nix} Alt + Shift + some key. <a-c-a>,<a-c-b>,...,<a-c-z>
{only for *nix} Alt + Ctrl + some key. <f0> - <f63> functional keys. These also correspond to keys like <c-f1> and can be used in their place. <c-f1> - <c-f12> functional keys with Control key pressed. <a-f1> - <a-f12>, <m-f1> - <m-f12> functional keys with Alt key pressed. <s-f1> - <s-f12> functional keys with Shift key pressed. Note that whether and how functional keys work might depend on the terminal and corresponding terminfo record. Note that due to the way terminals process their input, several keyboard keys might be mapped to single key code, for example:
Most of the time they are defined consistently and don't cause surprises, but <c-h> and <bs> are treated differently in different environments (although they match each other all the time), that's why they correspond to different keys in vifm. As a consequence, if you map <c-h> or <bs> be sure to repeat the mapping with the other one so that it works in all environments. Alternatively, provide your mapping in one form and add one of the following: " if
mappings with <c-h> in the LHS work Also sometimes neither of them might work and it's <del> key which corresponds to your backspace (don't mind the name). Whitespace vifm removes whitespace characters at the beginning and end of commands. That's why you may want to use <space> at the end of rhs in mappings. For example: cmap <f1> man<space> will put "man " in line when you hit the <f1> key in the command line mode. Expression syntaxSupported expressions is a subset of what VimL provides. Expression syntax summary, from least to most significant: expr1 expr2 expr2 expr3 expr3 expr4 expr4 expr5 expr5 expr6 expr6 expr7 expr7 number
number constant ".." indicates that the operations in this level can be concatenated. expr1 Arguments are converted to numbers before evaluation. Result is non-zero if at least one of arguments is non-zero. It's right associative and with short-circuiting, so sub-expressions are evaluated from left to right until result of whole expression is determined (i.e., until first non-zero) or end of the expression. expr2 Arguments are converted to numbers before evaluation. Result is non-zero only if both arguments are non-zero. It's right associative and with short-circuiting, so sub-expressions are evaluated from left to right until result of whole expression is determined (i.e., until first zero) or end of the expression. expr3 Compare two expr4 expressions, resulting in a 0 if it evaluates to false or 1 if it evaluates to true. equal == Examples: 'a' == 'a' == 1
expr4 Examples: 1 + 3 - 3 == 1
expr5 Examples: 'a' . 'b' ==
'ab' expr6 - expr6 unary
minus For '-' the sign
of the number is changed. A String will be converted to a Number first. These operations can be repeated and mixed. Examples: --9 == 9 expr7 number number
constant Decimal number. Examples: 0 == 0 string Note that double quotes are used. A string
constant accepts these special characters: Examples: "\"Hello,\tWorld!\""
literal-string
Note that single quotes are used. This string is taken as it is. No backslashes are removed or have a special meaning. The only exception is that two quotes stand for one quote. Examples: 'All\slashes\are\saved.'
option Examples: echo 'Terminal
size: '.&columns.'x'.&lines Any valid option name can be used here (note that "all" in ":set all" is a pseudo option). See ":set options" section above. environment
variable The String value of any environment variable. When it is not defined, the result is an empty string. Examples: 'This is my
$PATH env: ' . $PATH global variable
A typed storage of data for use in scripting. Can be created/removed dynamically (via :let and :unlet) and used in expressions. builtin variable
Information exposed by vifm for use in scripting. Such variables are predefined and read-only, but not necessarily constant. v:count
function call
See "Functions" section below. Examples: "'" .
filetype('.') . "'" expression
nesting Groups any other expression of arbitrary complexity enforcing order in which operators are applied. FunctionsUSAGE RESULT DESCRIPTION chooseopt({opt})
String Queries choose parameters passed on startup. chooseopt({opt}) Retrieves values
of options related to file choosing. {opt} can be one of:
escape({string},{chars}) Escapes all occurrences of {chars} in the {string} by prepending slash (‘`) to them. Note that the slash itself is not escaped unless it appears in {chars}. executable({expr}) If {expr} is absolute or relative path, checks whether path destination exists and refers to an executable, otherwise checks whether command named {expr} is present in directories listed in $PATH. Checks for various executable extensions on Windows. Returns boolean value describing result of the check. Example: " use
custom default viewer script if it's available and installed
expand({expr}) Expands environment variables and macros in {expr} (in this order). Returns a string. See "Command macros" section above. Examples: " percent
sign extcached({cache}, {path}, {extcmd}) Caches value of {extcmd} external command automatically updating it as necessary based on monitoring change date of a {path}. The cache is invalidated when file or its meta-data is updated. A single path can have multiple caches associated with it. {path} value is normalized, but symbolic links in it aren't resolved. Example: " display
number and size of blocks actually used by a file or
directory filereadable({path}) Checks whether {path} exists and refers to a non-directory entry and its permissions allow reading. Returns boolean value describing result of the check. filetype({file} [, {resolve}]) Checks type of a view's entry or of a file specified by its path. Parameter {file}
can be of the following forms: Optional parameter {resolve} is treated as a boolean and specifies whether symbolic links should be resolved. The result is a
string, which represents file type and is one of the list:
The result can also be an empty string in case of invalid argument. fnameescape({expr}) Escapes parameter to make it suitable for use as an argument of a :command. List of escaped characters includes %, which is doubled. Usage example: " navigate
to most recently modified file in current directory getpanetype() Retrieves string
describing type of current pane. Possible return values:
has({property}) Allows examining
internal parameters from scripts to e.g. figure out
environment in which application is running. Returns 1 if
property is true/present, otherwise 0 is returned. Currently
the following properties are supported (anything else will
yield 0): Usage example: " skip
user/group on Windows execute 'set' 'statusline=" %t%= %A '.$RIGHTS.'%15E %20d "' input({prompt} [, {initial} [, {completion}]]) Creates a command-line prompt to obtain user's input. Initial value can be supplied as an optional second parameter, otherwise empty string is used. Optional third
parameter specifies kind of completion, which can be one of:
Note that
behaviour differs from Vim where executing a mapping like
Usage example: nnoremap ,m :
let $DIR_NAME = input('mkdir: ', '', 'dir') layoutis({type}) Checks whether
current interface layout is {type} or not, where {type} can
be: Usage example: "
automatically split vertically before enabling preview paneisat({loc}) Checks whether
position of active pane in current layout matches one of the
following locations: selected() Retrieves number of files selected in the active pane. system({command}) Runs the command in shell and returns its output (joined standard output and standard error streams). All trailing newline characters are stripped to allow easy appending to command output. Ctrl-C should interrupt the command. Use this function to consume output of external commands that don't require user interaction and term() for interactive commands that make use of terminal and are capable of handling stream redirection. Usage example: " command
to enter .git/ directory of git-repository (when ran inside
one) tabpagenr([{arg}]) When called without arguments returns number of current tab page base one. When called with "$" as an argument returns number of the last tab page base one, which is the same as number of tabs. term({command}) Same as system() function, but user interface is shutdown during the execution of the command, which makes sure that external interactive applications won't affect the way terminal is used by vifm. Usage example: " command
to change directory by picking it via fzf Menus and dialogsWhen navigating to some path from a menu there is a difference in the end location depending on whether the path has a trailing slash. Files normally don't have trailing slashes so "file/" won't work. In case of directories there are two options: navigate to a directory or inside of it. To allow both use cases, the first action is taken for "dir" and the second one for "dir/". Menu commands :range
navigate to a menu line. display menu of saved menus. See "Menus and dialogs" section for controls, also see "Menus history" section. :colder load an older navigation menu if there is one. See also "Menus history" section. :cnewer load a newer navigation menu if there is one. See also "Menus history" section. :find the behaviour matches that of non-menu :find except that no range is accepted. If active view contained selection before entering menu mode, the command takes it into account. :grep the behaviour matches that of non-menu :grep except that no range is accepted. If active view contained selection before entering menu mode, the command takes it into account. :exi[t][!]
leave the menu mode. :noh[lsearch] reset search match highlighting. :w[rite] {path} write all menu lines into the file specified by {path}. Common keys
of all menus and dialogs move the cursor down. k, Ctrl-P move the cursor up.
Escape,
Ctrl-C close menu/dialog. Common keys of all menus Ctrl-B,
Ctrl-F these keys have the same meaning as in normal mode. [count]zh scroll menu items [count] characters (1 by default) to the right. [count]zl scroll menu items [count] characters (1 by default) to the left.
Navigation menus This applies to
the following menus:
Note that each of these menus can have additional keys, see below. History menus
(:history *) execute the item as a command-line command, search query or local filter.
Directory
history menu navigate into the selected directory. Menu commands history menu
execute command without leaving the menu.
Other menus
Apropos
(:apropos) menu run man on a given topic. Menu won't be closed automatically to allow viewing several pages one by one. Bookmarks
(:bmarks, :bmgo) menu navigate to the selected bookmark.
See above for "gf" and "e" keys. Command-line mode abbreviations (:cabbrev) menu
Color scheme
(:colorscheme) menu apply selected colorscheme as if ":colorscheme <name>" was executed on the command-line. Commands
(:command) menu execute the command with empty arguments (%a macro).
Directory
stack (:dirs) menu rotate the stack to put selected directory pair at the top. File (:file) menu Commands from vifmrc or typed on the command-line are displayed above an empty line if it's present. All commands below the empty line come from .desktop files. Commands
detected as available have "[present]" to the left
of them. run selected command (regardless whether it was detected to be present or not).
Grep (:grep)
menu open file in an editor set by 'vicmd' at given line number. Menu won't be closed automatically to allow viewing more than one result. See above for "gf", "e" and "c" keys. Jobs (:jobs) menu
Marks
(:marks) menu navigate to selected mark.
Media
(:media) menu behaviour is different for
different kinds of lines:
Menus history
(:chistory) menu load selected menu. Plugins (:plugins) menu
Trash (:lstrash) menu
Trashes
(:trashes) menu navigate into current trash directory.
Undolist (:undolist) menu
User menu without navigation (%m macro)
Volumes
(:volumes) menu navigate into the root of the selected drive. Dialog-specific
operations Attributes
(permissions or properties) dialog check/uncheck.
Possible item states:
Fileinfo
(Ctrl-G) dialog close the dialog. Sort (:sort)
dialog switch ascending/descending order.
There is also a shortcut per sorting key (drawn on the dialog). Menus historyMenus are often used to present results of operations (like finding or grepping files). Once closed they can be recreated by repeating a command, but it might be inconvenient (require changing directory, finding the command and possibly finding position in a menu) and time consuming to re-run the operation. To make referring to older menus possible, vifm stores up to 25 last such menus and provides means for recalling them using familiar set of Vim commands. As already hinted above, this doesn't apply to every menu because things like :version or :commands rely solely on internal data and don't need to be saved. Only menus that are derived from external sources and support navigation (like via gf) are remembered. Navigating through history Re-opening the last viewed menu of relevant type is done by running :copen command. Once opened :colder can be used to view older menus and :cnewer to view newer ones. Closing a menu after moving through the history remembers the position such that running :copen again will open the last viewed menu and allow one to continue exploring history in both directions. The history always contains menus sorted from oldest to newest. After opening more than 25 menus the oldest one is likely to be forgotten. It's not guaranteed to happen because after viewing an older menu new entry replaces all more recent ones. As an example, assume the history looks like this: 1. :find 1 Running ‘:find 11‘ results in: 1. :find 1 For convenience,
:colder and :cnewer can be used any time you're in a menu,
not just after :copen. :cnewer will work only if current
menu can't be saved and you've moved back in menus history
before. Behaviour of :colder is like this: Viewing history In order to avoid enumerating menus looking for the matching one, :chistory command can be used to get an overview of saved menus, maybe search for one and then open it. The command is also available in menu mode. Related topics Commands: :chistory, :copen Menu commands: :chistory, :colder, :cnewer Custom viewsDefinition Normally, file views present a list of files from a single directory, but sometimes it's useful to populate them with files from unrelated locations. This is what custom views are mainly for. Presentation Custom views are still related to the directory they were in before custom list was loaded. Path to that directory (original directory) can be seen in the title of a custom view. Files in the same directory have to be named differently but custom views are free from this constraint, hence seeing file names alone might be rather confusing. In order to give an idea where files come from paths relative to the original directory of the view are used, when that's not possible full paths are shown. Custom views normally don't contain any inexistent files. Navigation/exiting Navigation in custom views somewhat differs compared to regular views. gf - acts
similar to gf on symbolic links and navigates to the file at
its real h - goes to the
closest parent node in the tree view or terminates the
custom gh - terminates the custom view returning to the original directory. Going to the parent directory in other ways (whether by opening ".." entry or executing ‘:cd ..‘) also causes termination and return to the original location. All other ways of changing location (e.g., marks, bookmarks, :cd, :sync) also cause termination of the custom view. History Custom list exists only while it's visible, once left one can't return to it, so there is no traces of it in any history. Filters Only local filter affects contents of the view. This is intentional. Presumably, if one loads a particular list, precisely that list should be displayed (except for inexistent paths, which are ignored). Search Although directory names are visible in listing, they are not searchable. Only file names are taken into account (might be changed in the future, searching whole lines seems quite reasonable). Sorting Contrary to search sorting by name works on whole visible part of file path. Highlight Whole file name is highlighted as one entity, even if there are directory elements. Updates Reloads can occur, though they are not automatic due to files being scattered among different places. On a reload inexistent files are removed and meta-data of all other files is updated. Once custom view forgets about the file, it won't add it back even if it's created again. So not seeing file previously affected by an operation which was later undone is normal. Operations All operations that add files are forbidden for custom views. For example, moving/copying/putting files into a custom view doesn't work, because that's not a real file system location. On the other hand, operations that use files of a custom view as a source (e.g., yanking, copying, moving file from a custom view, deletion) and operations that modify names are all allowed. Compare viewsKinds :compare can
produce four different results depending on arguments: The first two display files of a single file system tree. Here duplicates are files that have at least one copy in the same tree. The other two kinds of operation compare two trees, in which duplicates are files that are found in both trees. Lists of unique files are presented in custom views because there is no file grouping to preserve as all file ids are guaranteed to be distinct. See "Custom views" section. Creation Arguments passed to :compare form seven categories each with its own prefix and is responsible for particular property of the operation. Which files to
compare: How files are
compared: Which files to
display: How results are
grouped (has no effect if "ofone" specified): Which files to
omit: Comparison
tweaks: Which results to
show (has no effect for single pane comparison): Each argument can appear multiple times, the rightmost one of the group defines the behaviour. All arguments alter default behaviour instead of substituting it. When neither "withicase" nor "withrcase" is specified, case depends on the running operating system and the file system on which the files are located. Exiting Comparing two views results in them entering a special state implemented on top of custom views. Both views leave this state when either of them stops being custom. Custom views terminate on changing to a different location or as a result of a command like :regular, going into the parent directory (like with h key or ‘:cd ..‘ command) returns to a regular state without changing the location. See "Custom views" section for more details. Examples The defaults correspond to probably the most common use case of comparing files in two trees with grouping by paths, so the following are equivalent: :compare Another use case is to find duplicates in the current sub-tree: :compare listdups ofone The following command lists files that are unique to each pane: :compare listunique Look The view can't switch to ls-like view as it's unable to display diff-like data. Comparison views have second column displaying id of the file, files with the same id are considered to be equal. The view columns configuration is predefined. The status bar displays only the initial result of the comparison and can be out of date. Behaviour When two views
are being compared against one another the following changes
to the regular behaviour apply: One compare view has similar properties (those that are applicable for single pane). Files are
gathered in this way: StartupOn startup vifm determines several variables that are used during execution. They are determined in the order they appear below. On *nix systems
$HOME is normally present and used as is. On Windows systems
vifm tries to find correct home directory in the following
order: vifm tries to
find correct configuration directory by checking the
following places: vifm tries to
find correct configuration file by checking the following
places: ConfigureSee "Startup" section above for the explanations on $VIFM and $MYVIFMRC. The vifmrc file contains commands that will be executed on vifm startup. There are two such files: global and local. Global one is at {prefix}/etc/vifm/vifmrc, see $MYVIFMRC variable description for the search algorithm used to find local vifmrc. Global vifmrc is loaded before the local one, so that the later one can redefine anything configured globally. Use vifmrc to set settings, mappings, filetypes etc. To use multi line commands precede each next line with a slash (whitespace before slash is ignored, but all spaces at the end of the lines are saved). For example: set equals "setsmartcase". When set<space
here> equals "set smartcase". The $VIFM/vifminfo file contains generic state of the application. You can control what is stored in vifminfo by setting 'vifminfo' option. Vifm always writes this file on exit unless 'vifminfo' option is empty. Marks, bookmarks, commands, histories, filetypes, fileviewers and registers in the file are merged with vifm configuration (which has bigger priority). Generally, runtime configuration has bigger priority during merging, but there are some exceptions:
The $VIFM/scripts directory can contain shell scripts. vifm modifies its PATH environment variable to let user run those scripts without specifying full path. All subdirectories of the $VIFM/scripts will be added to PATH too. Script in a subdirectory overlaps script with the same name in all its parent directories. The $VIFM/colors/ and {prefix}/etc/vifm/colors/ directories contain color schemes. Available color schemes are searched in that order, so on name conflict the one in $VIFM/colors/ wins. Each color scheme should have ".vifm" extension. This wasn't the case before and for this reason the following rules apply during lookup:
SessionsSessions provide a way to have multiple persistent runtime configurations. Think of them as second-level vifminfo files in addition to the first-level one used by all sessions. In other words, they aren't a replacement for vifminfo file that exists without sessions, but an addition to it. One can empty 'vifminfo' option and rely solely on sessions, but in practice one might want to share some state among instances in different sessions or have an "out-of-sessions" state for tasks that don't deserve a session of their own. This leads to a two-level structure where data in session files has higher priority than data in vifminfo files (where this makes sense) following the same rules that merging of vifminfo file obeys. In addition to that, history items from session files are never ordered before history items from vifminfo file. Format Sessions have the format of vifminfo files, they do not consist of sequence of command-line commands and are not meant to be sourced via :source command. Storage and naming ‘$VIFM/sessions/‘ directory serves as a storage for sessions. Consequently names should be valid filenames. The structure of the storage is flat meaning that there are no subdirectories, that's why names of sessions can't contain slashes. Usage model Contrary to Vim, vifm automates basic management of sessions. You can start, switch, stop or delete a session using builtin means. Current session is saved at the same time vifminfo is saved (on normal exits or explicitly on :write command) and right before switching to another session. To avoid saving in those cases use :session command to detach (without saving) from a session before proceeding. Related topics Commands:
:session, :delsession Automatic FUSE mountsvifm has a builtin support of automated FUSE file system mounts. It is implemented using file associations mechanism. To enable automated mounts, one needs to use a specially formatted program line in filetype or filextype commands. These use special macros, which differ from macros in commands unrelated to FUSE. Currently three formats are supported: 1) FUSE_MOUNT This format should be used in case when all information needed for mounting all files of a particular type is the same. E.g. mounting of tar files don't require any file specific options. Format line:
Example filetype command: :filetype FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR 2) FUSE_MOUNT2 This format allows one to use specially formatted files to perform mounting and is useful for mounting remotes, for example remote file systems over ftp or ssh. Format line:
Example filetype command: :filetype *.ssh FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR Example file content: 3) FUSE_MOUNT3 This format is equivalent to FUSE_MOUNT, but omits unmounting. It is useful for cases, when unmounting isn't needed, like when using AVFS. Example :filetype command: :filetype
*.tar,*.tar.bz2,*.tbz2,*.tgz,*.tar.gz,*.tar.xz,*.txz,*.deb
Example ‘mount-avfs‘ helper script: #!/bin/sh dest=$1 rmdir
"$dest" All % macros are
expanded by vifm at runtime and have the following meaning:
%FOREGROUND is an optional macro. Other macros are not mandatory, but mount commands likely won't work without them. %CLEAR is obsolete name of %FOREGROUND, which is still supported, but might be removed in future. Its use is discouraged. Unlike macros elsewhere, these are recognized only if they appear at the end of a command or are followed by a space. There is no way to escape % either. These are historical limitations, which might be addressed in the future. The mounted FUSE file systems will be automatically unmounted in two cases:
View lookvifm supports displaying of file list view in two different ways:
The look is local for each view and can be chosen by changing value of the 'lsview' boolean option. Depending on view look some of keys change their meaning to allow more natural cursor moving. This concerns mainly h, j, k, l and other similar navigation keys. Also some of options can be ignored if they don't affect view displaying in selected look. For example value of 'viewcolumns' when 'lsview' is set. ls-like viewWhen this view look is enabled by setting 'lsview' option on, vifm will display files in multiple columns. Number of columns depends on the length of the longest file name present in current directory of the view. Whole file list is automatically reflowed on directory change, terminal or view resize. View looks close to output of ‘ls -x‘ command, so files are listed left to right in rows. In this mode file manipulation commands (e.g. d) don't work line-wise like they do in Vim, since such operations would be uncommon for file manipulation tasks. Thus, for example, dd will remove only current file. By default the view is filled by lines, 'lsoptions' can be used to get filling by columns. Note that tree-view and compare view inhibit ls-like view. Column viewView columns are
described by a comma-separated list of column descriptions,
each of which has the following format So it basically
consists of four parts: Alignment specifier It's an optional minus or asterisk sign as the first symbol of the string. Specifies type of text alignment within a column. Three types are supported:
set viewcolumns=-{name}
set viewcolumns={name}
It's like left alignment, but when the text is bigger than the column, it is cut in the middle (so the start and the end of the field are always visible). set viewcolumns=ˆ{name}
It's like left alignment, but when the text is bigger than the column, the alignment is made at the right (so the part of the field is always visible). set viewcolumns=*{name} Width specifier It's a number followed by a percent sign, two numbers (second one should be less than or equal to the first one) separated with a dot or a single number. Specifies column width and its units. There are three size types:
set viewcolumns=-100{name},20.15{ext} results in two columns with lengths of 100 and 20 and a reserved space of five characters on the left of second column.
set viewcolumns=-80%{name},15%{ext},5%{mtime} results in three columns with lengths of 80/100, 15/100 and 5/100 of view width.
set viewcolumns=-{name},{ext},{mtime} results in three columns with length of one third of view width. There is no size adjustment to content, since it will slow down rendering. Columns of different sizing types can be freely mixed in one view. Though sometimes some of columns can be seen partly or be completely invisible if there is not enough space to display them. Column contents This is usually a sorting key surrounded with curly braces, e.g. {name},{ext},{mtime} {name} and {iname} types are the same and are both present for consistency with 'sort' option. The following column types don't have corresponding sorting keys:
Empty curly braces ({}) are replaced with the default secondary column for primary sort key. So after the next command view will be displayed almost as if 'viewcolumns' was empty, but adding ellipsis for long file names: set viewcolumns=-{name}..,6{}. The last kind of column value is a string literal. The literal is used as a column value for every row. The syntax is "{#literal}", examples: "
double-character pseudo-padding on both sides This can be used to draw column separators. Mind that for convenience literals have different defaults: truncation and automatically determined absolute size, which is what you usually want for them. Make sure to quote or escape spaces, vertical bars and other special symbols when using them as part of literals. Cropping specifier It's from one to three dots after closing curly brace in column format. Specifies type of text truncation if it doesn't fit in the column. Currently three types are supported:
set viewcolumns=-{name}. results in truncation of names that are too long too fit in the view.
set viewcolumns=-{name}.. results in that ellipsis are added at the end of too long file names.
set viewcolumns=-{name}...,{ext} results in that long file names can partially be written on the ext column. Color schemesThe color schemes in vifm can be applied in two different ways:
Both types are set using :colorscheme command, but of different forms:
Look of different parts of the TUI (Text User Interface) is determined in this way:
There might be a set of local color schemes because they are structured hierarchically according to file system structure. For example, having the following piece of file system: ˜ Two color schemes: #
˜/.config/vifm/colors/for_bin.vifm #
˜/.config/vifm/colors/for_bin_my.vifm And these three commands in the vifmrc file: colorscheme
Default File list will look in the following way for each level:
black background
red background
red background Trash directoryvifm has support of trash directory, which is used as temporary storage for deleted files or files that were cut. Using trash is controlled by the 'trash' option, and exact path to the trash can be set with 'trashdir' option. Trash directory in vifm differs from the system-wide one by default, because of possible incompatibilities of storing deleted files among different file managers. But one can set 'trashdir' to "˜/.local/share/Trash" to use a "standard" trash directory. There are two scenarios of using trash in vifm:
The first scenario uses deletion ("d") operations to put files to trash and put ("p") operations to restore files from trash directory. Note that such operations move files to and from trash directory, which can be long term operations in case of different partitions or remote drives mounted locally. The second scenario uses deletion ("d") operations for moving files to trash directory and :empty command-line command to purge all previously deleted files. Deletion and put operations depend on registers, which can point to files in trash directory. Normally, there are no nonexistent files in registers, but vifm doesn't keep track of modifications under trash directory, so one shouldn't expect value of registers to be absolutely correct if trash directory was modified not by operation that are meant for it. But this won't lead to any issues with operations, since they ignore nonexistent files. File copyingFor enabling copy-on-write of BTRFS on Linux, set "fastfilecloning" flag of 'iooptions' option. File copying within an XFS file system uses reflinks by default. Any file copied from another file system will be copied without reflinks even if it has a matching list of XFS extents. Reflinks are not guaranteed when using external programs. This behaviour was observed on Linux and doesn't necessarily hold for other environments. Client-Servervifm supports remote execution of command-line mode commands, remote changing of directories and expression evaluation. This is possible using --remote and --remote-expr command-line arguments. To execute a command remotely combine --remote argument with -c <command> or +<command>. For example: vifm --remote -c
'cd /' To change directory not using command-line mode commands one can specify paths right after --remote argument, like this: vifm --remote /
Evaluating expression remotely might be useful to query information about an instance, for example its location: vifm --remote-expr 'expand("%d")' If there are several running instances, the target can be specified with --server-name option (otherwise, the first one lexicographically is used): vifm --server-name work --remote ˜/work/project List of names of
running instances can be obtained via --server-list option.
Name of the current one is available via v:servername.
server name of the running vifm instance. Empty if client-server feature is disabled. External RenamingWhen an editor is run to edit list of file names, contents of the temporary file has the following format:
If an operation was rejected due to issues with file names, next time you'll see the following in this order:
Mind that Vim plugin will extract list of original names and show them in a vertical split. You can cancel renaming by removing all non-comments from the buffer. This also erases information about previous edits. Using mouseNote: <ScrollWheelDown> is not available on 32-bit *nix systems, because ncurses doesn't support it there (limitation of implementation). Note: these are not available in mappings at the moment. Normal Mode event position
change action Clicking on or scrolling over an inactive pane (including its title), makes it active and does nothing else. Tabs are scrolled when mouse hovers over them. Clicking on the left miller column goes to parent directory and clicking the right one opens current entry. Visual Mode event position
selection action Command-line Mode event position
action Menu Mode event position
action view Mode event action <ScrollWheelUp>
k Clicking on or scrolling over an inactive pane (including its title), detaches view mode if it wasn't activated for exploring a file. PluginPlugin for using vifm in vim as a file selector. Commands: :EditVifm select
a file or files to open in the current buffer. Each command accepts up to two arguments: left pane directory and right pane directory. After arguments are checked, vifm process is spawned in a special "file-picker" mode. To pick files just open them either by pressing l, i or Enter keys, or by running :edit command. If no files are selected, file under the cursor is opened, otherwise whole selection is passed to the plugin and opened in vim. The plugin have only two settings. It's a string variable named g:vifm_term to let user specify command to run GUI terminal. By default it's equal to 'xterm -e'. And another string variable named g:vifm_exec, which equals "vifm" by default and specifies path to vifm's executable. To pass arguments to vifm use g:vifm_exec_args, which is empty by default. To use the plugin copy the vifm.vim file to either the system wide vim/plugin directory or into ˜/.vim/plugin. If you would prefer not to use the plugin and it is in the system wide plugin directory add let loaded_vifm=1 to your ˜/.vimrc file. ReservedThe following command names are reserved and shouldn't be used for user commands. g[lobal] ENVIRONMENT
MYVIFMRC Points to main configuration file (usually ˜/.config/vifm/vifmrc). These environment variables are valid inside vifm and also can be used to configure it by setting some of them before running vifm. When $MYVIFMRC isn't set, it's made as $VIFM/vifmrc (exception for Windows: vifmrc in the same directory as vifm.exe has higher priority than $VIFM/vifmrc). See
"Startup" section above for more details. On execution of external commands this variable is set to the full path of file used to initiate FUSE mount of the closest mount point from current pane's directory up. It's not set when outside FUSE mount point. When vifm is used inside terminal multiplexer, it tries to set this variable as well (it doesn't work this way on its own). SEE ALSOvifm-convert-dircolors(1), vifm-pause(1) Website:
https://vifm.info/ AUTHORVifm was
originally created by ksteen
<[email protected]> |