xaizek / vifm (License: GPLv2+) (since 2018-12-07)
Vifm is a file manager with curses interface, which provides Vi[m]-like environment for managing objects within file systems, extended with some useful ideas from mutt.
Commit 7417610bfe889b4d6bd7f457cb1b03e26a4b54c4

Improve wording of documentation on patterns
Make it more readable in various ways.
Author: xaizek
Author date (UTC): 2026-07-10 16:58
Committer name: xaizek
Committer date (UTC): 2026-07-11 12:48
Parent(s): 86eca87a3126fe609fd6d58923e65eaa83f5f291
Signing key: 99DC5E4DB05F6BE2
Tree: 8dcefead9b66052794b4fc0c96f0c3824cdcaa9b
File Lines added Lines deleted
ChangeLog 2 1
data/man/vifm.1 56 35
data/vim/doc/app/vifm-app.txt 54 39
File ChangeLog changed (mode: 100644) (index 2a74906b2..52cb47899)
123 123 Updated :diff command in sample vifmrc files to be more useful. Thanks to Updated :diff command in sample vifmrc files to be more useful. Thanks to
124 124 an anonymous at Vifm Q2A site. an anonymous at Vifm Q2A site.
125 125
126 Improved wording of documentation section describing filters.
126 Improved wording of documentation sections describing filters and
127 patterns.
127 128
128 129 Fixed 'trashdir' with "%r" on BSD-like systems (those with getmntinfo() Fixed 'trashdir' with "%r" on BSD-like systems (those with getmntinfo()
129 130 instead of getmntent() API). The regression was apparently introduced in instead of getmntent() API). The regression was apparently introduced in
File data/man/vifm.1 changed (mode: 100644) (index d18245803..fa44ac625)
1 .TH VIFM 1 "9 July 2026" "vifm 0.15"
1 .TH VIFM 1 "10 July 2026" "vifm 0.15"
2 2 .\" --------------------------------------------------------------------------- .\" ---------------------------------------------------------------------------
3 3 .SH NAME .SH NAME
4 4 .\" --------------------------------------------------------------------------- .\" ---------------------------------------------------------------------------
 
... ... parallel execution.
4005 4005 .\" --------------------------------------------------------------------------- .\" ---------------------------------------------------------------------------
4006 4006 .SH Patterns .SH Patterns
4007 4007 .\" --------------------------------------------------------------------------- .\" ---------------------------------------------------------------------------
4008 :highlight, :filetype, :filextype, :fileviewer commands and 'classify' option
4009 support globs, regular expressions and mime types to match file names or their
4010 paths. Directory paths get an implicit trailing slash on matching against a
4011 pattern, keep that in mind for globs or regular expressions that end with `$`.
4008 Some commands and options use a special pattern syntax to accept globs,
4009 regular expressions or mime types. This allows matching files by their names,
4010 paths and/or content type.
4012 4011
4013 There are six possible ways to write a single pattern:
4012 There are six forms a single pattern can take:
4014 4013 .RS 2 .RS 2
4015 4014 .IP 1. 3 .IP 1. 3
4016 4015 [!]{comma-separated-name-globs} [!]{comma-separated-name-globs}
 
... ... There are six possible ways to write a single pattern:
4026 4025 undecorated-pattern undecorated-pattern
4027 4026 .RE .RE
4028 4027
4029 First five forms can include leading exclamation mark that negates pattern
4030 matching.
4031
4032 The last form implicitly refers to one of the others. :highlight does not
4033 accept undecorated form, while :filetype, :filextype, :fileviewer, :select,
4034 :unselect and 'classify' treat it as a list of name globs.
4035
4036 Path patterns receive absolute path of the file that includes its name
4037 component as well.
4028 The first five can include leading exclamation mark that negates pattern
4029 matching. The last, undecorated, form implicitly refers to one of the others
4030 and is used to make typing easier and to maintain compatibility with syntax
4031 before patterns. Undecorated patterns can't be negated or followed by other
4032 patterns.
4033
4034 The patterns are accepted in the following places:
4035 where undecorated form resolves to
4036 'classify' {comma-separated-name-globs}
4037 :filetype {comma-separated-name-globs}
4038 :filextype {comma-separated-name-globs}
4039 :fileviewer {comma-separated-name-globs}
4040 :filter /name-regular-expression/
4041 :highlight unsupported
4042 :select {comma-separated-name-globs}
4043 :unselect {comma-separated-name-globs}
4044
4045 During a match:
4046 .RS 2
4047 .IP \- 2
4048 path patterns receive absolute path to the file including its name
4049 component
4050 .IP \- 2
4051 directory entries (directories and symbolic links to directories) get an
4052 implicit trailing slash; keep this in mind for globs or regular expressions
4053 that end with `$` anchor
4054 .RE
4038 4055
4039 To combine several patterns (AND them), make sure you're using one of the first
4040 five forms and write patterns one after another, like this:
4056 To combine several patterns (AND them), use one of the first five forms and
4057 write patterns one after another, like this:
4041 4058 .EX .EX
4042 4059 <text/plain>{*.vifm} <text/plain>{*.vifm}
4043 4060 .EE .EE
4044 Mind that if you make a mistake the whole string will be treated as the sixth
4045 form.
4061 Mind that an incorrect syntax can lead to the whole string being treated as the
4062 sixth form.
4046 4063
4047 :filetype, :filextype and :fileviewer commands accept comma-separated list of
4048 patterns instead of a single pattern, thus effectively handling OR operation on
4049 them:
4064 Forms that accept comma-separated lists process them as lists of alternatives.
4065 Additionally, :filetype, :filextype and :fileviewer
4066 commands accept comma-separated list of patterns instead of a single pattern,
4067 thus effectively implementing OR operation on them:
4050 4068 .EX .EX
4051 4069 <text/plain>{*.vifm},<application/pdf>{*.pdf} <text/plain>{*.vifm},<application/pdf>{*.pdf}
4052 4070 .EE .EE
4053 Forms that accept comma-separated lists of patterns also process them as
4054 lists of alternatives.
4055 4071
4056 4072 .B Patterns with regular expressions .B Patterns with regular expressions
4057 4073
4058 Regular expression patterns are case insensitive by default, see description
4059 of commands, which might override default behaviour.
4074 Regular expression patterns are case insensitive by default unless documentation
4075 in place of a pattern use states otherwise.
4060 4076
4061 Flags of regular expressions mean the following:
4062 - "i" makes filter case insensitive;
4063 - "I" makes filter case sensitive.
4064 They can be repeated multiple times, but the later one takes precedence (e.g.
4077 Flags of regular expressions have the following meaning:
4078 - "i" makes matching case insensitive;
4079 - "I" makes matching case sensitive.
4080 .br
4081 Flags can appear multiple times with the last flag taking precedence (e.g.,
4065 4082 "iiiI" is equivalent to "I" and "IiIi" is the same as "i"). "iiiI" is equivalent to "I" and "IiIi" is the same as "i").
4066 4083
4067 There are no implicit `^` or `$`, so make sure to specify them explicitly if
4068 the pattern should match the whole name or path.
4084 There are no implicit `^` or `$` anchores, so make sure to specify them
4085 explicitly if the pattern should match the whole name or path. Don't forget
4086 about trailing slash appended to directory entries.
4087
4088 See "Regular expressions" section for more details and another way of
4089 controlling case sensitivity.
4069 4090
4070 4091 .B Patterns with globs .B Patterns with globs
4071 4092
4072 4093 "Globs" section below provides short overview of globs and some important points "Globs" section below provides short overview of globs and some important points
4073 that one needs to know about them.
4094 worth knowing about.
4074 4095
4075 .B Patterns with mime-types
4096 .B Patterns with mime types
4076 4097
4077 4098 Mime type matching is essentially globs matching applied to mime type of a file Mime type matching is essentially globs matching applied to mime type of a file
4078 4099 instead of its name/path. Note: mime types aren't detected on Windows. instead of its name/path. Note: mime types aren't detected on Windows.
 
... ... matched or not and exist to override 'ignorecase', 'smartcase' and
4103 4124 If multiple sequences are present, the one which appears later takes If multiple sequences are present, the one which appears later takes
4104 4125 precedence. precedence.
4105 4126
4106 Note that unlike in Vim character classes are affected by settings and
4127 Note that, unlike in Vim, character classes are affected by settings and
4107 4128 sequences that control case sensitivity in regular expressions. sequences that control case sensitivity in regular expressions.
4108 4129 .\" --------------------------------------------------------------------------- .\" ---------------------------------------------------------------------------
4109 4130 .SH Globs .SH Globs
File data/vim/doc/app/vifm-app.txt changed (mode: 100644) (index 332ae7251..7df401679)
... ... handle it:
3345 3345 -------------------------------------------------------------------------------- --------------------------------------------------------------------------------
3346 3346 *vifm-patterns* *vifm-patterns*
3347 3347
3348 |vifm-:highlight|, |vifm-:filetype|, |vifm-:filextype|, |vifm-:fileviewer|
3349 commands and |vifm-'classify'| option support globs, regular expressions and
3350 mime types to match file names or their paths. Directory paths get an
3351 implicit trailing slash on matching against a pattern, keep that in mind for
3352 globs or regular expressions that end with `$`.
3348 Some commands and options use a special pattern syntax to accept globs,
3349 regular expressions or mime types. This allows matching files by their names,
3350 paths and/or content type.
3353 3351
3354 There are six possible ways to write a single pattern:
3352 There are six forms a single pattern can take:
3355 3353 1. [!]{comma-separated-name-globs} 1. [!]{comma-separated-name-globs}
3356 3354 2. [!]{{comma-separated-path-globs}} 2. [!]{{comma-separated-path-globs}}
3357 3355 3. [!]/name-regular-expression/[iI] 3. [!]/name-regular-expression/[iI]
 
... ... There are six possible ways to write a single pattern:
3359 3357 5. [!]<comma-separated-mime-type-globs> 5. [!]<comma-separated-mime-type-globs>
3360 3358 6. undecorated-pattern 6. undecorated-pattern
3361 3359
3362 First five forms can include leading exclamation mark that negates pattern
3363 matching.
3364
3365 The last form implicitly refers to one of the others. |vifm-:highlight|
3366 does not accept undecorated form, while |vifm-:filetype|, |vifm-:filextype|,
3367 |vifm-:fileviewer|, |vifm-:select|, |vifm-:unselect| and |vifm-'classify'|
3368 treat it as a list of name globs.
3369
3370 Path patterns receive absolute path of the file that includes its name
3371 component as well.
3372
3373 To combine several patterns (AND them), make sure you're using one of the
3374 first five forms and write patterns one after another, like this: >
3360 The first five can include leading exclamation mark that negates pattern
3361 matching. The last, undecorated, form implicitly refers to one of the others
3362 and is used to make typing easier and to maintain compatibility with syntax
3363 before patterns. Undecorated patterns can't be negated or followed by other
3364 patterns.
3365
3366 The patterns are accepted in the following places:
3367
3368 where undecorated form resolves to~
3369 |vifm-'classify'| {comma-separated-name-globs}
3370 |vifm-:filetype| {comma-separated-name-globs}
3371 |vifm-:filextype| {comma-separated-name-globs}
3372 |vifm-:fileviewer| {comma-separated-name-globs}
3373 |vifm-:filter| /name-regular-expression/
3374 |vifm-:highlight| unsupported
3375 |vifm-:select| {comma-separated-name-globs}
3376 |vifm-:unselect| {comma-separated-name-globs}
3377
3378 During a match:
3379 - path patterns receive absolute path to the file including its name
3380 component
3381 - directory entries (directories and symbolic links to directories) get an
3382 implicit trailing slash; keep this in mind for globs or regular expressions
3383 that end with `$` anchor
3384
3385 To combine several patterns (AND them), use one of the first five forms and
3386 write patterns one after another, like this: >
3375 3387 <text/plain>{*.vifm} <text/plain>{*.vifm}
3376 Mind that if you make a mistake the whole string will be treated as the sixth
3377 form.
3388 Mind that an incorrect syntax can lead to the whole string being treated as the
3389 sixth form.
3378 3390
3379 |vifm-:filetype|, |vifm-:filextype| and |vifm-:fileviewer| commands accept
3380 comma-separated list of patterns instead of a single pattern, thus effectively
3381 handling OR operation on them: >
3391 Forms that accept comma-separated lists process them as lists of alternatives.
3392 Additionally, |vifm-:filetype|, |vifm-:filextype| and |vifm-:fileviewer|
3393 commands accept comma-separated list of patterns instead of a single pattern,
3394 thus effectively implementing OR operation on them: >
3382 3395 <text/plain>{*.vifm},<application/pdf>{*.pdf} <text/plain>{*.vifm},<application/pdf>{*.pdf}
3383 Forms that accept comma-separated lists of patterns also process them as
3384 lists of alternatives.
3385 3396
3386 3397 Patterns with regular expressions~ Patterns with regular expressions~
3387 3398
3388 Regular expression patterns are case insensitive by default, see description
3389 of commands, which might override default behaviour.
3399 Regular expression patterns are case insensitive by default unless documentation
3400 in place of a pattern use states otherwise.
3390 3401
3391 Flags of regular expressions mean the following:
3392 - "i" makes filter case insensitive;
3393 - "I" makes filter case sensitive.
3394 They can be repeated multiple times, but the later one takes precedence (e.g.
3402 Flags of regular expressions have the following meaning:
3403 - "i" makes matching case insensitive;
3404 - "I" makes matching case sensitive.
3405 Flags can appear multiple times with the last flag taking precedence (e.g.,
3395 3406 "iiiI" is equivalent to "I" and "IiIi" is the same as "i"). "iiiI" is equivalent to "I" and "IiIi" is the same as "i").
3396 3407
3397 There are no implicit `^` or `$`, so make sure to specify them explicitly if
3398 the pattern should match the whole name or path.
3408 There are no implicit `^` or `$` anchores, so make sure to specify them
3409 explicitly if the pattern should match the whole name or path. Don't forget
3410 about trailing slash appended to directory entries.
3411
3412 See |vifm-regexp| for more details and another way of controlling case
3413 sensitivity.
3399 3414
3400 3415 Patterns with globs~ Patterns with globs~
3401 3416
3402 3417 |vifm-globs| section provides short overview of globs and some important points |vifm-globs| section provides short overview of globs and some important points
3403 that one needs to know about them.
3418 worth knowing about.
3404 3419
3405 Patterns with mime-types~
3420 Patterns with mime types~
3406 3421
3407 3422 Mime type matching is essentially globs matching applied to mime type of a file Mime type matching is essentially globs matching applied to mime type of a file
3408 3423 instead of its name/path. Note: mime types aren't detected on Windows. instead of its name/path. Note: mime types aren't detected on Windows.
 
... ... Associate `evince` to PDF-files only inside `/home/user/downloads/` directory
3416 3431 -------------------------------------------------------------------------------- --------------------------------------------------------------------------------
3417 3432 *vifm-regexp* *vifm-regexp*
3418 3433
3419 All regular expressions are extended. See `man 7 regex` for more details on
3420 what's supported.
3434 All regular expressions are modern/extended. See `man 7 regex` for more
3435 details on what's supported.
3421 3436
3422 3437 The following special sequences are additionally parsed: The following special sequences are additionally parsed:
3423 3438 - `\c` forces matching ignoring case of letters - `\c` forces matching ignoring case of letters
 
... ... or not and exist to override |vifm-'ignorecase'|, |vifm-'smartcase'| and
3430 3445 If multiple sequences are present, the one which appears later takes If multiple sequences are present, the one which appears later takes
3431 3446 precedence. precedence.
3432 3447
3433 Note that unlike in Vim character classes are affected by settings and
3448 Note that, unlike in Vim, character classes are affected by settings and
3434 3449 sequences that control case sensitivity in regular expressions. sequences that control case sensitivity in regular expressions.
3435 3450
3436 3451 -------------------------------------------------------------------------------- --------------------------------------------------------------------------------
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vifm

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vifm

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master