aboutsummaryrefslogtreecommitdiff
path: root/vifm/vifm-help.txt
diff options
context:
space:
mode:
Diffstat (limited to 'vifm/vifm-help.txt')
-rw-r--r--vifm/vifm-help.txt2602
1 files changed, 1634 insertions, 968 deletions
diff --git a/vifm/vifm-help.txt b/vifm/vifm-help.txt
index 59550f6..8019d0e 100644
--- a/vifm/vifm-help.txt
+++ b/vifm/vifm-help.txt
@@ -16,8 +16,8 @@ DESCRIPTION
out having to learn a new set of commands.
OPTIONS
- vifm starts in the current directory unless it is given a different
- directory on the command line or 'vifminfo' option includes "savedirs"
+ vifm starts in the current directory unless it is given a different di-
+ rectory on the command line or 'vifminfo' option includes "savedirs"
(in which case last visited directories are used as defaults).
- Read list of files from standard input stream and compose custom
@@ -30,8 +30,8 @@ OPTIONS
Starts Vifm in the specified paths.
Specifying two directories triggers split view even when vifm was in
- single-view mode on finishing previous session. To suppress this be-
- haviour :only command can be put in the vifmrc file.
+ 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.
@@ -129,11 +129,11 @@ Basic Movement
j, gj or Ctrl-N
move cursor down one line.
- h when 'lsview' is off move up one directory (moves to parent
- directory node in tree view), otherwise move left one file.
+ h when 'lsview' is off move up one directory (moves to parent di-
+ rectory node in tree view), otherwise move left one file.
- l when 'lsview' is off move into a directory or launches a file,
- otherwise move right one file.
+ l when 'lsview' is off move into a directory or launch a file,
+ otherwise move right one file. See "Selection" section below.
gg move to the first line of the file list.
@@ -144,7 +144,8 @@ Basic Movement
view.
gl or Enter
- enter directory or launch a file.
+ enter directory or launch a file. See "Selection" section be-
+ low.
H move to the first file in the window.
@@ -165,10 +166,10 @@ Basic Movement
n% move to the file that is n percent from the top of the list (for
example 25%).
- 0 or ^ move cursor to the first column. See 'lsview' option descrip-
+ 0 or ^ move cursor to the first column. See 'lsview' option descrip-
tion.
- $ move cursor to the last column. See 'lsview' option descrip-
+ $ move cursor to the last column. See 'lsview' option descrip-
tion.
Space switch file lists.
@@ -182,7 +183,7 @@ Basic Movement
{n}gT switch to {n}-th previous tab.
Movement with Count
- Most movement commands also accept a count, 12j would move down 12
+ Most movement commands also accept a count, 12j would move down 12
files.
[count]%
@@ -293,9 +294,9 @@ Pane manipulation
Ctrl-W =
make size of two views equal.
- For Ctrl-W +, Ctrl-W -, Ctrl-W <, Ctrl-W >, Ctrl-W | and Ctrl-W _ com-
- mands 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
+ For Ctrl-W +, Ctrl-W -, Ctrl-W <, Ctrl-W >, Ctrl-W | and Ctrl-W _ com-
+ mands 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.
@@ -314,7 +315,7 @@ Marks
There are also several special marks that can't be set manually:
- - ' (single quote) - previously visited directory of the view, thus
+ - ' (single quote) - previously visited directory of the view, thus
hitting '' allows switching between two last locations
- < - the first file of the last visually selected block
@@ -323,25 +324,26 @@ Marks
Searching
/regular expression pattern
- search for files matching regular expression in forward direc-
+ search for files matching regular expression in forward direc-
tion and advance cursor to next match.
/ perform forward search with top item of search pattern history.
?regular expression pattern
- search for files matching regular expression in backward direc-
+ search for files matching regular expression in backward direc-
tion and advance cursor to previous match.
? perform backward search with top item of search pattern history.
- Trailing slash for directories is taken into account, so /\/ searches
- for directories and symbolic links to directories. At the moment //
- works too, but this can change in the future, so consider escaping the
+ Trailing slash for directories is taken into account, so /\/ searches
+ for directories and symbolic links to directories. At the moment //
+ works too, but this can change in the future, so consider escaping the
slash if not typing pattern by hand.
- Matches are automatically selected if 'hlsearch' is set. Enabling
- 'incsearch' makes search interactive. 'ignorecase' and 'smartcase'
- options affect case sensitivity of search queries.
+ Matches are automatically selected if 'hlsearch' is set. Enabling
+ 'incsearch' makes search interactive. 'ignorecase' and 'smartcase' op-
+ tions affect case sensitivity of search queries as well as local filter
+ and other things detailed in the description of 'caseoptions'.
[count]n
@@ -381,62 +383,76 @@ Searching
File Filters
There are three basic file filters:
- - dot files filter (excluding "." and ".." special directories, whose
- appearance is controlled by the 'dotdirs' option);
+ - dot files filter (does not affect "." and ".." special directories,
+ whose appearance is controlled by the 'dotdirs' option), see 'dot-
+ files' option;
- - manual filter for file names;
+ - permanent filter;
- - automatic filter for file names;
+ - local filter (see description of the "=" normal mode command).
- - local filter for file names (see description of the "=" normal mode
- command).
+ 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.
- Performing operations on manual filter for file names automatically
- does the same on automatic one. The file name filter is separated
- mainly for convenience purpose and to get more deterministic behaviour.
+ For the purposes of more deterministic editing permanent filter is
+ split into two parts:
+
+ - one edited explicitly via :filter command;
+
+ - another one which is edited implicitly via zf shortcut.
+
+ Files are tested against both parts and a match counts if at least one
+ of the parts matched.
- The basic vim folding key bindings are used for filtering files.
Each file list has its own copy of each filter.
Filtered files are not checked in / search or :commands.
- Files and directories are filtered separately. For this a slash is
- appended to a directory name before testing whether it matches the fil-
- ter. Examples:
+ Files and directories are filtered separately. This is done by append-
+ ing a slash to a directory name before testing whether it matches the
+ filter. Examples:
" filter directories which names end with '.files'
:filter /^.*\.files\/$/
" filter files which names end with '.d'
- :filter /^.*\.d$/
+ :filter {*.d}
" filter files and directories which names end with '.o'
:filter /^.*\.o\/?$/
Note: vifm uses extended regular expressions.
+ The basic vim folding key bindings are used for managing filters.
+
+
za toggle visibility of dot files.
zo show dot files.
zm hide dot files.
- zf add selected files to file name filter.
+ zf add selected files to permanent filter.
- zO show files hidden by file name filter.
+ zO reset permanent filter.
- zM restore all filters.
+ zR save and reset all filters.
- zR remove all filters.
+ zr clear local filter.
- zr remove local filter.
+ zM restore all filters (undoes last zR).
zd exclude selection or current file from a custom view. Does
- nothing for regular view. For tree view excluding directory
- excludes that sub-tree. For compare views zd hides group of
- adjacent identical files, count can be specified as 1 to exclude
+ nothing for regular view. For tree view excluding directory ex-
+ cludes that sub-tree. For compare views zd hides group of adja-
+ cent identical files, count can be specified as 1 to exclude
just single file or selected items instead. Files excluded this
way are not counted as filtered out and can't be returned unless
view is reloaded.
@@ -447,6 +463,21 @@ File Filters
value of the 'incsearch' option. This kind of filter is auto-
matically reset when directory is changed.
+Tree-related Keys
+ While some of the keys make sense outside of tree-view, they are most
+ useful in trees.
+
+ [z go to first sibling of current entry.
+
+ ]z go to last sibling of current entry.
+
+ zj go to next directory sibling of current entry or do nothing.
+
+ zk go to previous directory sibling of current entry or do nothing.
+
+ zx toggle fold under the cursor or parent entry of the current file
+ if cursor is not on a directory.
+
Other Normal Mode Keys
[count]:
enter command line mode. [count] generates range.
@@ -478,17 +509,17 @@ Other Normal Mode Keys
directory history of current view. Nonexistent directories are
automatically skipped.
- Ctrl-G create a window showing detailed information about the current
- file.
+ Ctrl-G show a dialog with detailed information about current file. See
+ "Menus and dialogs" section for controls.
Shift-Tab
- enters view mode (works only after activating view pane with
+ enter view mode (works only after activating view pane with
:view command).
ga calculate directory size. Uses cached directory sizes when pos-
sible for better performance. As a special case calculating
- size of ".." entry results in calculation of size of current
- directory.
+ size of ".." entry results in calculation of size of current di-
+ rectory.
gA like ga, but force update. Ignores old values of directory
sizes.
@@ -497,21 +528,24 @@ Other Normal Mode Keys
erwise only current file is updated.
gf find link destination (like l with 'followlinks' off, but also
- finds directories).
+ finds directories). On Windows additionally follows .lnk-files.
+
+ gF Same as gf, but resolves final path of the chain of symbolic
+ links.
gr only for MS-Windows
- same as l key, but tries to run program with administrative
+ same as l key, but tries to run program with administrative
privileges.
- av go to visual mode into selection amending state preserving cur-
+ av go to visual mode into selection amending state preserving cur-
rent selection.
gv go to visual mode restoring last selection.
[reg]gs
when no register is specified, restore last t selection (similar
- to what gv does for visual mode selection). If register is
- present, then all files listed in that register and which are
+ to what gv does for visual mode selection). If register is
+ present, then all files listed in that register and which are
visible in current view are selected.
gu<selector>
@@ -530,12 +564,14 @@ Other Normal Mode Keys
e explore file in the current pane.
- i handle file (even if it's an executable and 'runexec' option is
+ i handle file (even if it's an executable and 'runexec' option is
set).
- cw change word is used to rename a file or files.
+ cw change word is used to rename a file or files. If multiple
+ files are selected, behaves as :rename command run without argu-
+ ments.
- cW change WORD is used to change only name of file (without exten-
+ cW change WORD is used to change only name of file (without exten-
sion).
cl change link target.
@@ -547,17 +583,17 @@ Other Normal Mode Keys
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}).
+ 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 [count] times.
[count]dd or d[count]selector
- move selected file or files to trash directory (if 'trash'
- option is set, otherwise delete). See "Trash directory" section
+ move selected file or files to trash directory (if 'trash' op-
+ tion is set, otherwise delete). See "Trash directory" section
below.
[count]DD or D[count]selector
@@ -567,17 +603,17 @@ Other Normal Mode Keys
Y, [count]yy or y[count]selector
yank selected files.
- p copy yanked files to the current directory or move the files to
- the current directory if they were deleted with dd or :d[elete]
- or if the files were yanked from trash directory. See "Trash
+ p copy yanked files to the current directory or move the files to
+ the current directory if they were deleted with dd or :d[elete]
+ or if the files were yanked from trash directory. See "Trash
directory" section below.
P move the last yanked files. The advantage of using P instead of
- d followed by p is that P moves files only once. This isn't
- important in case you're moving files in the same file system
- where your home directory is, but using P to move files on some
- other file system (or file systems, in case you want to move
- files from fs1 to fs2 and your home is on fs3) can save your
+ d followed by p is that P moves files only once. This isn't im-
+ portant in case you're moving files in the same file system
+ where your home directory is, but using P to move files on some
+ other file system (or file systems, in case you want to move
+ files from fs1 to fs2 and your home is on fs3) can save your
time.
al put symbolic links with absolute paths.
@@ -597,10 +633,10 @@ Other Normal Mode Keys
- if file is missing in current view, its pair gets removed
- if file is missing or differs in other view, it's replaced
- file pairs are defined by matching relative paths
- File removal obeys 'trash' option. When the option is enabled,
- the operation can be undone/redone (although results won't be
+ File removal obeys 'trash' option. When the option is enabled,
+ the operation can be undone/redone (although results won't be
visible automatically).
- Unlike in Vim, this operation is performed on a single line
+ Unlike in Vim, this operation is performed on a single line
rather than a set of adjacent changes.
do same as dp, but applies changes in the opposite direction.
@@ -617,29 +653,29 @@ Other Normal Mode Keys
ZZ same as :quit.
- . repeat last command-line command (not normal mode command) of
- this session (does nothing right after startup or :restart com-
- mand). The command doesn't depend on command-line history and
- can be used with completely disabled history.
+ . repeat last command-line command (not normal mode command) of
+ this run (does nothing right after startup or :restart command).
+ The command doesn't depend on command-line history and can be
+ used with completely disabled history.
- ( go to previous group. Groups are defined by primary sorting
- key. For name and iname members of each group have same first
+ ( go to previous group. Groups are defined by primary sorting
+ key. For name and iname members of each group have same first
letter, for all other sorting keys vifm uses size, uid, ...
) go to next group. See ( key description above.
- { speeds up navigation to closest previous entry of the opposite
- type by moving to the first file backwards when cursor is on a
+ { speeds up navigation to closest previous entry of the opposite
+ type by moving to the first file backwards when cursor is on a
directory and to the first directory backwards when cursor is on
- a file. This is essentially a special case of ( that is locked
+ a file. This is essentially a special case of ( that is locked
on "dirs".
} same as {, but in forward direction.
- [c go to previous mismatched entry in directory comparison view or
+ [c go to previous mismatched entry in directory comparison view or
do nothing.
- ]c go to next mismatched entry in directory comparison view or do
+ ]c go to next mismatched entry in directory comparison view or do
nothing.
[d go to previous directory entry or do nothing.
@@ -658,14 +694,6 @@ Other Normal Mode Keys
]s go to next selected entry or do nothing.
- [z go to first sibling of current entry.
-
- ]z go to last sibling of current entry.
-
- zj go to next directory sibling of current entry or do nothing.
-
- zk go to previous directory sibling of current entry or do nothing.
-
Using Count
You can use count with commands like yy.
@@ -675,37 +703,37 @@ Using Count
Or you can use count with motions passed to y, d or D.
d[count]j
- delete (count + 1) files starting from current cursor position
+ delete (count + 1) files starting from current cursor position
upward.
Registers
- vifm supports multiple registers for temporary storing list of yanked
+ vifm supports multiple registers for temporary storing list of yanked
or deleted files.
Registers should be specified by hitting double quote key followed by a
- register name. Count is specified after register name. By default
+ register name. Count is specified after register name. By default
commands use unnamed register, which has double quote as its name.
- Though all commands accept registers, most of commands ignores them
- (for example H or Ctrl-U). Other commands can fill register or append
+ Though all commands accept registers, most of commands ignores them
+ (for example H or Ctrl-U). Other commands can fill register or append
new files to it.
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 when you use named registers (a-z and A-
- Z) unnamed register is updated to contain same list of files as the
+ default register. Every time when you use named registers (a-z and A-
+ Z) unnamed register is updated to contain same list of files as the
last used register.
- _ is black hole register. It can be used for writing, but its list is
+ _ 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. Low-
- ercase registers are cleared before adding new files, while uppercase
+ Registers with names from a to z and from A to Z are named ones. Low-
+ ercase registers are cleared before adding new files, while uppercase
aren't and should be used to append new files to the existing file list
of appropriate lowercase register (A for a, B for b, ...).
- Registers can be changed on :empty command if they contain files under
+ Registers can be changed on :empty command if they contain files under
trash directory (see "Trash directory" section below).
Registers do not contain one file more than once.
@@ -718,7 +746,7 @@ Registers
"Ad
- removes one file and append its name to register a (and to the unnamed
+ removes one file and append its name to register a (and to the unnamed
register),
p or "ap or "Ap
@@ -726,10 +754,10 @@ Registers
inserts previously yanked and deleted files into current directory.
Selectors
- y, d, D, !, gu and gU commands accept selectors. You can combine them
+ y, d, D, !, gu and gU commands accept selectors. You can combine them
with any of selectors below to quickly remove or yank several files.
- Most of selectors are like vi motions: j, k, gg, G, H, L, M, %, f, F,
+ 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.
a all files in current view.
@@ -753,44 +781,44 @@ Selectors
- 2dj - delete file under cursor and two below;
- - 2y6gg - yank all files from cursor position to 12th file in the
+ - 2y6gg - yank all files from cursor position to 12th file in the
list.
Visual Mode
- Visual mode has to generic operating submodes:
+ Visual mode has two generic operating submodes:
- plain selection as it is in Vim;
- selection editing submode.
- Both modes select files in range from cursor position at which visual
- mode was entered to current cursor position (let's call it "selection
+ 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,
+ 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"). Con-
- trary to it, selection editing doesn't clear previously selected files
- and restores them after reject. Accepting selection by performing an
+ Plain Vim-like visual mode starts with cleared selection, which is not
+ restored on rejecting selection ("Escape", "Ctrl-C", "v", "V"). Con-
+ trary 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
+ 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
+ In turn, selection editing supports three types of editing (look at
statusbar to know which one is currently active):
- append - amend selection by selecting elements in selection region;
- - remove - amend selection by deselecting elements in selection
- region;
+ - remove - amend selection by deselecting elements in selection re-
+ gion;
- - invert - amend selection by inverting selection of elements in
- selection region.
+ - invert - amend selection by inverting selection of elements in se-
+ lection region.
- No matter how you activate selection editing it starts in "append".
- One can switch type of operation (in the order given above) via "Ctrl-
+ 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 accept-
@@ -798,19 +826,19 @@ Visual Mode
Enter save selection and go back to normal mode not moving cursor.
- av leave visual mode if in amending mode (restores previous selec-
+ av leave visual mode if in amending mode (restores previous selec-
tion), otherwise switch to amending selection mode.
gv restore previous visual selection.
v, V, Ctrl-C or Escape
- leave visual mode if not in amending mode, otherwise switch to
+ leave visual mode if not in amending mode, otherwise switch to
normal visual selection.
- Ctrl-G switch type of amending by round robin scheme: append -> remove
+ Ctrl-G switch type of amending by round robin scheme: append -> remove
-> invert.
- : enter command line mode. Selection is cleared on leaving the
+ : enter command line mode. Selection is cleared on leaving the
mode.
o switch active selection bound.
@@ -821,6 +849,8 @@ Visual Mode
gU, U make names of selected files uppercase.
+ cw same as running :rename command without arguments.
+
View Mode
This mode tries to imitate the less program. List of builtin shortcuts
can be found below. Shortcuts can be customized using :qmap, :qnoremap
@@ -854,7 +884,7 @@ View Mode
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
+ scroll backward one half-window (and set half-window to
[count]).
r, Ctrl-R, Ctrl-L
@@ -862,10 +892,19 @@ View Mode
R reload view preserving scroll position.
- F toggle automatic forwarding. Roughly equivalent to periodic
+ F toggle automatic forwarding. Roughly equivalent to periodic
file reload and scrolling to the bottom. The behaviour is simi-
lar to `tail -F` or F key in less.
+ a switch to the next viewer. Does nothing for preview constructed
+ via %q macro.
+
+ A switch to the previous viewer. Does nothing for preview con-
+ structed via %q macro.
+
+ i toggle raw mode (ignoring of defined viewers). Does nothing for
+ preview constructed via %q macro.
+
[count]/pattern
search forward for ([count]-th) matching line.
@@ -876,8 +915,8 @@ View Mode
repeat previous search (for [count]-th occurrence).
[count]N
- repeat previous search in reverse direction (for [count]-th
- occurrence).
+ repeat previous search in reverse direction (for [count]-th oc-
+ currence).
[count]g, [count]<, [count]Alt-<
scroll to the first line of the file (or line [count]).
@@ -889,7 +928,7 @@ View Mode
scroll to the beginning of the file (or N percent into file).
v invoke an editor to edit the current file being viewed. The
- command for editing is taken from the 'vicmd'/'vixcmd' option
+ command for editing is taken from the 'vicmd' or 'vixcmd' option
value and extended with middle line number prepended by a plus
sign and name of the current file.
@@ -906,8 +945,8 @@ Command line Mode
mand, 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.
+ are not available if vifm is compiled with --disable-extended-keys op-
+ tion.
Esc, Ctrl-C
leave command line mode, cancels input. Cancelled input is
@@ -1011,8 +1050,8 @@ Pasting special values
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.
+ the last component of path to the current directory of the ac-
+ tive pane.
Ctrl-X Ctrl-X c
name of the current file of the inactive pane.
@@ -1032,10 +1071,12 @@ Pasting special values
Ctrl-X a
- value of automatic filter of the active pane.
+ value of implicit permanent filter (old name "automatic") of the
+ active pane.
Ctrl-X m
- value of manual filter of the active pane.
+ value of explicit permanent filter (old name "manual") of the
+ active pane.
Ctrl-X =
value of local filter of the active pane.
@@ -1123,8 +1164,8 @@ Commands
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 com-
ment. Not all commands support inline comments as their syntax con-
- flicts with names of registers and fields where double quotes are
- allowed.
+ flicts with names of registers and fields where double quotes are al-
+ lowed.
Most of the commands have two forms: complete and the short one. Exam-
ple:
@@ -1148,8 +1189,8 @@ 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:
+ These commands see '|' as part of their arguments even when it's es-
+ caped:
:[range]!
:autocmd
@@ -1210,8 +1251,8 @@ Commands
same as above, but the command is run in the background using vifm's
means.
- Programs that write to stdout like "ls" create an error message showing
- partial output of the command.
+ 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.
@@ -1246,16 +1287,16 @@ Commands
:apropos keyword...
create a menu of items returned by the apropos command. Select-
- ing an item in the menu opens corresponding man page. By
- default the command relies on the external "apropos" utility,
+ ing an item in the menu opens corresponding man page. By de-
+ fault the command relies on the external "apropos" utility,
which can be customized by altering value of the 'aproposprg'
- option.
+ option. See "Menus and dialogs" section for controls.
:autocmd
:au[tocmd] {event} {pat} {cmd}
register autocommand for the {event}, which can be:
- - DirEnter - performed on entering a directory
+ - DirEnter - triggered after directory is changed
Event name is case insensitive.
{pat} is a comma-separated list of modified globs patterns,
@@ -1322,7 +1363,7 @@ Commands
:bmarks [tag1 [tag2...]]
display menu of bookmarks that include all of the specified
- tags.
+ tags. See "Menus and dialogs" section for controls.
:bmgo
@@ -1334,22 +1375,24 @@ Commands
:cabbrev
:ca[bbrev]
- display menu of command-line mode abbreviations.
+ 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
+ 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.
+ register new or overwrites existing abbreviation for command-
+ line mode. rhs can contain spaces and any special sequences ac-
+ cepted in rhs of mappings (see "Mappings" section below). Ab-
+ breviations are expanded non-recursively.
:cnoreabbrev
:cnorea[bbrev]
- display menu of command-line mode abbreviations.
+ 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
@@ -1379,10 +1422,30 @@ Commands
:cd! /dir
same as :cd /dir /dir.
+ :cds
+
+ :cds[!] pattern string
+ navigate to path obtained by substituting first match in current
+ path. Arguments can include slashes, but starting first argu-
+ ment with a separator will activate below form of the command.
+ Specifying "!" changes directory of both panes.
+
+ Available flags:
+
+ - i - ignore case (the 'ignorecase' and 'smartcase' options are not
+ used)
+
+ - I - don't ignore case (the 'ignorecase' and 'smartcase' options are
+ not used)
+
+ :cds[!]/pattern/string/[flags]
+ same as above, but with :substitute-like syntax. Other punctua-
+ tion characters can be used as separators.
+
:change
:c[hange]
- create a menu window to alter a files properties.
+ show a dialog to alter properties of files.
:chmod
@@ -1403,8 +1466,8 @@ Commands
:[range]chown [user][:][group]
only for *nix
- change owner and/or group of files. Operates on directories
- recursively.
+ change owner and/or group of files. Operates on directories re-
+ cursively.
:clone
@@ -1429,10 +1492,10 @@ Commands
: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.
+ choose primary color scheme here. It is used for view if no di-
+ rectory 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
@@ -1447,6 +1510,14 @@ Commands
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 re-
+ mains unchanged. For example:
+
+ " use a separate color scheme for panes which are inside FUSE mounts
+ execute 'colorscheme in-fuse' &fusehome
+
:comclear
:comc[lear]
@@ -1455,22 +1526,40 @@ Commands
:command
:com[mand]
- display a menu of user commands.
-
- :com[mand] beginning
- display user defined commands that start with the beginning.
-
- :com[mand] name action
- set a new user command.
- Trying to use a reserved command name will result in an error
- message.
- Use :com[mand]! to overwrite a previously set command.
- Unlike vim user commands do not have to start with a capital
- letter. User commands are run in a shell by default. To run a
- command in the background you must set it as a background com-
- mand with & at the end of the commands action (:com rm rm %f &).
- Command name cannot contain numbers or special symbols (except
- '?' and '!').
+ display a menu of user commands. See "Menus and dialogs" sec-
+ tion for controls.
+
+ :com[mand] prefix
+ display user defined commands that start with the prefix.
+
+ :com[mand] name action[ &]
+ set or redefine a user command.
+ Use :com[mand]! to overwrite a previously set command of the
+ same name. Builtin commands can't be redefined.
+ User commands must start with an upper or lower case letter.
+ Command name can't contain special symbols except for a single
+ trailing '?' or '!'. Numbers are allowed provided that they
+ don't cause parsing ambiguity (no command name prefix that pre-
+ cedes a digit can match an existing command unless it has a
+ digit in the same place), for example:
+ " good
+ :command mp3 command
+ " good
+ :command mp4 command
+ :command mp3! command
+ :command mp4? command
+ " bad
+ :command mp command
+ :command mp44 command
+ " good
+ :command mp4c command
+
+ User commands are run in a shell by default (see below for syn-
+ tax 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 &`).
+ User commands of all kinds have macros expanded in them. See
+ "Command macros" section for more information.
:com[mand] name /pattern
set search pattern.
@@ -1479,17 +1568,17 @@ Commands
set local filter value.
:com[mand] name filter{:filter args}
- set file name filter (see :filter command description). For
- example:
+ set file name filter (see :filter command description). For ex-
+ ample:
" display only audio files
:command onlyaudio filter/.+.\(mp3|wav|mp3|flac|ogg|m4a|wma|ape\)$/i
" display everything except audio files
:command noaudio filter!/.+.\(mp3|wav|mp3|flac|ogg|m4a|wma|ape\)$/i
- :com[mand] cmd :commands
- set kind of an alias for internal command (like in a shell).
- Passes range given to alias to an aliased command, so running
+ :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
:command cp :copy %a
equals
@@ -1497,13 +1586,13 @@ Commands
:compare
- :compare [byname | bysize | bycontents | listall | listunique |
+ :compare [byname | bysize | bycontents | listall | listunique |
listdups | ofboth | ofone | groupids | grouppaths | skipempty]...
- compare files in one or two views according the arguments. The
- default is "bycontents listall ofboth grouppaths". See "Compare
- views" section below for details. Tree structure is incompati-
- ble with alternative representations, so values of 'lsview' and
- 'millerview' options are ignored.
+ compare files in one or two views according to the arguments.
+ The default is "bycontents listall ofboth grouppaths". See
+ "Compare views" section below for details. Diff structure is
+ incompatible with alternative representations, so values of
+ 'lsview' and 'millerview' options are ignored.
:copen
@@ -1514,23 +1603,23 @@ Commands
:copy
:[range]co[py][!?][ &]
- copy files to directory of other view. With "?" prompts for
+ 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
+ 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 over-
+ copy files to directory of other view giving each next file a
+ corresponding name from the argument list. "!" forces over-
write.
:cquit
:cq[uit][!]
- same as :quit, but also aborts directory choosing via
- --choose-dir (empties output file) and returns non-zero exit
+ same as :quit, but also aborts directory choosing via
+ --choose-dir (empties output file) and returns non-zero exit
code.
:cunabbrev
@@ -1539,7 +1628,7 @@ Commands
unregister command-line mode abbreviation by its lhs.
:cuna[bbrev] rhs
- unregister command-line mode abbreviation by its rhs, so that
+ unregister command-line mode abbreviation by its rhs, so that
abbreviation could be removed even after expansion.
:delbmarks
@@ -1564,7 +1653,7 @@ Commands
:delete
:[range]d[elete][!][ &]
- delete selected file or files. "!" means complete removal
+ delete selected file or files. "!" means complete removal
(omitting trash).
:[range]d[elete][!] [reg] [count][ &]
@@ -1577,9 +1666,15 @@ Commands
delete all marks.
:delm[arks] marks ...
- delete specified marks, each argument is treated as a set of
+ delete specified marks, each argument is treated as a set of
marks.
+ :delsession
+
+ :delsession
+ delete specified session if it was stored previously. Deleting
+ current session doesn't detach it.
+
:display
:di[splay]
@@ -1592,43 +1687,44 @@ Commands
:dirs
- :dirs display directory stack.
+ :dirs display directory stack in a menu. See "Menus and dialogs" sec-
+ tion for controls.
:echo
:ec[ho] [<expr>...]
- evaluate each argument as an expression and output them sepa-
- rated with a space. See help on :let command for a definition
+ evaluate each argument as an expression and output them sepa-
+ rated with a space. See help on :let command for a definition
of <expr>.
:edit
:[range]e[dit] [file...]
- open selected or passed file(s) in editor. Macros and environ-
+ open selected or passed file(s) in editor. Macros and environ-
ment variables are expanded.
:else
:el[se]
- execute commands until next matching :endif if all other condi-
+ execute commands until next matching :endif if all other condi-
tions didn't match. See also help on :if and :endif commands.
:elseif
:elsei[f] {expr1}
execute commands until next matching :elseif, :else or :endif if
- conditions of previous :if and :elseif branches were evaluated
+ conditions of previous :if and :elseif branches were evaluated
to zero. See also help on :if and :endif commands.
:empty
- :empty permanently remove files from all existing non-empty trash
- directories (see "Trash directory" section below). Trash direc-
- tories which are specified via %r and/or %u also get deleted
- completely. Also remove all operations from undolist that have
- no sense after :empty and remove all records about files located
- inside directories from all registers. Removal is performed as
- background task with undetermined amount of work and can be
+ :empty permanently remove files from all existing non-empty trash di-
+ rectories (see "Trash directory" section below). Trash directo-
+ ries which are specified via %r and/or %u also get deleted com-
+ pletely. Also remove all operations from undolist that have no
+ sense after :empty and remove all records about files located
+ inside directories from all registers. Removal is performed as
+ background task with undetermined amount of work and can be
checked via :jobs menu.
:endif
@@ -1639,8 +1735,8 @@ Commands
:execute
:exe[cute] [<expr>...]
- evaluate each argument as an expression and join results sepa-
- rated by a space to get a single string which is then executed
+ evaluate each argument as an expression and join results sepa-
+ rated by a space to get a single string which is then executed
as a command-line command. See help on :let command for a defi-
nition of <expr>.
@@ -1652,8 +1748,9 @@ Commands
:file
:f[ile][ &]
- display menu of programs set for the file type of the current
- file. " &" forces running associated program in background.
+ 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
@@ -1671,13 +1768,14 @@ Commands
command to ease understanding of what command will do in the
:file menu. Vifm will try the rest of the programs for an asso-
ciation 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
+ doesn't contain any of vifm macros, name of current file is ap-
+ pended 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.
- See also "Automatic FUSE mounts" section below. Example for zip
- archives and several actions:
+ quoted. See "Patterns" section below for pattern definition and
+ "Selection" section for how selection is handled. See also "Au-
+ tomatic FUSE mounts" section below. Example for zip archives
+ and several actions:
filetype *.zip,*.jar,*.war,*.ear
\ {Mount with fuse-zip}
@@ -1687,22 +1785,23 @@ Commands
\ {Extract here}
\ tar -xf %c,
- 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,
+ 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
+ list (in menu mode) currently registered patterns that match
specified file name. Same as ":filextype filename".
:filextype
:filex[type] pattern-list [{ description }] def_program,program2,...
same as :filetype, but this command is ignored if not running in
- X. In X :filextype is equal to :filetype. See "Patterns" sec-
- tion below for pattern definition. See also "Automatic FUSE
- mounts" section below.
+ X. In X :filextype is equal to :filetype. See "Patterns" sec-
+ tion below for pattern definition and "Selection" section for
+ how selection is handled. See also "Automatic FUSE mounts" sec-
+ tion below.
For example, consider the following settings (the order might
seem strange, but it's for the demonstration purpose):
@@ -1732,9 +1831,9 @@ Commands
4. firefox
5. uzbl
- If there is no graphical environment (checked presence of $DIS-
- PLAY environment variable on *nix; never happens on Windows),
- the list will look like:
+ 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
2. links
@@ -1763,7 +1862,7 @@ Commands
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.
+ section below for pattern definition. Supports Lua handlers.
Example for zip archives:
@@ -1808,8 +1907,8 @@ Commands
:find
:[range]fin[d] pattern
- display results of find command in the menu. Searches among
- selected files if any. Accepts macros. By default the command
+ display results of find command in the menu. Searches among se-
+ lected 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.
@@ -1818,8 +1917,8 @@ Commands
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.
+ same as :find above, but user defines all find arguments. Ig-
+ nores selection and range.
:[range]fin[d]
repeat last :find command.
@@ -1840,19 +1939,19 @@ Commands
:grep
:[range]gr[ep][!] pattern
- 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.
+ will show results of grep command in the menu. Add "!" to re-
+ quest inversion of search (look for lines that do not match pat-
+ tern). 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 al-
+ tering 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][!]
- repeats last :grep command. "!" of this command inverts "!" in
+ repeat last :grep command. "!" of this command inverts "!" in
repeated command.
:help
@@ -1865,28 +1964,34 @@ Commands
to get help on vifm (tab completion works). This form of the
command doesn't work when 'vimhelp' option is off.
+ :hideui
+
+ :hideui
+ hide interface to show previous commands' output.
+
:highlight
:hi[ghlight]
- display information about all highlight groups active at the
- moment.
+ display information about all highlight groups active at the mo-
+ ment.
:hi[ghlight] clear
reset all highlighting to builtin defaults and removed all file-
name-specific rules.
:hi[ghlight] clear ( {pat1,pat2,...} | /regexp/ )
- removes specified rule.
+ remove specified rule.
:hi[ghlight] ( group-name | {pat1,pat2,...} | /regexp/ )
display information on given highlight group or file name pat-
tern of color scheme used in the active view.
:hi[ghlight] ( group-name | {pat1,pat2,...} | /regexp/[iI] )
- cterm=style | ctermfg=color | ctermbg=color
- set style (cterm), foreground (ctermfg) or/and background
- (ctermbg) parameters of highlight group or file name pattern for
- color scheme used in the active view.
+ cterm=style | ctermfg=color | ctermbg=color | gui=style | guifg=color |
+ guibg=color
+ set style (cterm, gui), foreground (ctermfg, guifg) and/or back-
+ ground (ctermbg, guibg) parameters of highlight group or file
+ name pattern for color scheme used in the active view.
All style values as well as color names are case insensitive.
@@ -1896,17 +2001,21 @@ Commands
- reverse or inverse
- standout
- italic (on unsupported systems becomes reverse)
+ - combine - add attributes of current group to attributes of the par-
+ ent in group hierarchy (see below) instead of replacing them
- none
Available group-name values:
- Win - color of all windows (views, dialogs, menus) and default color
for their content (e.g. regular files in views)
- AuxWin - color of auxiliary areas of windows
+ - OtherWin - color of inactive pane
- Border - color of vertical parts of the border
- - TabLine - tab line color
- - TabLineSel - color of the tip of selected tab
- - TopLineSel - top line color of the current pane
+ - TabLine - tab line color (for 'tabscope' set to "global")
+ - TabLineSel - color of the tip of selected tab (regardless of 'tab-
+ scope')
- TopLine - top line color of the other pane
+ - TopLineSel - top line color of the current pane
- CmdLine - the command line/status bar color
- ErrorMsg - color of error messages in the status bar
- StatusLine - color of the line above the status bar
@@ -1915,15 +2024,18 @@ Commands
- SuggestBox - color of key suggestion box
- CurrLine - line at cursor position in active view
- OtherLine - line at cursor position in inactive view
+ - OddLine - color of every second entry line in a pane
+ - LineNr - line number column of views
- Selected - color of selected files
- Directory - color of directories
- Link - color of symbolic links in the views
- BrokenLink - color of broken symbolic links
+ - HardLink - color of regular files with more than one hard link
- Socket - color of sockets
- Device - color of block and character devices
- Executable - color of executable files
- Fifo - color of fifo pipes
- - CmpMismatch - color of mismatched files in side-by-side comparison
+ - CmpMismatch - color of mismatched files in side-by-side comparison
by path
- User1..User9 - 9 colors which can be used via %* 'statusline' macro
@@ -1937,18 +2049,23 @@ Commands
- magenta and lightmagenta
- cyan and lightcyan
- white and lightwhite
- - 0-255 - corresponding colors from 256-color palette
-
- Light versions of colors are regular colors with bold attribute set.
- So order of arguments of :highlight command is important and it's bet-
- ter 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 Dupli-
- cated entries were altered by adding an underscore followed by numeri-
- cal suffix.
+ - 0-255 - corresponding colors from 256-color palette (for ctermfg and
+ ctermbg)
+ - #rrggbb - direct ("gui", "true", 24-bit) color in hex-notation, each
+ of the three compontents are in the range 0x00 to 0xff (for guifg and
+ guibg)
+
+ Light versions of colors are regular colors with bold attribute set au-
+ tomatically 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
+ Duplicated entries were altered by adding an underscore followed by nu-
+ merical suffix.
0 Black 86 Aquamarine1 172 Orange3
1 Red 87 DarkSlateGray2 173 LightSalmon3_2
@@ -2040,24 +2157,31 @@ Commands
84 SeaGreen1 170 Orchid
85 SeaGreen1_2 171 MediumOrchid1
- 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.
+ There are two colors (foreground and background) and only one bold at-
+ tribute. 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 back-
+ ground colors independently, but for consistency with terminal emula-
+ tors this is available only implicitly by using light versions of col-
+ ors. 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
+ drawing library, whether you will be able to use all of them highly de-
+ pends 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 ter-
minal (on *nixes it can also be set via X resources), e.g.
xterm-256color. One can find list of available terminal names by list-
ing /usr/lib/terminfo/. Number of colors supported by terminal with
current settings can be checked via "tput colors" command.
- Here is the hierarchy of highlight groups, which you need to know for
+ 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 translat-
+ ing via a builtin palette.
+
+ Here is the hierarchy of highlight groups, which you need to know for
using transparency:
JobLine
SuggestBox
@@ -2068,46 +2192,60 @@ Commands
CmdLine
ErrorMsg
Win
- AuxWin
- File name specific highlights
- Directory
- Link
- BrokenLink
- Socket
- Device
- Fifo
- Executable
- Selected
- CurrLine
- OtherLine
+ OtherWin
+ AuxWin
+ OddLine
+ File name specific highlights
+ Directory
+ Link
+ BrokenLink
+ HardLink
+ Socket
+ Device
+ Fifo
+ Executable
+ Selected
+ CurrLine
+ LineNr (in active pane)
+ OtherLine
+ LineNr (in inactive pane)
TopLine
TopLineSel
+ TabLineSel (for pane tabs)
+ User1..User9
TabLine
TabLineSel
+ User1..User9
- "none" means default terminal color for highlight groups at the first
+ "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 :high-
+ or regular expressions (//). At most one of them is applied per file
+ entry, namely the first that matches file name, hence order of :high-
light commands might be important in certain cases.
:history
:his[tory]
- creates a pop-up menu of directories visited.
+ display a menu with list of visited directories. See "Menus and
+ dialogs" section for controls.
:his[tory] x
x can be:
- d[ir] or . show directory history.
- c[md] or : show command line history.
- s[earch] or / show search history and search forward on l key.
- f[search] or / show search history and search forward on l key.
- b[search] or ? show search history and search backward on l key.
- i[nput] or @ show prompt history (e.g. on one file renaming).
- fi[lter] or = show filter history (see description of the "="
+ d[ir] or . show directory history.
+ c[md] or : show command line history.
+ s[earch] or / show search history and search forward on l
+ key.
+ f[search] or / show search history and search forward on l
+ key.
+ b[search] or ? show search history and search backward on l
+ key.
+ i[nput] or @ show prompt history (e.g. on one file renam-
+ ing).
+ fi[lter] or = show filter history (see description of the "="
normal mode command).
+ See "Menus and dialogs" section for controls.
:histnext
@@ -2117,8 +2255,8 @@ Commands
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.
+ 'cpoptions', and thus have both <c-i> and <tab> working as ex-
+ pected.
:histprev
@@ -2128,7 +2266,7 @@ Commands
:if
:if {expr1}
- starts conditional block. Commands are executed until next
+ start conditional block. Commands are executed until next
matching :elseif, :else or :endif command if {expr1} evaluates
to non-zero, otherwise they are ignored. See also help on :else
and :endif commands.
@@ -2162,12 +2300,13 @@ Commands
:jobs
- :jobs shows menu of current backgrounded processes.
+ :jobs display menu of current backgrounded processes. See "Menus and
+ dialogs" section for controls.
:let
:let $ENV_VAR = <expr>
- sets environment variable. Warning: setting environment vari-
+ set an environment variable. Warning: setting environment vari-
able to an empty string on Windows removes it.
:let $ENV_VAR .= <expr>
@@ -2185,22 +2324,23 @@ Commands
:let &[l:|g:]opt -= <expr>
decreasing option value, removing sub-values.
- Where <expr> could be a single-quoted string, double-quoted string, an
- environment variable, function call or a concatanation of any of them
+ Where <expr> could be a single-quoted string, double-quoted string, an
+ environment variable, function call or a concatanation of any of them
in any order using the '.' operator. Any whitespace is ignored.
:locate
:locate filename
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.
+ 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 al-
+ ready built), which can be customized by altering value of the
+ 'locateprg' option. See "Menus and dialogs" section for con-
+ trols.
:locate
- repeats last :locate command.
+ repeat last :locate command.
:ls
@@ -2212,9 +2352,9 @@ Commands
:lstrash
:lstrash
- displays 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.
+ 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 con-
+ tain duplicates. See "Menus and dialogs" section for controls.
:mark
@@ -2227,7 +2367,8 @@ Commands
:marks
- :marks create a pop-up menu of marks.
+ :marks create a pop-up menu of marks. See "Menus and dialogs" section
+ for controls.
:marks list ...
display the contents of the marks that are mentioned in list.
@@ -2235,7 +2376,8 @@ Commands
:media
:media only for *nix
- display media management menu. See also 'mediaprg' option.
+ display media management menu. See "Menus and dialogs" section
+ for controls. See also 'mediaprg' option.
:messages
@@ -2275,14 +2417,35 @@ Commands
execute normal mode commands. If "!" is used, user defined map-
pings 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.
+ Commands can't start with a space, so put a count of 1 (one) be-
+ fore it.
:only
:on[ly]
switch to a one window view.
+ :plugin
+
+ :plugin load
+ 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
+
+ :plugins
+ open plugins menu. See "Menus and dialogs" section for con-
+ trols.
+
:popd
:popd remove pane directories from stack.
@@ -2298,10 +2461,10 @@ Commands
:put
:[line]pu[t][!] [reg] [ &]
- puts files from specified register (" by default) into current
+ 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
+ "!" moves files "!" moves files from their original location in-
+ stead of copying them. During this operation no confirmation
dialogs will be shown, all checks are performed beforehand.
:pwd
@@ -2318,7 +2481,7 @@ Commands
:q[uit][!]
if there is more than one tab, close the current one, otherwise
- exit vifm (add ! to skip saving changes and checking for active
+ exit vifm (add ! to skip saving state and checking for active
backgrounded commands).
:redraw
@@ -2344,8 +2507,9 @@ Commands
:rename
:[range]rename[!]
- rename files using vi to edit names. ! means go recursively
- through directories.
+ 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.
@@ -2354,9 +2518,17 @@ Commands
:restart
free a lot of things (histories, commands, etc.), reread
- vifminfo and vifmrc files and run startup commands passed in the
- argument list, thus losing all unsaved changes (e.g. recent his-
- tory or keys mapped in current session).
+ 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 in-
+ stance). Session that wasn't yet stored gets reset.
+
+ While many things get reset, some basic UI state and current lo-
+ cations are preserved, including tabs.
+
+ :restart full
+ variation of :restart that makes no attempt to preserve any-
+ thing.
:restore
@@ -2397,8 +2569,8 @@ Commands
enable integration with terminal multiplexers.
:screen?
- display whether integration with terminal multiplexers is
- enabled.
+ display whether integration with terminal multiplexers is en-
+ abled.
Note: the command is called screen for historical reasons (when tmux
wasn't yet supported) and might be changed in future releases, or get
@@ -2428,6 +2600,20 @@ Commands
same as above, but resets previously selected items before pro-
ceeding.
+ :session
+
+ :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 quiting the application in usual ways. Sets v:session.
+
:set
:se[t] display all options that differ from their default value.
@@ -2442,11 +2628,13 @@ Commands
- for boolean options - nooption, invoption and option!
- for integer options - option=x, option+=x and option-=x
- for string options - option=x and option+=x
- - for string list options - option=x, option+=x and option-=x
- - for enumeration options - option=x, option+=x and option-=x
- - for set options - option=x, option+=x and option-=x
- - for charset options - option=x, option+=x, option-=x and
+ - for string list options - option=x, option+=x, option-=x and
option^=x
+ - for enumeration options - option=x, option+=x and option-=x
+ - for set options - option=x, option+=x, option-=x and op-
+ tion^=x
+ - for charset options - option=x, option+=x, option-=x and op-
+ tion^=x
the meaning:
- option - turn option on (for boolean) or print its value (for
@@ -2461,7 +2649,7 @@ Commands
- option-=x - remove (or subtract) x from option
- option^=x - toggle x presence among values of the option
- Option name can be prepended and appended by any number of
+ Option name can be prepended and appended by any number of
whitespace characters.
:setglobal
@@ -2473,8 +2661,8 @@ Commands
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
+ 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
@@ -2486,15 +2674,15 @@ Commands
display all local options.
:setl[ocal] opt1=val1 opt2='val2' opt3="val3" ...
- same as :set, but changes/prints only local values of local
- options.
+ same as :set, but changes/prints only local values of local op-
+ tions.
:shell
:sh[ell][!]
- 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,
+ 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.
@@ -2502,11 +2690,11 @@ Commands
:[count]siblnext[!]
- change directory to [count]th next sibling directory after cur-
- rent path using value of global sort option of current pane.
+ change directory to [count]th next sibling directory after cur-
+ rent path using value of global sort option of current pane.
"!" enables wrapping.
- For example, say, you're at /boot and root listing starts like
+ For example, say, you're at /boot and root listing starts like
this:
bin/
@@ -2525,11 +2713,12 @@ Commands
:sort
:sor[t]
- display dialog with different sorting methods, when one can
- select 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).
+ display dialog with different sorting methods, where one can se-
+ lect 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 con-
+ trols.
:source
@@ -2549,6 +2738,13 @@ Commands
Also changes other pane to path (absolute or relative to current
directory of active pane).
+ :stop
+
+ :st[op]
+ 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
:[range]s[ubstitute]/pattern/string/[flags]
@@ -2582,8 +2778,8 @@ Commands
:sync [relative path]
change the other pane to the current pane directory or to some
- path relative to the current directory. Using macros is
- allowed.
+ path relative to the current directory. Using macros is al-
+ lowed.
:sync! change the other pane to the current pane directory and synchro-
nize cursor position. If current pane displays custom list of
@@ -2599,8 +2795,8 @@ Commands
- location - current directory of the pane;
- - cursorpos - cursor position (doesn't make sense without
- "location");
+ - cursorpos - cursor position (doesn't make sense without "lo-
+ cation");
- localopts - all local options;
@@ -2647,64 +2843,75 @@ Commands
:tabn[ext] {n}
go to the tab number {n}. Tab numeration starts with 1.
+ :tabonly
+
+ :tabo[nly]
+ close all tabs but the current one. Closes pane tabs only at
+ the active side.
+
:tabprevious
:tabp[revious]
switch to the previous tab (wrapping around).
:tabp[revious] {n}
- go to the {n}-th previous tab. Note that :tabnext handles its
+ go to the {n}-th previous tab. Note that :tabnext handles its
argument differently.
:touch
:[line]touch file...
- create files at specified paths. Aborts on errors. Doesn't
- update time of existing files. The [line] can be used to pick
+ create files at specified paths. Aborts on errors. Doesn't up-
+ date time of existing files. The [line] can be used to pick
node in a tree-view. Macros are expanded.
:tr
:[range]tr/pattern/string/
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 char-
+ in pattern to the corresponding character in string. When
+ string is shorter than pattern, it's padded with its last char-
acter.
:trashes
:trashes
lists all valid trash directories in a menu. Only non-empty and
- writable trash directories are shown. This is exactly the list
+ 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 direc-
+ same as :trashes, but also displays size of each trash direc-
tory.
:tree
- :tree turn pane into tree view with current directory as its root.
- The tree view is implemented on top of a custom view, but is
- automatically kept in sync with file system state and considers
- all the filters. Thus the structure corresponds to what one
- would see on visiting the directories manually. As a special
- case for trees built out of custom view file-system tracking
+ :tree turn pane into tree view with current directory as its root.
+ The tree view is implemented on top of a custom view, but is au-
+ tomatically kept in sync with file system state and considers
+ all the filters. Thus the structure corresponds to what one
+ would see on visiting the directories manually. As a special
+ case for trees built out of custom view file-system tracking
isn't performed.
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
+ 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.
+
:tree! toggle current view in and out of tree mode.
:undolist
:undol[ist]
display list of latest changes. Use "!" to see actual commands.
+ See "Menus and dialogs" section for controls.
:unlet
@@ -2744,8 +2951,8 @@ Commands
:view
:vie[w]
- toggle on and off the quick file view. See also 'quickview'
- option.
+ toggle on and off the quick file view (preview of file's con-
+ tents). See also 'quickview' option.
:vie[w]!
turn on quick file view if it's off.
@@ -2755,7 +2962,8 @@ Commands
:volumes
only for MS-Windows
display menu with volume list. Hitting l (or Enter) key opens
- appropriate volume in the current pane.
+ appropriate volume in the current pane. See "Menus and dialogs"
+ section for controls.
:vsplit
@@ -2766,9 +2974,9 @@ Commands
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).
+ split the window vertically to show both file directories. And
+ changes other pane to path (absolute or relative to current di-
+ rectory of active pane).
:wincmd
@@ -2783,7 +2991,7 @@ Commands
:winrun
:winrun type [command...]
- execute command for pane(s), which is determined by type argu-
+ execute command for pane(s), which is determined by type argu-
ment:
- ^ - top-left pane
- $ - bottom-right pane
@@ -2794,16 +3002,18 @@ Commands
:write
:w[rite]
- write vifminfo file.
+ write current state to vifminfo and session files (if a session
+ is active).
:wq
- :wq[!] same as :quit, but ! only disables check of backgrounded com-
- mands. :wqall
+ :wq[!] same as :quit, but ! disables only the check of backgrounded
+ commands, while state of the application is always written.
+ :wqall
:wqa[ll][!]
- same as :qall, but ! only disables check of backgrounded com-
- mands.
+ same as :qall, but ! disables only the check of backgrounded
+ commands, while state of the application is always written.
:xall
@@ -2829,7 +3039,7 @@ Commands
map lhs key sequence to rhs in command line mode.
- :cmap :dmap :mmap :nmap :qmap
+ :cmap :dmap :mmap :nmap :qmap
:vmap
:cm[ap] lhs rhs
@@ -2874,7 +3084,7 @@ Commands
:*map beginning
:cm[ap] beginning
- list all maps in command line mode that start with the begin-
+ list all maps in command line mode that start with the begin-
ning.
:dm[ap] beginning
@@ -2896,67 +3106,67 @@ Commands
:no[remap] lhs rhs
map the key sequence lhs to rhs for normal and visual modes, but
- disallow mapping of rhs.
+ don't expand user mappings in rhs.
:no[remap]! lhs rhs
- map the key sequence lhs to rhs for command line mode, but dis-
- allow mapping of rhs.
+ map the key sequence lhs to rhs for command line mode, but don't
+ expand user mappings in rhs.
- :cnoremap :dnoremap :mnoremap :nnoremap :qnoremap
+ :cnoremap :dnoremap :mnoremap :nnoremap :qnoremap
:vnoremap
:cno[remap] lhs rhs
- map the key sequence lhs to rhs for command line mode, but dis-
- allow mapping of 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 disallow
- mapping of rhs.
+ map the key sequence lhs to rhs for dialog modes, but don't ex-
+ pand user mappings in rhs.
:mn[oremap] lhs rhs
- map the key sequence lhs to rhs for menu mode, but disallow map-
- ping of 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 disallow
- mapping of rhs.
+ map the key sequence lhs to rhs for normal mode, but don't ex-
+ pand user mappings in rhs.
:qn[oremap] lhs rhs
- map the key sequence lhs to rhs for view mode, but disallow map-
- ping of 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 disallow
- mapping of rhs.
+ map the key sequence lhs to rhs for visual mode, but don't ex-
+ pand user mappings in rhs.
:unmap
:unm[ap] lhs
- remove the mapping of lhs from normal and visual modes.
+ remove user mapping of lhs from normal and visual modes.
:unm[ap]! lhs
- remove the mapping of lhs from command line mode.
+ remove user mapping of lhs from command line mode.
:cunmap :dunmap :munmap :nunmap :qunmap
:vunmap
:cu[nmap] lhs
- remove the mapping of lhs from command line mode.
+ remove user mapping of lhs from command line mode.
:du[nmap] lhs
- remove the mapping of lhs from dialog modes.
+ remove user mapping of lhs from dialog modes.
:mu[nmap] lhs
- remove the mapping of lhs from menu mode.
+ remove user mapping of lhs from menu mode.
:nun[map] lhs
- remove the mapping of lhs from normal mode.
+ remove user mapping of lhs from normal mode.
:qun[map] lhs
- remove the mapping of lhs from view mode.
+ remove user mapping of lhs from view mode.
:vu[nmap] lhs
- remove the mapping of lhs from visual mode.
+ remove user mapping of lhs from visual mode.
Ranges
The ranges implemented include:
@@ -2978,7 +3188,7 @@ Ranges
:.,$delete
- would delete the files from the current position to the end of the
+ would delete the files from the current position to the end of the
filelist.
:3delete4
@@ -2993,16 +3203,17 @@ Ranges
Command macros
The command macros may be used in user commands.
- %a User arguments. When user arguments contain macros, they are
+ %a User arguments. When user arguments contain macros, they are
expanded before preforming substitution of %a.
%c %"c The current file under the cursor.
%C %"C The current file under the cursor in the other directory.
- %f %"f All of the selected files.
+ %f %"f All of the selected files, but see "Selection" section below.
- %F %"F All of the selected files in the other directory list.
+ %F %"F All of the selected files in the other directory list, but see
+ "Selection" section below.
%b %"b Same as %f %F.
@@ -3026,28 +3237,41 @@ Command macros
%U Same as %u, but implies less list updates inside vifm, which is
absence of sorting at the moment.
- %Iu same as %u, but gives up terminal before running external com-
+ %Iu Same as %u, but gives up terminal before running external com-
mand.
- %IU same as %U, but gives up terminal before running external com-
+ %IU Same as %U, but gives up terminal before running external com-
mand.
%S Show command output in the status bar.
- %q redirect command output to quick view, which is activated if
+ %q Redirect command output to quick view, which is activated if
disabled.
- %s Execute command in split window of active terminal multiplexer
- (ignored if not running inside one).
+ %s Execute command in horizontally split window of active terminal
+ multiplexer (ignored if not running inside one).
+
+ %v Same as %s, but splits vertically.
- %n Forbid using of terminal multiplexer to run the command.
+ %n Forbid use of terminal multiplexer to run the command.
- %i Completely ignore command output.
+ %i Completely ignore command output. For background jobs this sup-
+ presses error dialogs, while still storing errors internally for
+ viewing via :jobs menu.
+ %Pl Pipe list of files to standard input of a command.
- %pc Marks end of the main command and beginning of the clear command
- for graphical preview, which is invoked on closing preview of a
- file.
+ %Pz Same as %Pz, but separates paths by null ('\0') character.
+
+ %pc Marks the end of the main command and the beginning of the clear
+ command for graphical preview, which is invoked on closing pre-
+ view of a file.
+
+ %pd Marks a preview command as one that directly communicates with
+ the terminal. Beware that this is for things like sixel which
+ are self-contained sequences that depend only on current cursor
+ position, using this with anything else is likely to mangle ter-
+ minal state.
The following dimensions and coordinates are in characters:
@@ -3062,8 +3286,12 @@ Command macros
Use %% if you need to put a percent sign in your command.
- Note that %m, %M, %s, %S, %i, %u and %U macros are mutually exclusive.
- Only the last one of them on the command will take effect.
+ 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 on the command will
+ take effect.
+
+ Note that %Pl and %Pz are mutually exclusive. Only the last one of
+ them on the command will take effect.
You can use file name modifiers after %c, %C, %f, %F, %b, %d and %D
macros. Supported modifiers are:
@@ -3093,8 +3321,8 @@ Command macros
- :gs?pat?sub? - like :s, but substitutes all occurrences of pat with
sub.
- See ':h filename-modifiers' in Vim's documentation for the detailed
- description.
+ See ':h filename-modifiers' in Vim's documentation for the detailed de-
+ scription.
Using %x means expand corresponding macro escaping all characters that
have special meaning. And %"x means using of double quotes and escape
@@ -3152,12 +3380,12 @@ Command backgrounding
:move or :delete command in the background just add " &" at the end of
a command.
- For each background operation a new thread is created. Currently job
- cannot be stopped or paused.
+ For each background operation a new thread is created. Job cancella-
+ tion can be requested in the :jobs menu via dd shortcut.
You can see if command is still running in the :jobs menu. Back-
- grounded commands have progress instead of process id at the line
- beginning.
+ grounded commands have progress instead of process id at the line be-
+ ginning.
Background operations cannot be undone.
@@ -3206,8 +3434,47 @@ Cancellation
External application calls
- Each of this operations can be cancelled: :apropos, :find, :grep,
- :locate.
+ Each of this operations can be cancelled: :apropos, :find, :grep, :lo-
+ cate.
+
+Selection
+ If 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, oth-
+ erwise 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. Consis-
+ tency 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 nat-
+ ural 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:
+
+
+ 1. If there any files for which handler isn't defined, then all files
+ are opened using 'vicmd' or 'vixcmd'.
+
+
+ 2. If all handlers match the following criteria:
+ - backgrounded
+ - include `%c` and/or `%C`
+ - include neither `%f` nor `%F`
+ then each file is executed independently of the rest.
+
+
+ 3. If all handlers are equal, the common handler is executed. This
+ handler might ignore selection and process only file under the
+ cursor.
+
+
+ 4. Otherwise, an error is reported, because handlers differ and they
+ don't support parallel execution.
Patterns
:highlight, :filetype, :filextype, :fileviewer commands and 'classify'
@@ -3228,11 +3495,15 @@ Patterns
6. undecorated-pattern
- Flags of regular expressions mean the following:
- - "i" makes filter case insensitive;
- - "I" makes filter case sensitive. They can be repeated multiple
- times, but the later one takes precedence (e.g. "iiiI" is equivalent
- to "I" and "IiIi" is the same as "i").
+ First five forms can include leading exclamation mark that negates pat-
+ tern 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:
@@ -3244,28 +3515,47 @@ Patterns
list of patterns instead of a single pattern, thus effectively handling
OR operation on them:
<text/plain>{*.vifm},<application/pdf>{*.pdf}
+ Forms that accept comma-separated lists of patterns also process them
+ as lists of alternatives.
- Five first forms can include leading exclamation mark that negates pat-
- tern matching.
+ Patterns with regular expressions
- 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.
+ Regular expression patterns are case insensitive by default, see de-
+ scription of commands, which might override default behaviour.
+
+ Flags of regular expressions mean the following:
+ - "i" makes filter case insensitive;
+ - "I" makes filter case sensitive. They can be repeated multiple
+ times, but the later one takes precedence (e.g. "iiiI" is equivalent
+ to "I" and "IiIi" is the same as "i").
+
+ There are no implicit `^` or `$`, so make sure to specify them explic-
+ itly if the pattern should match the whole name or path.
- Regular expression patterns are case insensitive by default, see
- description of commands, which might override default behaviour.
+ Patterns with globs
- "Globs" section below provides short overview of globs and some impor-
+ "Globs" section below provides short overview of globs and some impor-
tant points that one needs to know about them.
- 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
+ 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/` di-
+ rectory (excluding its subdirectories):
+
+ :filextype //^/home/user/downloads/[^/]*.pdf$// evince %f
+
+
Globs
Globs are always case insensitive as it makes sense in general case.
- *, ?, [ and ] are treated as special symbols in the pattern. E.g.
+ `*`, `?`, `[` and `]` are treated as special symbols in the pattern.
+ E.g.
:filetype * less %c
@@ -3273,23 +3563,24 @@ Globs
:filetype [*] less %c
- matches only one file name, the one which contains only asterisk sym-
+ matches only one file name, the one which contains only asterisk sym-
bol.
- * means any number of any characters (possibly an empty substring),
+ `*` 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.
+ 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.
+ `?` means any character at this position. E.g.
:fileviewer ?.out file %c
- calls file tool for all files which has exactly one character before
+ 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 char-
@@ -3298,25 +3589,28 @@ Globs
:fileviewer *.[ch] highlight -O xterm256 -s dante --syntax c %c
- makes vifm call highlight program to colorize source and header files
+ 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 negotiation
- and the - symbol to set a range. ^ and ! should appear right after the
- opening square bracket. For example
+ Inside square brackets `^` or `!` can be used for symbol class negotia-
+ tion 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
+ 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.
+ associates `sxiv` picture viewer only for JPEG-files that contain sin-
+ gle digit in their name.
+
+ If you need to include literal comma, which is normally separates mul-
+ tiple globs, double it.
:set options
Local options
@@ -3324,43 +3618,43 @@ Globs
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
+ In addition to being local to views, each such option also has
two values:
- - local to current directory (value associated with current
+ - local to current directory (value associated with current
location);
- - global to current directory (value associated with the
+ - global to current directory (value associated with the
pane).
- 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
+ The idea is that current directory can be made a temporary ex-
+ ception 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
default: "apropos %a"
- Specifies format for an external command to be invoked by the
+ Specifies format for an external command to be invoked by the
:apropos command. The format supports expanding of macros, spe-
- cific for a particular *prg option, and %% sequence for insert-
- ing percent sign literally. This option should include the %a
- macro to specify placement of arguments passed to the :apropos
- command. If the macro is not used, it will be implicitly added
+ cific for a particular *prg option, and %% sequence for insert-
+ ing percent sign literally. This option should include the %a
+ macro to specify placement of arguments passed to the :apropos
+ command. If the macro is not used, it will be implicitly added
after a space to the value of this option.
'autochpos'
type: boolean
default: true
When disabled vifm will set cursor to the first line in the view
- after :cd and :pushd commands instead of saved cursor position.
- Disabling this will also make vifm clear information about cur-
+ after :cd and :pushd commands instead of saved cursor position.
+ Disabling this will also make vifm clear information about cur-
sor position in the view history on :cd and :pushd commands (and
- on startup if 'autochpos' is disabled in the vifmrc). l key in
- the ":history ." and ":trashes" menus are treated like :cd com-
- mand. This option also affects marks so that navigating to a
+ on startup if 'autochpos' is disabled in the vifmrc). l key in
+ the ":history ." and ":trashes" menus are treated like :cd com-
+ mand. This option also affects marks so that navigating to a
mark doesn't restore cursor position.
When this option is enabled, more fine grained control over cur-
@@ -3374,19 +3668,19 @@ Globs
'caseoptions'
type: charset
default: ""
- This option gives additional control over case sensitivity by
- allowing overriding default behaviour to either always be case
- sensitive or always be case insensitive. Possible values form
- pairs of lower and upper case letters that configure specific
+ This option gives additional control over case sensitivity by
+ allowing overriding default behaviour to either always be case
+ sensitive or always be case insensitive. Possible values form
+ pairs of lower and upper case letters that configure specific
aspect of behaviour:
p - always ignore case of paths during completion.
P - always match case of paths during completion.
g - always ignore case of characters for f/F/;/,.
G - always match case of characters for f/F/;/,.
- 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 ele-
- ments are present, the behaviour is default (depends on operat-
+ 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 ele-
+ ments are present, the behaviour is default (depends on operat-
ing system for path completion and on values of 'ignorecase' and
'smartcase' options for file navigation).
@@ -3394,8 +3688,8 @@ Globs
type: string list
default: value of $CDPATH with commas instead of colons
Specifies locations to check on changing directory with relative
- path that doesn't start with "./" or "../". When non-empty,
- current directory is examined after directories listed in the
+ path that doesn't start with "./" or "../". When non-empty,
+ current directory is examined after directories listed in the
option.
This option doesn't affect completion of :cd command.
@@ -3404,14 +3698,14 @@ Globs
set cdpath=~
- This way ":cd bin" will switch to "~/bin" even if directory
- named "bin" exists in current directory, while ":cd ./bin" com-
+ This way ":cd bin" will switch to "~/bin" even if directory
+ named "bin" exists in current directory, while ":cd ./bin" com-
mand will ignore value of 'cdpath'.
'chaselinks'
type: boolean
default: false
- When enabled path of view is always resolved to real path (with
+ When enabled path of view is always resolved to real path (with
all symbolic links expanded).
'classify'
@@ -3421,22 +3715,22 @@ Globs
or name. The format is either of:
- [{prefix}]:{filetype}:[{suffix}]
- [{prefix}]::{pattern}::[{suffix}]
- Possible {pattern} forms are described in "Patterns" section
+ Possible {pattern} forms are described in "Patterns" section
above.
Priority rules:
- file name patterns have priority over type patterns
- - file name patterns are matched in left-to-right order of
+ - file name patterns are matched in left-to-right order of
their appearance in this option
Either {prefix} or {suffix} or both can be omitted (which is the
- default for all unspecified file types), this means empty {pre-
- fix} 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()
+ default for all unspecified file types), this means empty {pre-
+ fix} 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'
@@ -3444,67 +3738,69 @@ Globs
default: delete,permdelete
Defines which operations require confirmation:
- delete - moving files to trash (on d or :delete);
- - permdelete - permanent deletion of files (on D or :delete!
+ - permdelete - permanent deletion of files (on D or :delete!
command or on undo/redo operation).
'cpoptions' 'cpo'
type: charset
default: "fst"
- Contains a sequence of single-character flags. Each flag
- enables behaviour of older versions of vifm. Flags:
- - f - when included, running :filter command results in not
- inverted (matching files are filtered out) and :filter! in
- inverted (matching files are left) filter, when omitted, meaning
+ Contains a sequence of single-character flags. Each flag en-
+ ables behaviour of older versions of vifm. Flags:
+ - f - when included, running :filter command results in not in-
+ verted (matching files are filtered out) and :filter! in in-
+ verted (matching files are left) filter, when omitted, meaning
of the exclamation mark changes to the opposite;
- - s - when included, yy, dd and DD normal mode commands act on
+ - s - when included, yy, dd and DD normal mode commands act on
selection, otherwise they operate on current file only;
- - t - when included, <tab> (thus <c-i>) behave as <space> and
- switches active pane, otherwise <tab> and <c-i> go forward in
+ - t - when included, <tab> (thus <c-i>) behave as <space> and
+ switches active pane, otherwise <tab> and <c-i> go forward in
the view history. It's possible to make both <tab> and <c-i> to
- work as expected by setting up the terminal to emit a custom
- sequence when <c-i> is pressed; see :histnext for details.
+ work as expected by setting up the terminal to emit a custom se-
+ quence when <c-i> is pressed; see :histnext for details.
'cvoptions'
type: set
default:
- Specifies whether entering/leaving custom views triggers events
+ Specifies whether entering/leaving custom views triggers events
that normally happen on entering/leaving directories:
- autocmds - trigger autocommands on entering/leaving custom
views;
- - localopts - reset local options on entering/leaving custom
+ - localopts - reset local options on entering/leaving custom
views;
- - localfilter - reset local filter on entering/leaving custom
+ - localfilter - reset local filter on entering/leaving custom
views.
'deleteprg'
type: string
default: ""
- Specifies program to run on files that are permanently removed.
- When empty, files are removed as usual, otherwise this command
- is invoked on each file by appending its name. If the command
+ Specifies program to run on files that are permanently removed.
+ When empty, files are removed as usual, otherwise this command
+ is invoked on each file by appending its name. If the command
doesn't remove files, they will remain on the file system.
'dirsize'
type: enumeration
default: size
- Controls how size of directories is displayed in file views.
+ Controls how size of directories is displayed in file views.
The following values are possible:
- - size - size of directory (i.e., size used to store list of
+ - size - size of directory (i.e., size used to store list of
files)
- - nitems - number of entries in the directory (excluding . and
+ - nitems - number of entries in the directory (excluding . and
..)
- Size obtained via ga/gA overwrites this setting so seeing count
+ Size obtained via ga/gA overwrites this setting so seeing count
of files and occasionally size of directories is possible.
'dotdirs'
type: set
- default: nonrootparent
- Controls displaying of dot directories. The following values
+ default: nonrootparent,treeleafsparent
+ Controls displaying of dot directories. The following values
are possible:
- - rootparent - show "../" in root directory of file system
- - nonrootparent - show "../" in non-root directories of file
+ - rootparent - show "../" in root directory of file system
+ - nonrootparent - show "../" in non-root directories of file
system
+ - treeleafsparent - show "../" in empty directories of tree
+ view
Note that empty directories always contain "../" entry regard-
less of value of this option. "../" disappears at the moment at
@@ -3541,48 +3837,64 @@ Globs
default: "find %s %a -print , -type d \( ! -readable -o ! -exe-
cutable \) -prune"
Specifies format for an external command to be invoked by the
- :find command. The format supports expanding of macros, spe-
- cific for a particular *prg option, and %% sequence for insert-
- ing percent sign literally. This option should include the %s
- macro to specify placement of list of paths to search in and %a
- or %A macro to specify placement of arguments passed to the
- :find command. If some of the macros are not used, they will be
- implicitly added after a space to the value of the option in the
- following order: %s, %a. Note that when neither %a nor %A are
- specified, it's %a which is added implicitly.
-
- The macros can slightly change their meaning depending on :find
- command arguments. When the first argument points to an exist-
- ing directory, %s is assigned all arguments and %a/%A are left
- empty. Otherwise, %s is assigned a dot (".") meaning current
- directory or list of selected file names, if any. %a/%A are
- assigned arguments when first argument starts with a dash ("-"),
- otherwise %a gets an escaped version of arguments, prepended by
- "-name" (on *nix) or "-iname" (on Windows) predicate.
-
- %a and %A macros contain almost the same value, the difference
- is that %a can be escaped and %A is never escaped. %A is to be
- used mainly on Windows, where shell escaping is a mess and can
- break command execution.
-
- Optional %u or %U macro could be used (if both specified %U is
- chosen) to force redirection to custom or unsorted custom view
- respectively.
-
- Starting from 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 in this case.
- The command looks for files only completely ignoring directo-
- ries.
+ :find command. The format supports expansion of macros specific
+ for this particular option and %% sequence for inserting percent
+ sign literally. The macros are:
+
+ macro value/meaning
+ %s literal arguments of :find or
+ list of paths to search in
+
+ %A empty or
+ literal arguments of :find
+ %a empty or
+ literal arguments of :find or
+ predicate followed by escaped arguments of :find
+ %p empty or
+ literal arguments of :find or
+ escaped arguments (parameters) of :find
+
+ %u redirect output to custom view instead of showing a
+ menu
+ %U redirect output to unsorted 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:
+ - if %s isn't present, it's appended
+ - if neither of %a, %A and %p is present, %a is appended
+ - if neither of %s, %a, %A and %p is present, %s and %a are ap-
+ pended in this order
+
+ The macros slightly change their meaning depending on format of
+ :find's arguments:
+ - if the first argument points to an existing directory, %s is
+ assigned all arguments while %a, %A and %p are left empty
+ - otherwise:
+ - %s is assigned a dot (".") meaning current directory or
+ list of selected file names, if any
+ - %a, %A and %p are assigned literal arguments when first
+ argument starts with a dash ("-"), otherwise %a gets an escaped
+ version of the arguments with a predicate and %p contains es-
+ caped version of the arguments
+
+ Starting with Windows Server 2003 a `where` command is avail-
+ able. 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"
+ set findprg="find %s %a"
+
'followlinks'
type: boolean
@@ -3596,13 +3908,12 @@ Globs
type: string
default: "($XDG_DATA_HOME/.local/share | $VIFM)/fuse/"
Directory to be used as a root dir for FUSE mounts. Value of
- the option can contain environment variables (in form
- "$envname"), which will be expanded (prepend it with a slash to
- prevent expansion). The value should expand to an absolute
- path.
+ the option can contain environment variables (in form "$en-
+ vname"), which will be expanded (prepend it with a slash to pre-
+ vent expansion). The value should expand to an absolute path.
- If you change this option, vifm won't remount anything. It
- affects future mounts only. See "Automatic FUSE mounts" section
+ If you change this option, vifm won't remount anything. It af-
+ fects future mounts only. See "Automatic FUSE mounts" section
below for more information.
'gdefault' 'gd'
@@ -3613,32 +3924,32 @@ Globs
'grepprg'
type: string
default: "grep -n -H -I -r %i %a %s"
- Specifies format for an external command to be invoked by the
- :grep command. The format supports expanding of macros, spe-
- cific for a particular *prg option, and %% sequence for insert-
- ing percent sign literally. This option should include the %i
- macro to specify placement of "-v" string when inversion of
- results is requested, %a or %A macro to specify placement of
- arguments passed to the :grep command and the %s macro to spec-
- ify placement of list of files to search in. If some of the
- macros are not used, they will be implicitly added after a space
- to the value of the 'grepprg' option in the following order: %i,
- %a, %s. Note that when neither %a nor %A are specified, it's %a
+ Specifies format for an external command to be invoked by the
+ :grep command. The format supports expanding of macros, spe-
+ cific for a particular *prg option, and %% sequence for insert-
+ ing percent sign literally. This option should include the %i
+ macro to specify placement of "-v" string when inversion of re-
+ sults is requested, %a or %A macro to specify placement of argu-
+ ments passed to the :grep command and the %s macro to specify
+ placement of list of files to search in. If some of the macros
+ are not used, they will be implicitly added after a space to the
+ value of the 'grepprg' option in the following order: %i, %a,
+ %s. Note that when neither %a nor %A are specified, it's %a
which is added implicitly.
- Optional %u or %U macro could be used (if both specified %U is
- chosen) to force redirection to custom or unsorted custom view
+ 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
+ See 'findprg' option for description of difference between %a
and %A.
- Example of setup to use ack (http://beyondgrep.com/) instead of
+ 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_sil-
+ or The Silver Searcher (https://github.com/ggreer/the_sil-
ver_searcher):
set grepprg='ag --line-numbers %i %a %s'
@@ -3648,16 +3959,16 @@ Globs
'histcursor'
type: set
default: startup,dirmark,direnter
- Defines situations when cursor should be moved according to
- directory history:
+ Defines situations when cursor should be moved according to di-
+ rectory history:
- startup - on loading file lists during startup
- - dirmark - after navigating to a mark that doesn't specify
+ - dirmark - after navigating to a mark that doesn't specify
file
- direnter - on opening directory from a file list
This option has no effect when 'autochpos' is disabled.
- Note that the list is not exhaustive and there are other situa-
+ Note that the list is not exhaustive and there are other situa-
tions when cursor is positioned automatically.
'history' 'hi'
@@ -3668,33 +3979,33 @@ Globs
'hlsearch' 'hls'
type: boolean
default: true
- Highlight all matches of search pattern.
+ Automatically select files that are search matches.
'iec' type: boolean
default: false
- Use KiB, MiB, ... suffixes instead of K, M, ... when printing
+ Use KiB, MiB, ... suffixes instead of K, M, ... when printing
size in human-friendly format.
'ignorecase' 'ic'
type: boolean
default: false
- Ignore case in search patterns (:substitute, / and ? commands)
- and characters after f and F commands. It doesn't affect file
- filtering.
+ Ignore case in search patterns (:substitute, / and ? commands),
+ local filter (but not the rest of filters) and other things de-
+ tailed in the description of 'caseoptions'.
'incsearch' 'is'
type: boolean
default: false
When this option is set, search and view update for local filter
- is be performed starting from initial cursor position each time
+ is be performed starting from initial cursor position each time
search pattern is changed.
'iooptions'
type: set
default:
- Controls details of file operations. The following values are
+ Controls details of file operations. The following values are
available:
- - fastfilecloning - perform fast file cloning (copy-on-write),
+ - fastfilecloning - perform fast file cloning (copy-on-write),
when available
(available on Linux and btrfs file system).
@@ -3711,23 +4022,27 @@ Globs
'locateprg'
type: string
default: "locate %a"
- Specifies format for an external command to be invoked by the
- :locate command. The format supports expanding of macros, spe-
- cific for a particular *prg option, and %% sequence for insert-
- ing percent sign literally. This option should include the %a
- macro to specify placement of arguments passed to the :locate
- command. If the macro is not used, it will be implicitly added
+ Specifies format for an external command to be invoked by the
+ :locate command. The format supports expanding of macros, spe-
+ cific for a particular *prg option, and %% sequence for insert-
+ ing percent sign literally. This option should include the %a
+ macro to specify placement of arguments passed to the :locate
+ command. If the macro is not used, it will be implicitly added
after a space to the value of this option.
- Optional %u or %U macro could be used (if both specified %U is
- chosen) to force redirection to custom or unsorted custom view
+ 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
- default: path to bundled script that supports udevil and udisks
+ default: path to bundled script that supports udevil, udisks and
+ udisks2
+ (using udisks2 requires python with dbus module in-
+ stalled)
+ OS X: path points to a python script that uses diskutil
{only for *nix}
- Specifies command to be used to manage media devices. Used by
+ Specifies command to be used to manage media devices. Used by
:media command.
The command can be passed the following parameters:
@@ -3735,22 +4050,25 @@ Globs
- mount {device} -- mount a device
- unmount {path} -- unmount given mount point
- The output of `list` subcommand is parsed in search of lines
+ The output of `list` subcommand is parsed in search of lines
that start with one of the following prefixes:
- device= - specifies device path (e.g., "/dev/sde")
- label= - specifies optional device label (e.g., "Memory
card")
- - mount-point= - specifies a mount point (can be absent or
- appear more than once)
-
- All other lines are ignored. Each `device=` starts a new sec-
+ - info= - specifies arbitrary text to display next to
+ device (by
+ default "[label]" is used, if label is pro-
+ vided)
+ - mount-point= - specifies a mount point (can be absent or ap-
+ pear more than once)
+
+ All other lines are ignored. Each `device=` starts a new sec-
tion describing a device which should include two other possible
prefixes.
- `list` subcommand is assumed to always succeed, while error
- stream and exit code of `mount` and `unmount` is taken into
- account to determine whether operation was performed success-
- fully.
+ `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
@@ -3775,7 +4093,7 @@ Globs
'milleroptions'
type: string list
- default: "lsize:1,csize:1,rsize:1"
+ default: "lsize:1,csize:1,rsize:1,rpreview:dirs"
scope: local
Configures miller view.
@@ -3784,12 +4102,18 @@ Globs
lsize:num 0 left column
csize:num 1 center column (can't be disabled)
rsize:num 0 right column
+ rpreview:str dirs right column
*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.
- Example of two-column mode which is useful in combination with
+ rpreview specifies what file-system objects should be previewed
+ in the right column and can take two values: dirs (only directo-
+ ries) or all. Both options don't include parent directory
+ ("..").
+
+ Example of two-column mode which is useful in combination with
:view command:
set milleroptions=lsize:1,csize:2
@@ -3799,26 +4123,26 @@ Globs
type: boolean
default: false
scope: local
- When this option is set, directory view will be displayed in
+ When this option is set, directory view will be displayed in
multiple cascading columns. Ignores 'lsview'.
'mintimeoutlen'
type: integer
default: 150
- The fracture of 'timeoutlen' in milliseconds that is waited
- between subsequent input polls, which affects various asynchro-
- nous operations (detecting changes made by external applica-
- tions, monitoring background jobs, redrawing UI). There are no
- strict guarantees, however the higher this value is, the less is
- CPU load in idle mode.
+ The fracture of 'timeoutlen' in milliseconds that is waited be-
+ tween subsequent input polls, which affects various asynchronous
+ operations (detecting changes made by external applications,
+ monitoring background jobs, redrawing UI). There are no strict
+ guarantees, however the higher this value is, the less is CPU
+ load in idle mode.
'number' 'nu'
type: boolean
default: false
scope: local
- Print line number in front of each file name when 'lsview'
- option is turned off. Use 'numberwidth' to control width of
- line number. Also see 'relativenumber'.
+ Print line number in front of each file name when 'lsview' op-
+ tion is turned off. Use 'numberwidth' to control width of line
+ number. Also see 'relativenumber'.
'numberwidth' 'nuw'
type: integer
@@ -3826,6 +4150,28 @@ Globs
scope: local
Minimal number of characters for line number field.
+ 'previewoptions'
+ type: string list
+ default: "graphicsdelay:50000"
+
+ Tweaks how previewing is done (in quick view, miller view's col-
+ umn and view mode).
+
+ item default meaning
+ graphicsdelay:num 0 delay before drawing graphics (mi-
+ croseconds)
+ hardgraphicsclear unset redraw screen to get rid of graph-
+ ics
+ toptreestats unset show file counts before the tree
+
+ 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 re-
+ drawing.
+
'previewprg'
type: string
default: ""
@@ -3877,16 +4223,21 @@ Globs
ones)
%x - number of files excluded by filters
%0- - old name for %x macro
+ %P - percentage through file list (All, Top, xx% or Bot), al-
+ ways 3 in length
%S - number of displayed files
%= - separation point between left and right align items
- %% - percent sign
+ %% - literal percent sign
%[ - designates beginning of an optional block
%] - designates end of an optional block
- Percent sign can be followed by optional minimum field width.
+ 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%]'
@@ -3894,38 +4245,69 @@ Globs
'runexec'
type: boolean
default: false
- Run executable file on Enter or l.
+ Run executable file on Enter, l or Right Arrow key. Behaviour
+ of the last two depends on the value of the 'lsview' option.
'scrollbind' 'scb'
type: boolean
default: false
- When this option is set, vifm will try to keep difference of
+ When this option is set, vifm will try to keep difference of
scrolling positions of two windows constant.
'scrolloff' 'so'
type: integer
default: 0
- Minimal number of screen lines to keep above and below the cur-
- sor. If you want cursor line to always be in the middle of the
+ Minimal number of screen lines to keep above and below the cur-
+ sor. If you want cursor line to always be in the middle of the
view (except at the beginning or end of the file list), set this
option to some large value (e.g. 999).
+ 'sessionoptions' 'ssop'
+ sessionoptions ssop
+ type: set
+ default: tui,state,tabs,savedirs,dhistory
+ An equivalent of 'vifminfo' for sessions, uses the same values.
+ When both options include the same value, data from session file
+ has higher priority (data from vifminfo isn't necessarily com-
+ pletely discarded, instead it's merged with the state of a ses-
+ sion the same way state of multiple instances is merged on
+ exit).
+
'shell' 'sh'
type: string
default: $SHELL or "/bin/sh" or "cmd" (on MS-Windows)
Full path to the shell to use to run external commands. On *nix
a shell argument can be supplied.
+ 'shellcmdflag' 'shcf'
+ type: string
+ default: "-c" or "/C" (for cmd.exe on MS-Windows)
+ Command-line option used to pass a command to 'shell'. It's
+ used in contexts where command comes from the user.
+
+ 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 ses-
+ sion. You can't even run such a shell in background. Consider
+ writing a wrapper for your shell that preloads aliases and com-
+ mands 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 Power-
+ Shell due to the internal use of `-encodedCommand`.
+
'shortmess' 'shm'
type: charset
default: "p"
- Contains a sequence of single-character flags. Each flag
- enables shortening of some message displayed by vifm in the TUI.
+ Contains a sequence of single-character flags. Each flag en-
+ ables shortening of some message displayed by vifm in the TUI.
Flags:
- - M - shorten titles in windows of terminal multiplexers cre-
+ - L - display only last directory in tab line instead of full
+ path.
+ - M - shorten titles in windows of terminal multiplexers cre-
ated by vifm down to file name instead of using full path.
- - T - truncate status-bar messages in the middle if they are
- too long to fit on the command line. "..." will appear in the
+ - T - truncate status-bar messages in the middle if they are
+ too long to fit on the command line. "..." will appear in the
middle.
- p - use tilde shortening in view titles.
@@ -3935,11 +4317,11 @@ Globs
default: multiple
Specifies when tab line should be displayed. Possible values:
- never - never display tab line
- - multiple - show tab line only when there are at least two
+ - multiple - show tab line only when there are at least two
tabs
- always - display tab line always
- Alternatively 0, 1 and 2 Vim-like values are also accepted and
+ Alternatively 0, 1 and 2 Vim-like values are also accepted and
correspond to "never", "multiple" and "always" respectively.
@@ -3949,39 +4331,44 @@ Globs
Configures the way size is formatted in human-friendly way.
item value meaning
- units: iec Use 1024 byte units (K or KiB,
+ units: iec Use 1024 byte units (K or KiB,
etc.).
See 'iec' option.
si Use 1000 byte units (KB, etc.).
precision: i > 0 How many fraction digits to con-
sider.
- {not set} Precision of 1 for integer part
+ {not set} Precision of 1 for integer part
< 10,
0 otherwise (provides old behav-
iour).
+ space {present} Insert space before unit sym-
+ bols.
+ This is the default.
+ nospace {present} Do not insert space before unit
+ symbols.
Numbers are rounded from zero. Trailing zeros are dropped.
Example:
- set sizefmt=units:iec,precision:2
+ set sizefmt=units:iec,precision:2,nospace
'slowfs'
type: string list
default: ""
only for *nix
- A list of mounter fs name beginnings (first column in /etc/mtab
- or /proc/mounts) or paths prefixes for fs/directories that work
- too slow for you. This option can be used to stop vifm from
- making some requests to particular kinds of file systems that
- can slow down file browsing. Currently this means don't check
+ A list of mounter fs name beginnings (first column in /etc/mtab
+ or /proc/mounts) or paths prefixes for fs/directories that work
+ too slow for you. This option can be used to stop vifm from
+ making some requests to particular kinds of file systems that
+ can slow down file browsing. Currently this means don't check
if directory has changed, skip check if target of symbolic links
- exists, assume that link target located on slow fs to be a
- directory (allows entering directories and navigating to files
- via gf). If you set the option to "*", it means all the systems
- are considered slow (useful for cygwin, where all the checks
- might render vifm very slow if there are network mounts).
+ exists, assume that link target located on slow fs to be a di-
+ rectory (allows entering directories and navigating to files via
+ gf). If you set the option to "*", it means all the systems are
+ considered slow (useful for cygwin, where all the checks might
+ render vifm very slow if there are network mounts).
Example for autofs root /mnt/autofs:
@@ -3990,20 +4377,20 @@ Globs
'smartcase' 'scs'
type: boolean
default: false
- Overrides the ignorecase option if the search pattern contains
- at least one upper case character. Only used when ignorecase
- option is enabled. It doesn't affect file filtering.
+ Overrides the ignorecase option if a pattern contains at least
+ one upper case character. Only used when 'ignorecase' option is
+ enabled.
'sort' type: string list
default: +name on *nix and +iname on Windows
scope: local
- Sets list of sorting keys (first item is primary key, second is
+ Sets list of sorting keys (first item is primary key, second is
secondary key, etc.):
[+-]ext - extension of files and directories
[+-]fileext - extension of files only
[+-]name - name (including extension)
[+-]iname - name (including extension, ignores case)
- [+-]type - file type
+ [+-]type - file type
(dir/reg/exe/link/char/block/sock/fifo)
[+-]dir - directory grouping (directory < file)
[+-]gid - group id (*nix only)
@@ -4017,23 +4404,23 @@ Globs
[+-]size - size
[+-]nitems - number of items in a directory (zero for files)
[+-]groups - groups extracted via regexps from 'sortgroups'
- [+-]target - symbolic link target (empty for other file
+ [+-]target - symbolic link target (empty for other file
types)
- [+-]atime - time accessed (e.g. read, executed)
- [+-]ctime - time changed (changes in metadata, e.g. mode)
+ [+-]atime - time accessed (e.g., read, executed)
+ [+-]ctime - time changed (changes in metadata, like mode)
[+-]mtime - time modified (when file contents is changed)
- Note: look for st_atime, st_ctime and st_mtime in "man 2 stat"
+ 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
+ '+' 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 sort-
- ing algorithm to mix directories and files, "dir" should be
- appended to sorting option, for example like this:
+ "dir" key is somewhat similar in this regard but it's added im-
+ plicitly: 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
@@ -4041,7 +4428,7 @@ Globs
set sort=-size,dir
- Value of the option is checked to include dir key and default
+ Value of the option is checked to include dir key and default
sorting key (name on *nix, iname on Windows). Here is what hap-
pens if one of them is missing:
@@ -4064,19 +4451,26 @@ Globs
type: string
default: ""
scope: local
- Sets comma-separated list of regular expressions to use for
- group sorting, double comma is literal comma. Each expression
- should contain at least one group or its value will be consid-
- ered to be always empty. Only first match of each regular
- expression is considered. Groups are considered from right to
- first similar to 'sort', first group divides list of files into
- sub-groups, each of which is sorted by the second group and so
- on.
+ Sets comma-separated list of regular expressions for group type
+ of sorting. Double the comma to insert it literally.
+
+ 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 regu-
+ lar expression and so on recursively.
Example:
- set sortgroups=-(done|todo).*
- this would put files with "-done" in their names above all files
- with "-todo".
+ set sortgroups=-(todo|done).*
+ this would group files with "-done" in their names and files
+ with "-todo" separately. On ascending sorting, group containing
+ "-done" would appear before the other one.
'sortorder'
type: enumeration
@@ -4090,6 +4484,9 @@ Globs
command-line). Empty string means use same format like in pre-
vious versions. Following macros are supported:
+ - %N - line break (increases height of the status line accord-
+ ingly), ignores %[ %] blocks
+
- %t - file name (considering value of the 'classify' option)
- %T - symbolic link target (empty for other filetypes)
@@ -4097,41 +4494,45 @@ Globs
- %f - file name relative to current directory (considers 'clas-
sify')
- - %A - file attributes (permissions on *nix or properties on
- Windows) %u - user name or uid (if it cannot be resolved)
+ - %A - file attributes (permissions on *nix or properties on
+ Windows)
+
+ - %u - user name or uid (if it cannot be resolved)
- %g - group name or gid (if it cannot be resolved)
- %s - file size in human readable format
- - %E - size of selected files in human readable format, same as
- %s when no files are selected, except that it will never show
+ - %E - size of selected files in human readable format, same as
+ %s when no files are selected, except that it will never show
size of ../ in visual mode, since it cannot be selected
- %d - file modification date (uses 'timefmt' option)
- %D - path of the other pane for single-pane layout
- - %a - amount of free space available at current partition
+ - %a - amount of free space available on current FS
+
+ - %c - size of current FS
- - %z - short tips/tricks/hints that chosen randomly after one
+ - %z - short tips/tricks/hints that chosen randomly after one
minute period
- - %{<expr>} - evaluate arbitrary vifm expression '<expr>', e.g.
+ - %{<expr>} - evaluate arbitrary vifm expression '<expr>', e.g.
'&sort'
- - %* - resets or applies one of User1..User9 highlight groups;
- reset happens when width field is 0 or not specified, one of
- groups gets picked when width field is in the range from 1 to
+ - %* - resets or applies one of User1..User9 highlight groups;
+ reset happens when width field is 0 or not specified, one of
+ groups gets picked when width field is in the range from 1 to
9
- all 'rulerformat' macros
- Percent sign can be followed by optional minimum field width.
+ 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
+ On Windows file properties include the following flags (upper
case means flag is on):
A - archive
H - hidden
@@ -4158,7 +4559,7 @@ Globs
'suggestoptions'
type: string list
default:
- Controls when, for what and how suggestions are displayed. The
+ Controls when, for what and how suggestions are displayed. The
following values are available:
- normal - in normal mode;
- visual - in visual mode;
@@ -4167,39 +4568,100 @@ Globs
available;
- delay[:num] - display suggestions after a small delay (to
do not annoy if you just want to type a fast shortcut consisting
- of multiple keys), num specifies the delay in ms (500 by
- default), 'timeoutlen' at most;
+ of multiple keys), num specifies the delay in ms (500 by de-
+ fault), 'timeoutlen' at most;
- keys - include shortcuts (commands and selectors);
- foldsubkeys - fold multiple keys with common prefix;
- marks - include marks;
- - registers[:num] - include registers, at most num files (5 by
+ - registers[:num] - include registers, at most num files (5 by
default).
'syncregs'
type: string
default:
- Specifies identifier of group of instances that share registers
- between each other. When several instances of vifm have this
- option set to identical value, they automatically synchronize
+ Specifies identifier of group of instances that share registers
+ between each other. When several instances of vifm have this
+ option set to identical value, they automatically synchronize
contents of their registers on operations which use them.
'syscalls'
type: boolean
default: false
- When disabled, vifm will rely on external applications to per-
- form file-system operations, otherwise system calls are used
- instead (much faster and supports progress tracking). The
- option should eventually be removed. Mostly *nix-like systems
- are affected.
+ When disabled, vifm will rely on external applications to per-
+ form file-system operations, otherwise system calls are used in-
+ stead (much faster and supports progress tracking). The option
+ should eventually be removed. Mostly *nix-like systems are af-
+ fected.
+
+ 'tablabel'
+ type: string
+ default: ""
+ When non-empty, determines format of the main part of a single
+ tab's label.
+
+ 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):
+
+ - %C - flag of a current tab
+
+ - %N - number of the tab
+
+ - %T - flag of a tree mode
+
+ - %c - description of a custom view
+
+ - %n - name of the tab
+
+ - %p - path of the view (handles filename modifiers)
+
+ - %t - title of the view (affected by 'shortmess' flags)
+
+ - %% - literal percent sign
+
+ - %[ - designates beginning of an optional block
+
+ - %] - designates end of an optional block
+
+ - %*, %0* - resets highlighting
+
+ - %1-%9 - applies one of User1..User9 highlight groups
+
+ In global tabs the view in bullets above refers to currently ac-
+ tive view of that tab.
+
+ Flag macros are a special kind of macros that always expand to
+ an empty value and are ment 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
+ " %[ -- optional description of the view
+ " %[%T{tree}%] -- mark of tree mode
+ " %[{%c}%] -- description of custom view
+ " @ -- just an extra separator before the path
+ ' %]
+ " %p:t -- tail part of view's location
+ set tablabel=%[(%n)%]%[%[%T{tree}%]%[{%c}%]@%]%p:t
+
+ 'tabprefix'
+ type: string
+ default: "[%N:"
+ Determines prefix of a tab's label. Formatting is done as for
+ 'tablabel' option.
'tabscope'
type: enumeration
default: global
- Picks style of tabs, which defines what a single tab contains.
+ Picks style of tabs, which defines what a single tab contains.
Possible values:
- - global - tab describes complete UI of two views and how they
+ - global - tab describes complete UI of two views and how they
are arranged
- - pane - tab is located "inside" a pane and manages it and
+ - pane - tab is located "inside" a pane and manages it and
quick view
'tabstop' 'ts'
@@ -4207,6 +4669,12 @@ Globs
default: value from curses library
Number of spaces that a Tab in the file counts for.
+ 'tabsuffix'
+ type: string
+ default: "]"
+ Determines suffix of a tab's label. Formatting is done as for
+ 'tablabel' option.
+
'timefmt'
type: string
default: "%m/%d %H:%M"
@@ -4222,8 +4690,15 @@ Globs
'title'
type: boolean
default: true when title can be restored, false otherwise
- When enabled title of the terminal or terminal multiplexer's
- window is updated according to current location.
+ When enabled, title of the terminal or terminal multiplexer's
+ window is updated according to current location. Because not
+ all terminals support setting title, this works only if `$TERM`
+ value matches one of the following conditions:
+ - equals "xterm" or starts with "xterm-"
+ - equals "rxvt" or starts with "rxvt-"
+ - equals "screen" or starts with "screen-"
+ - equals "aterm"
+ - equals "Eterm"
'trash'
type: boolean
@@ -4240,11 +4715,11 @@ Globs
"%r/.vifm-Trash,$XDG_DATA_HOME/vifm/Trash"
List of trash directory path specifications, separated with com-
mas. Each list item either defines an absolute path to trash
- directory or a path relative to a mount point root when list
- element starts with "%r/". Value of the option can contain
- environment variables (of form "$envname"), which will be
- expanded (prepend $ with a slash to prevent expansion). Envi-
- ronment variables are expanded when the option is set.
+ directory or a path relative to a mount point root when list el-
+ ement starts with "%r/". Value of the option can contain envi-
+ ronment variables (of form "$envname"), which will be expanded
+ (prepend $ with a slash to prevent expansion). Environment
+ variables are expanded when the option is set.
On *nix, if element ends with "%u", the mark is replaced with
real user ID and permissions are set so that only that only
@@ -4266,7 +4741,7 @@ Globs
'tuioptions' 'to'
type: charset
- default: "ps"
+ default: "psv"
Each flag configures some aspect of TUI appearance. The flags
are:
p - when included:
@@ -4277,6 +4752,14 @@ Globs
"s" character) are visible.
u - use Unicode characters in the TUI (Unicode ellipsis instead
of "...").
+ v - vary width of middle border to equalize view sizes.
+
+ 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.
+ r - truncation is always on the right.
'undolevels' 'ul'
type: integer
@@ -4288,9 +4771,9 @@ Globs
'vicmd'
type: string
default: "vim"
- The actual command used to start vi. Ampersand sign at the end
- (regardless whether it's preceded by space or not) means back-
- grounding of command.
+ Command used to edit files in various contexts. Ampersand sign
+ at the end (regardless whether it's preceded by space or not)
+ means backgrounding of command.
Background flag is ignored in certain context where vifm waits
for the editor to finish. Such contexts include any command
@@ -4320,16 +4803,17 @@ Globs
'vixcmd'
type: string
default: value of 'vicmd'
- Same as 'vicmd', but takes precedence over it when running in X.
+ Same as 'vicmd', but takes precedence over it when running in-
+ side a graphical environment.
'vifminfo'
type: set
default: bookmarks,bmarks
Controls what will be saved in the $VIFM/vifminfo file.
- bmarks - named bookmarks
+ bmarks - named bookmarks (see :bmark command)
bookmarks - marks, except special ones like '< and '>
- tui - state of the user interface (sorting, number of
+ tui - state of the user interface (sorting, number of
windows, quick
view state, active view)
dhistory - directory history
@@ -4337,21 +4821,22 @@ Globs
ers integration
state
cs - primary color scheme
- savedirs - save last visited directory (requires dhistory)
+ savedirs - save last visited directory
chistory - command line history
shistory - search history (/ and ? commands)
phistory - prompt history
- fhistory - history of local filter (see description of the
+ fhistory - history of local filter (see description of the
"=" normal mode
command)
dirstack - directory stack overwrites previous stack, unless
stack of
- current session is empty
+ current instance is empty
registers - registers content
+ tabs - global or pane tabs
options - all options that can be set with the :set command
(obsolete)
filetypes - associated programs and viewers (obsolete)
- commands - user defined commands (see :command description)
+ commands - user defined commands (see :command description)
(obsolete)
'vimhelp'
@@ -4362,7 +4847,7 @@ Globs
'wildmenu' 'wmnu'
type: boolean
default: false
- Controls whether possible matches of completion will be shown
+ Controls whether possible matches of completion will be shown
above the command line.
'wildstyle'
@@ -4374,16 +4859,16 @@ Globs
'wordchars'
type: string list
- default: "1-8,14-31,33-255" (that is all non-whitespace charac-
+ default: "1-8,14-31,33-255" (that is all non-whitespace charac-
ters)
- Specifies which characters in command-line mode should be con-
- sidered as part of a word. Value of the option is comma-sepa-
- rated list of ranges. If both endpoints of a range match, sin-
- gle endpoint is enough (e.g. "a" = "a-a"). Both endpoints are
+ Specifies which characters in command-line mode should be con-
+ sidered as part of a word. Value of the option is comma-sepa-
+ rated list of ranges. If both endpoints of a range match, sin-
+ gle endpoint is enough (e.g. "a" = "a-a"). Both endpoints are
inclusive. There are two accepted forms: character representing
- itself or number encoding character according to ASCII table.
+ itself or number encoding character according to ASCII table.
In case of ambiguous characters (dash, comma, digit) use numeric
- form. Accepted characters are in the range from 0 to 255. Any
+ form. Accepted characters are in the range from 0 to 255. Any
Unicode character with code greater than 255 is considered to be
part of a word.
@@ -4411,16 +4896,16 @@ Globs
Mappings
Map arguments
- LHS of mappings can be preceded by arguments which take the form of
+ LHS of mappings can be preceded by arguments which take the form of
special sequences:
<silent>
Postpone UI updates until RHS is completely processed.
- <wait> In case of builtin mapping causing conflict for a user-defined
- mapping (e.g., `t` builtin to a partially typed `ta` user-
- defined mapping), ignore the builtin mapping and wait for input
- indefinitely as opposed to default behaviour of triggering the
+ <wait> In case of builtin mapping causing conflict for a user-defined
+ mapping (e.g., `t` builtin to a partially typed `ta` user-de-
+ fined mapping), ignore the builtin mapping and wait for input
+ indefinitely as opposed to default behaviour of triggering the
builtin mapping after a delay defined by 'timeoutlen'. Example:
nnoremap <wait> tw :set wrap!<cr>
@@ -4429,7 +4914,7 @@ Mappings
Special sequences
- Since it's not easy to enter special characters there are several spe-
+ Since it's not easy to enter special characters there are several spe-
cial sequences that can be used in place of them. They are:
<cr> Enter key.
@@ -4458,7 +4943,7 @@ Mappings
PageUp/PageDown.
<del> <delete>
- Delete key. <del> and <delete> mean different codes, but
+ Delete key. <del> and <delete> mean different codes, but
<delete> is more common.
<insert>
@@ -4492,7 +4977,7 @@ Mappings
only for MS-Windows
functional keys with Shift key pressed.
- Note that due to the way terminals process their input, several key-
+ Note that due to the way terminals process their input, several key-
board keys might be mapped to single key code, for example:
- <cr> and <c-m>;
@@ -4503,12 +4988,12 @@ Mappings
- etc.
- Most of the time they are defined consistently and don't cause sur-
- prises, but <c-h> and <bs> are treated differently in different envi-
+ Most of the time they are defined consistently and don't cause sur-
+ prises, but <c-h> and <bs> are treated differently in different envi-
ronments (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
+ 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
@@ -4518,13 +5003,13 @@ Mappings
Whitespace
- vifm removes whitespace characters at the beginning and end of com-
- mands. That's why you may want to use <space> at the end of rhs in
+ vifm removes whitespace characters at the beginning and end of com-
+ mands. 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
+ will put "man " in line when you hit the <f1> key in the command line
mode.
Expression syntax
@@ -4577,8 +5062,8 @@ Expression syntax
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
+ 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
@@ -4589,15 +5074,15 @@ Expression syntax
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
+ 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
-----
expr4 {cmp} expr4
- Compare two expr4 expressions, resulting in a 0 if it evaluates to
+ Compare two expr4 expressions, resulting in a 0 if it evaluates to
false or 1 if it evaluates to true.
equal ==
@@ -4621,7 +5106,7 @@ Expression syntax
expr4
-----
- expr5 + expr5 .. number addition expr5 - expr5 .. number sub-
+ expr5 + expr5 .. number addition expr5 - expr5 .. number sub-
traction
Examples:
@@ -4701,8 +5186,8 @@ Expression syntax
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
+ 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:
@@ -4712,8 +5197,8 @@ Expression syntax
option
------
- &option option value (local one is preferred, if exists)
- &g:option global option value &l:option local
+ &option option value (local one is preferred, if exists)
+ &g:option global option value &l:option local
option value
Examples:
@@ -4721,14 +5206,14 @@ Expression syntax
echo 'Terminal size: '.&columns.'x'.&lines
if &columns > 100
- Any valid option name can be used here (note that "all" in ":set all"
+ 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
--------------------
$VAR environment variable
- The String value of any environment variable. When it is not defined,
+ The String value of any environment variable. When it is not defined,
the result is an empty string.
Examples:
@@ -4743,11 +5228,14 @@ Expression syntax
Information exposed by vifm for use in scripting.
v:count
- count passed to : command, 0 by default. Can be used in mappings to
- pass
- count to a different command.
+ count passed to : command, 0 by default. Can be used in mappings to
+ passthe count to a different command.
v:count1
same as v:count, but 1 by default.
+ v:jobcount
+ number of active jobs (as can be seen in the :jobs menu).
+ v:session
+ name of the current session or empty string.
v:servername
See below.
@@ -4766,18 +5254,22 @@ Expression syntax
------------------
(expr1) nested expression
- Groups any other expression of arbitrary complexity enforcing order in
+ Groups any other expression of arbitrary complexity enforcing order in
which operators are applied.
Functions
USAGE RESULT DESCRIPTION
- chooseopt({opt}) String Queries choose parameters passed on
+ chooseopt({opt}) String Queries choose parameters passed on
startup.
- executable({expr}) Integer Checks whether {expr} command avail-
+ executable({expr}) Integer Checks whether {expr} command avail-
able.
expand({expr}) String Expands special keywords in {expr}.
+ extcached({cache}, {path}, {extcmd})
+ String Caches output of {extcmd} per {cache}
+ and
+ {path} combination.
filetype({fnum} [, {resolve}])
String Returns file type from position.
fnameescape({expr}) String Escapes {expr} for use in a :command.
@@ -4809,8 +5301,8 @@ Functions
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.
+ various executable extensions on Windows. Returns boolean value de-
+ scribing result of the check.
Example:
@@ -4839,9 +5331,25 @@ Functions
" $PATH environment variable (same as `:echo $PATH`)
:echo expand('$PATH')
- filetype({fnum}[,{resolve}])
+ extcached({cache}, {path}, {extcmd})
- The result is a string, which represents file type and is one of the
+ 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
+ set statusline+=" Uses: %{ extcached('uses',
+ expand('%c'),
+ expand('stat --format=%%bx%%B %c')) }"
+
+ filetype({fnum} [, {resolve}])
+
+ The result is a string, which represents file type and is one of the
list:
exe executables
reg regular files
@@ -4852,7 +5360,8 @@ Functions
block block devices
fifo pipes
sock *nix domain sockets
- ? unknown file type (should not normally appear)
+ ? unknown file type (should not normally happen) or
+ non-file (pseudo-entries in compare view)
The result can also be an empty string in case of invalid argument.
@@ -4861,7 +5370,7 @@ Functions
- numerical value base 1 to get type of file on specified line num-
ber
- Optional parameter {resolve} is treated as a boolean and specifies
+ Optional parameter {resolve} is treated as a boolean and specifies
whether symbolic links should be resolved.
fnameescape({expr})
@@ -4885,8 +5394,8 @@ Functions
has({property})
- Allows examining internal parameters from scripts to e.g. figure out
- environment in which application is running. Returns 1 if property is
+ 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 proper-
ties are supported (anything else will yield 0):
unix runs in *nix-like environment (including Cygwin)
@@ -4903,10 +5412,10 @@ Functions
layoutis({type})
- Checks whether current interface layout is {type} or not, where {type}
+ Checks whether current interface layout is {type} or not, where {type}
can be:
only single-pane mode
- split double-pane mode (either vertical or horizon split)
+ split double-pane mode (either vertical or horizontal split)
vsplit vertical split (left and right panes)
hsplit horizontal split (top and bottom panes)
@@ -4926,23 +5435,23 @@ Functions
system({command})
- Runs the command in shell and returns its output (joined standard out-
- put and standard error streams). All trailing newline characters are
- stripped to allow easy appending to command output. Ctrl-C should
- interrupt the command.
+ Runs the command in shell and returns its output (joined standard out-
+ put and standard error streams). All trailing newline characters are
+ stripped to allow easy appending to command output. Ctrl-C should in-
+ terrupt 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 this function to consume output of external commands that don't re-
+ quire 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)
- command! cdgit :execute 'cd' system('git rev-parse --git-dir')
+ command! cdgit :execute 'cd' fnameescape(system('git rev-parse --git-dir'))
tabpagenr([{arg}])
- When called without arguments returns number of current tab page base
+ 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
@@ -4950,22 +5459,23 @@ Functions
term({command})
- Same as system() function, but user interface is shutdown during the
- execution of the command, which makes sure that external interactive
+ 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
- command! fzfcd :execute 'cd' "'".term('find -type d | fzf 2> /dev/tty')."'"
+ command! fzfcd :execute 'cd'
+ fnameescape(term('find -type d | fzf 2> /dev/tty'))
Menus and dialogs
- When navigating to some path from a menu there is a difference in end
- location depending on whether path has trailing slash or not. Files
- normally don't have trailing slashes so "file/" won't work and one can
- only navigate to a file anyway. On the other hand with directories
- there are two options: navigate to a directory or inside of it. To
- allow both use cases, the first one is used on paths like "dir" and the
+ When navigating to some path from a menu there is a difference in end
+ location depending on whether path has trailing slash or not. Files
+ normally don't have trailing slashes so "file/" won't work and one can
+ only navigate to a file anyway. On the other hand with directories
+ there are two options: navigate to a directory or inside of it. To al-
+ low both use cases, the first one is used on paths like "dir" and the
second one for "dir/".
Commands
@@ -5012,33 +5522,33 @@ Menus and dialogs
:x[it] and :{range} are supported).
b - interpret content of the menu as list of paths and use it to create
- custom view in place of previously active pane. See "Custom views"
+ custom view in place of previously active pane. See "Custom views"
section below.
B - same as above, but creates unsorted view.
- v - load menu content into quickfix list of the editor (Vim compatible
- by assumption) or if list doesn't have separators after file names
+ v - load menu content into quickfix list of the editor (Vim compatible
+ by assumption) or if list doesn't have separators after file names
(colons) open each line as a file name.
- Below is description of additional commands and reaction on selection
+ Below is description of additional commands and reaction on selection
in some menus and dialogs.
Apropos menu
- Selecting menu item runs man on a given topic. Menu won't be closed
+ Selecting menu item runs man on a given topic. Menu won't be closed
automatically to allow view several pages one by one.
Command-line mode abbreviations menu
Type dd on an abbreviation to remove it.
- c leaves menu preserving file selection and inserts right-hand side of
+ c leaves menu preserving file selection and inserts right-hand side of
selected command into command-line.
Color scheme menu
- Selecting name of a color scheme applies it the same way as if ":col-
+ Selecting name of a color scheme applies it the same way as if ":col-
orscheme <name>" was executed on the command-line.
Commands menu
@@ -5067,21 +5577,21 @@ Menus and dialogs
dd deletes file under the cursor.
- Trashes menu
+ Trashes (:trashes) menu
dd empties selected trash in background.
Directory history and Trashes menus
- Selecting directory name will change directory of the current view as
+ Selecting directory name will change directory of the current view as
if :cd command was used.
Directory stack menu
- Selecting directory name will rotate stack to put selected directory
+ Selecting directory name will rotate stack to put selected directory
pair at the top of the stack.
- Filetype menu
+ File (:file) menu
Commands from vifmrc or typed in command-line are displayed above empty
line. All commands below empty line are from .desktop files.
@@ -5091,13 +5601,13 @@ Menus and dialogs
Grep, find, locate, bookmarks and user menu with navigation (%M macro)
- gf - navigate previously active view to currently selected item.
+ gf - navigate previously active view to currently selected item.
Leaves menu mode except for grep menu. Pressing Enter key has the same
effect.
e - open selected path in the editor, stays in menu mode.
- c - leave menu preserving file selection and insert file name after :!
+ c - leave menu preserving file selection and insert file name after :!
in command-line mode.
User menu without navigation (%m macro)
@@ -5107,23 +5617,23 @@ Menus and dialogs
Grep menu
- Selecting file (via Enter or l key) opens it in editor set by 'vicmd'
- at given line number. Menu won't be closed automatically to allow
+ Selecting file (via Enter or l key) opens it in 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" and "e" keys description.
Command-line history menu
- Selecting an item executes it as command-line command, search query or
+ Selecting an item executes it as command-line command, search query or
local filter.
- c leaves menu preserving file selection and inserts line into command-
+ c leaves menu preserving file selection and inserts line into command-
line of appropriate kind.
Volumes menu
- Selecting a drive navigates previously active pane to the root of that
+ Selecting a drive navigates previously active pane to the root of that
drive.
Fileinfo dialog
@@ -5141,6 +5651,11 @@ Menus and dialogs
h, Space - check/uncheck.
q - close dialog
+ r - (*nix only) (un)set all read bits
+ w - (*nix only) (un)set all write bits
+ x - (*nix only) (un)set all execute bits
+ s - (*nix only) (un)set all special (SetUID, SetGID, Sticky) bits
+ e - (*nix only) (un)set recursion (for directories only)
Item states:
@@ -5148,22 +5663,22 @@ Menus and dialogs
- X - means that it has different value for files in selection.
- - d (*nix only) - (only for execute flags) means u-x+X, g-x+X or o-x+X
- argument for the chmod program. If you're not on OS X and want to
- remove execute permission bit from all files, but preserve it for
- directories, set all execute flags to 'd' and check 'Set Recursively'
+ - d (*nix only) - (only for execute flags) means u-x+X, g-x+X or o-x+X
+ argument for the chmod program. If you're not on OS X and want to
+ remove execute permission bit from all files, but preserve it for di-
+ rectories, set all execute flags to 'd' and check 'Set Recursively'
flag.
Jobs menu
dd requests cancellation of job under cursor. The job won't be removed
- from the list, but marked as being cancelled (if cancellation was suc-
- cessfully requested). A message will pop up if the job has already
- stopped. Note that on Windows cancelling external programs like this
+ from the list, but marked as being cancelled (if cancellation was suc-
+ cessfully requested). A message will pop up if the job has already
+ stopped. Note that on Windows cancelling external programs like this
might not work, because their parent shell doesn't have any windows.
- e key displays errors of selected job if any were collected. They are
- displayed in a new menu, but you can get back to jobs menu by pressing
+ e key displays errors of selected job if any were collected. They are
+ displayed in a new menu, but you can get back to jobs menu by pressing
h.
@@ -5174,43 +5689,66 @@ Menus and dialogs
Media menu
+ Selecting a device either mounts (if it wasn't mounted yet) or navi-
+ gates to its first mount point.
+
+ Selecting a mount point navigates to it.
+
+ Selecting "not mounted" line causes mounting.
+
+ Selecting any other line does nothing.
+
r - reload the list.
m - mount/unmount device (cursor should be positioned on lines under
device information).
+ [ - put cursor on the previous device.
+
+ ] - put cursor on the next device.
+
+
+ Plugins menu
+
+ e - display log messages of selected plugin if any were collected.
+ They are displayed in a new menu, but you can get back to plugins menu
+ by pressing h.
+
+ gf - navigate previously active view to the location of selected
+ plugin. Leaves menu mode.
+
Custom views
Definition
- Normally file views contain list of files from a single directory, but
- sometimes it's useful to populate them with list of files that do not
+ Normally file views contain list of files from a single directory, but
+ sometimes it's useful to populate them with list of files that do not
belong to the same directory, which is what custom views are for.
Presentation
- Custom views are still related to directory they were in before custom
- list was loaded. Path to that directory (original directory) can be
+ Custom views are still related to 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 same directory have to be named differently, this doesn't hold
for custom views thus seeing just file names might be rather confusing.
In order to give an idea where files come from and when possible, rela-
- tive paths to original directory of the view is displayed, otherwise
+ tive paths to original directory of the view is displayed, otherwise
full path is used instead.
Custom views normally don't contain any inexistent files.
Navigation
- Custom views have some differences related to navigation in regular
+ Custom views have some differences related to navigation in regular
views.
- gf - acts similar to gf on symbolic links and navigates to the file at
+ gf - acts similar to gf on symbolic links and navigates to the file at
its real
location.
- h - go to closes parent node in tree view, otherwise return to the
+ h - go to closes parent node in tree view, otherwise return to the
original directory.
gh - return to the original directory.
@@ -5219,49 +5757,49 @@ Custom views
History
- Custom list exists only while it's visible, once left one can't return
+ Custom list exists only while it's visible, once left one can't return
to it, so there is no appearances of it in any history.
Filters
- Only local filter affects content of the view. This is intentional,
- presumably if one loads list, precisely that list should be displayed
+ Only local filter affects content of the view. This is intentional,
+ presumably if one loads 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 search-
- able. Only file names are taken into account (might be changed in
- future, searching whole lines seems quite reasonable).
+ Although directory names are visible in listing, they are not search-
+ able. Only file names are taken into account (might be changed in fu-
+ ture, searching whole lines seems quite reasonable).
Sorting
- Contrary to search sorting by name works on whole visible part of file
+ 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 direc-
+ Whole file name is highlighted as one entity, even if there are direc-
tory elements.
Updates
- Reloads can occur, though they are not automatic due to files being
- scattered among different places. On a reload, inexistent files are
+ 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
+ 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 oper-
ation, which was 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,
+ All operations that add files are forbidden for custom views. For ex-
+ ample, moving/copying/putting files into a custom view doesn't work,
because it doesn't make much sense.
- On the other hand, operations that use files of a custom view as a
- source (e.g. yanking, copying, moving file from custom view, deletion)
+ On the other hand, operations that use files of a custom view as a
+ source (e.g. yanking, copying, moving file from custom view, deletion)
and operations that modify names are all allowed.
Compare views
@@ -5273,18 +5811,18 @@ Compare views
- two compare views (ofboth and either listall or listdups);
- two custom views (ofboth and listunique).
- The first two display files of one 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
+ The first two display files of one 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 dis-
+ file grouping to preserve as all file ids are guaranteed to be dis-
tinct.
Creation
- Arguments passed to :compare form four categories each with its own
+ Arguments passed to :compare form four categories each with its own
prefix and is responsible for particular property of operation.
Which files to compare:
@@ -5294,7 +5832,9 @@ Compare views
How files are compared:
- byname - by their name only;
- bysize - only by their size;
- - bycontents - by combination of size and hash of file contents.
+ - bycontents - by data they contain (combination of size and hash of
+ small chunk of contents is used as first approximation, so don't worry
+ too much about large files).
Which files to display:
- listall - all files;
@@ -5302,9 +5842,9 @@ Compare views
- listdups - only duplicated files.
How results are grouped (has no effect if "ofone" specified):
- - groupids - files considered identical are always adjacent in out-
+ - groupids - files considered identical are always adjacent in out-
put;
- - grouppaths - file system ordering is preferred (this also enables
+ - grouppaths - file system ordering is preferred (this also enables
displaying identically named files as mismatches).
Which files to omit:
@@ -5316,8 +5856,8 @@ Compare views
Examples
- The defaults corresponds to probably the most common use case of com-
- paring files in two trees with grouping by paths, so the following are
+ The defaults corresponds to probably the most common use case of com-
+ paring files in two trees with grouping by paths, so the following are
equivalent:
:compare
@@ -5334,49 +5874,50 @@ Compare views
Look
- The view can't switch to ls-like view as it's unable to display diff-
+ 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 same id are considered to be equal. The view columns configura-
+ Comparison views have second column displaying id of the file, files
+ with same id are considered to be equal. The view columns configura-
tion is predefined.
Behaviour
- When two views are being compared against each other the following
+ When two views are being compared against each other the following
changes to the regular behaviour apply:
- views are scrolled synchronously (as if 'scrollbind' was set);
- views' cursors are synchronized;
- local filtering is disabled (its results wouldn't be meaningful);
- - zd excludes groups of adjacent identical files, 1zd gives usual be-
+ - zd excludes groups of adjacent identical files, 1zd gives usual be-
haviour;
- sorting is permanently disabled (ordering is fixed);
- removed files hide their counter pairs;
- exiting one of the views terminates the other immediately;
- renaming files isn't blocked, but isn't taken into account and might
require regeneration of comparison;
- - entries which indicate absence of equivalent file have empty names
+ - entries which indicate absence of equivalent file have empty names
and can be matched as such;
- - when unique files of both views are listed custom views can be
+ - when unique files of both views are listed custom views can be
empty, this absence of unique files is stated clearly.
- One compare view has similar properties (those that are applicable for
+ One compare view has similar properties (those that are applicable for
single pane).
Files are gathered in this way:
- recursively starting at current location of the view;
- - dot files are excluded if view hides them at the moment of compari-
- son;
+ - dot files are excluded if view hides them at the moment of compari-
+ son, file name filters are obeyed as well so you end up comparing what
+ you see;
- directories are not taken into account;
- symbolic links to directories are ignored.
Startup
- On startup vifm determines several variables that are used during the
- session. They are determined in the order they appear below.
+ On startup vifm determines several variables that are used during exe-
+ cution. 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:
+ systems vifm tries to find correct home directory in the following or-
+ der:
- $HOME variable;
- $USERPROFILE variable (on Windows only);
- a combination of $HOMEDRIVE and $HOMEPATH variables (on Windows
@@ -5410,8 +5951,8 @@ Configure
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:
+ is ignored, but all spaces at the end of the lines are saved). For ex-
+ ample:
set
\smartcase
@@ -5423,51 +5964,103 @@ Configure
equals "set smartcase".
- The $VIFM/vifminfo file contains session settings. You may edit it by
- hand to change the settings, but it's not recommended to do that, edit
- vifmrc instead. You can control what settings will be saved 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).
+ 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 reg-
+ isters in the file are merged with vifm configuration (which has bigger
+ priority).
- Generally, runtime configuration has bigger priority during merging,
+ Generally, runtime configuration has bigger priority during merging,
but there are some exceptions:
- - directory stack stored in the file is not overwritten unless some-
- thing is changed in vifm session that performs merge;
+ - directory stack stored in the file is not overwritten unless some-
+ thing is changed in vifm instance that performs merge;
- - each mark or bookmark is marked with a timestamp, so that newer
+ - each mark or bookmark is marked with a timestamp, so that newer
value is not overwritten by older one, thus no matter from where it
- comes, the newer one wins.
+ comes, the newer one wins;
+
+ - all histories are marked with timestamps on storing, this means
+ that last instance to quit puts its elements on top of the list;
- 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
+ - tabs are merged only if both current instance and stored state con-
+ tain exactly one tab of any kind.
+
+ 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
+ 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
+ Each color scheme should have ".vifm" extension. This wasn't the case
before and for this reason the following rules apply during lookup:
- - if there is no file with .vifm extension, all regular files are
+ - if there is no file with .vifm extension, all regular files are
listed;
- - otherwise only files with .vifm extension are listed (with the
- extension being truncated).
+ - otherwise only files with .vifm extension are listed (with the ex-
+ tension being truncated).
+
+Sessions
+ Sessions provide a way to have multiple persistent runtime configura-
+ tions. 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 ad-
+ dition to it. One can empty 'vifminfo' option and rely solely on ses-
+ sions, but in practice one might want to share some state among in-
+ stances 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 addi-
+ tion 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 se-
+ quence 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. Conse-
+ quently 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
+ Options: 'sessionoptions'
+ Variables: v:session
Automatic FUSE mounts
vifm has a builtin support of automated FUSE file system mounts. It is
- implemented using file associations mechanism. To enable automated
+ implemented using file associations mechanism. To enable automated
mounts, one needs to use a specially formatted program line in filetype
- or filextype commands. Currently two formats are supported:
+ or filextype commands. These use special macros, which differ from
+ macros in commands unrelated to FUSE. Currently three formats are sup-
+ ported:
- 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.
+ 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:
@@ -5477,21 +6070,42 @@ Automatic FUSE mounts
: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.
+ 2) FUSE_MOUNT2 This format allows one to use specially formatted files
+ to perform mounting and is useful for mounting remotes, for example re-
+ mote file systems over ftp or ssh.
Format line:
FUSE_MOUNT2|mounter %PARAM %DESTINATION_DIR [%FOREGROUND]
Example filetype command:
- :filetype FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR
+ :filetype *.ssh FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR
Example file content:
root@127.0.0.1:/
+ 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
+ \ {Mount with avfs}
+ \ FUSE_MOUNT3|mount-avfs %DESTINATION_DIR %SOURCE_FILE
+
+ Example `mount-avfs` helper script:
+
+ #!/bin/sh
+
+ dest=$1
+ file=$2
+
+ rmdir "$dest"
+ ln -s "$HOME/.avfs$file#/" "$dest"
+
All % macros are expanded by vifm at runtime and have the following
meaning:
- %SOURCE_FILE is replaced by full path to selected file;
@@ -5509,51 +6123,56 @@ Automatic FUSE mounts
%CLEAR is obsolete name of %FOREGROUND, which is still supported, but
might be removed in future. Its use is discouraged.
- The mounted FUSE file systems will be automatically unmounted in two
+ 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 ad-
+ dressed in the future.
+
+ The mounted FUSE file systems will be automatically unmounted in two
cases:
- when vifm quits (with ZZ, :q, etc. or when killed by signal);
- when you explicitly leave mount point going up to its parent direc-
- tory (with h, Enter on "../" or ":cd ..") and other pane is not in
+ tory (with h, Enter on "../" or ":cd ..") and other pane is not in
the same directory or its child directories.
View look
vifm supports displaying of file list view in two different ways:
- - in a table mode, when multiple columns can be set using 'view-
+ - in a table mode, when multiple columns can be set using 'view-
columns' option (see "Column view" section below for details);
- - in a multicolumn list manner which looks almost like `ls -x` com-
+ - in a multicolumn list manner which looks almost like `ls -x` com-
mand output (see "ls-like view" section below for details).
- The look is local for each view and can be chosen by changing value of
+ 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
+ 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 simi-
lar navigation keys.
- Also some of options can be ignored if they don't affect view display-
+ Also some of options can be ignored if they don't affect view display-
ing in selected look. For example value of 'viewcolumns' when 'lsview'
is set.
ls-like view
When 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,
+ 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
+ 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
+ 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.
@@ -5561,8 +6180,11 @@ ls-like view
Column view
View columns are described by a comma-separated list of column descrip-
tions, each of which has the following format
- [ '-' ] [ fw ( [ '.' tw ] | '%' ) ] '{' type '}' '.'{0,3}
- where fw stands for full width and tw stands for text width.
+ [ '-' | '*' ] [ fw ( [ '.' tw ] | '%' ) ] '{' type | literal '}'
+ '.'{0,3}
+ where fw stands for full width, tw stands for text width, bar is logi-
+ cal or, square brackets denote optional parts and curly braces define
+ range of repetitions for a symbol that precedes them.
So it basically consists of four parts:
1. Optional alignment specifier
@@ -5629,46 +6251,63 @@ Column view
Though sometimes some of columns can be seen partly or be completely
invisible if there is not enough space to display them.
- Column name
+ Column contents
- This is just a sort key surrounded with curly braces or {root}, e.g.
+ This is usually a sorting key surrounded with curly braces, e.g.
{name},{ext},{mtime}
- {name} and {iname} keys are the same and present both for consistency
+ {name} and {iname} types are the same and present both for consistency
with 'sort' option.
- Following keys don't have corresponding sorting keys:
+ Following types don't have corresponding sorting keys:
- - {root} - display name without extension (as a complement for {ext})
+ - {root} - display name without extension (as a complement for
+ {ext})
- 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' is empty, but adding ellipsis for long file
+ - {fileroot} - display name without extension for anything except for
+ directories and symbolic links to directories (as a complement for
+ {fileext})
+
+ 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' is 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}", for exam-
+ ple:
+
+ 3{#},{#|},{# | }
+
+ This can be used to draw column separators. Mind that for convenience
+ literals have different defaults: truncation and automatically deter-
+ mined absolute size, which is what you usually want for them. Example:
+
+ set viewcolumns=*{name}..,{#|},6{}.
+
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.
+ Specifies type of text truncation if it doesn't fit in the column.
Currently three types are supported:
- truncation - text is truncated
set viewcolumns=-{name}.
- results in truncation of names that are too long too fit in the
+ results in truncation of names that are too long too fit in the
view.
- - adding of ellipsis - ellipsis on the left or right are added when
+ - adding of ellipsis - ellipsis on the left or right are added when
needed
set viewcolumns=-{name}..
- results in that ellipsis are added at the end of too long file
+ results in that ellipsis are added at the end of too long file
names.
- none (default) - text can pass column boundaries
@@ -5691,20 +6330,20 @@ Color schemes
- :colorscheme color_scheme_name directory - for local color schemes.
- Look of different parts of the TUI (Text User Interface) is determined
+ Look of different parts of the TUI (Text User Interface) is determined
in this way:
- - Border, TabLine, TabLineSel, TopLineSel, TopLine, CmdLine,
- ErrorMsg, StatusLine, JobLine, SuggestBox and WildMenu are always
- determined by the primary color scheme;
+ - Border, TabLine, TabLineSel, TopLineSel, TopLine, CmdLine, Er-
+ rorMsg, StatusLine, JobLine, SuggestBox and WildMenu are always de-
+ termined by the primary color scheme;
- - CurrLine, Selected, Directory, Link, BrokenLink, Socket, Device,
- Executable, Fifo, CmpMismatch, Win and AuxWin are determined by
- primary color scheme and a set of local color schemes, which can be
- empty.
+ - CurrLine, Selected, Directory, Link, BrokenLink, Socket, Device,
+ Executable, Fifo, CmpMismatch, Win, AuxWin and OtherWin are deter-
+ mined by primary color scheme and a set of local color schemes,
+ which can be empty.
There might be a set of local color schemes because they are structured
- hierarchically according to file system structure. For example, having
+ hierarchically according to file system structure. For example, having
the following piece of file system:
~
@@ -5744,81 +6383,108 @@ Color schemes
Trash directory
vifm 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 direc-
+ 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 direc-
tory.
There are two scenarios of using trash in vifm:
- 1. As a place for storing files that were cut by "d" and may be
- inserted to some other place in file system.
+ 1. As a place for storing files that were cut by "d" and may be in-
+ serted to some other place in file system.
2. As a storage of files, that are deleted but not purged yet.
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
+ 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
+ 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
+ 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 di-
+ rectory, 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
+ for it. But this won't lead to any issues with operations, since they
ignore nonexistent files.
Client-Server
- vifm supports remote execution of command-line mode commands, remote
- changing of directories and expression evaluation. This is possible
+ vifm 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 <com-
+ To execute a command remotely combine --remote argument with -c <com-
mand> or +<command>. For example:
vifm --remote -c 'cd /'
vifm --remote '+cd /'
- To change directory not using command-line mode commands one can spec-
+ To change directory not using command-line mode commands one can spec-
ify paths right after --remote argument, like this:
vifm --remote /
vifm --remote ~
vifm --remote /usr/bin /tmp
- Evaluating expression remotely might be useful to query information
+ 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
+ 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
+ List of names of running instances can be obtained via --server-list
option. Name of the current one is available via v:servername.
v:servername
- server name of the running vifm instance. Empty if client-
+ server name of the running vifm instance. Empty if client-
server feature is disabled.
+External Renaming
+ When an editor is run to edit list of file names, contents of the tem-
+ porary file has the following format:
+
+ 1. Order of lines correspond to the order of files in a view.
+
+ 2. Lines that start with a "#" are comments and are ignored.
+
+ 3. Single backslash at the beginning of a line is ignored, so that a
+ file starting with a backslash will appear like "\#name".
+
+ If an operation was rejected due to issues with file names, next time
+ you'll see the following in this order:
+
+ 1. Last error (in comments).
+
+ 2. Original file names (in comments).
+
+ 3. Failed list of new names.
+
+ 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.
+
Plugin
Plugin for using vifm in vim as a file selector.
Commands:
:EditVifm select a file or files to open in the current buffer.
+ :Vifm alias for :EditVifm.
:SplitVifm split buffer and select a file or files to open.
:VsplitVifm vertically split buffer and select a file or files to
open.
@@ -5835,8 +6501,8 @@ Plugin
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_term to let user specify command to run GUI terminal. By de-
+ fault 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.
@@ -5875,8 +6541,8 @@ ENVIRONMENT
VIFM_FUSE_FILE
On execution of external commands this variable is set to the
- full path of file used to initiate FUSE mount of the closes
- mount point from current pane directory up. It's not set when
+ 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).
@@ -5896,4 +6562,4 @@ AUTHOR
-vifm 0.10 November 11, 2018 VIFM(1)
+vifm 0.12 September 29, 2021 VIFM(1)