vifm-help.txt (205894B)
1 VIFM(1) General Commands Manual VIFM(1) 2 3 4 5 NAME 6 vifm - vi file manager 7 8 SYNOPSIS 9 vifm [OPTION]... 10 vifm [OPTION]... path 11 vifm [OPTION]... path path 12 13 DESCRIPTION 14 Vifm is an ncurses based file manager with vi like keybindings. If you 15 use vi, vifm gives you complete keyboard control over your files with- 16 out having to learn a new set of commands. 17 18 OPTIONS 19 vifm starts in the current directory unless it is given a different di- 20 rectory on the command line or 'vifminfo' option includes "savedirs" 21 (in which case last visited directories are used as defaults). 22 23 - Read list of files from standard input stream and compose custom 24 view out of them (see "Custom views" section). Current working 25 directory is used as a base for relative paths. 26 27 <path> Starts Vifm in the specified path. 28 29 <path> <path> 30 Starts Vifm in the specified paths. 31 32 Specifying two directories triggers split view even when vifm was in 33 single-view mode on finishing previous session. To suppress this be- 34 haviour :only command can be put in the vifmrc file. 35 36 When only one path argument is found on command-line, the left/top pane 37 is automatically set as the current view. 38 39 Paths to files are also allowed in case you want vifm to start with 40 some archive opened. 41 42 --select <path> 43 Open parent directory of the given path and select specified 44 file in it. 45 46 -f Makes vifm instead of opening files write selection to 47 $VIFM/vimfiles and quit. 48 49 --choose-files <path>|- 50 Sets output file to write selection into on exit instead of 51 opening files. "-" means standard output. Use empty value to 52 disable it. 53 54 --choose-dir <path>|- 55 Sets output file to write last visited directory into on exit. 56 "-" means standard output. Use empty value to disable it. 57 58 --delimiter <delimiter> 59 Sets separator for list of file paths written out by vifm. 60 Empty value means null character. Default is new line charac- 61 ter. 62 63 --on-choose <command> 64 Sets command to be executed on selected files instead of opening 65 them. The command may use any of macros described in "Command 66 macros" section below. The command is executed once for whole 67 selection. 68 69 --logging[=<startup log path>] 70 Log some operational details $VIFM/log. If the optional startup 71 log path is specified and permissions allow to open it for writ- 72 ing, then logging of early initialization (before value of $VIFM 73 is determined) is put there. 74 75 --server-list 76 List available server names and exit. 77 78 --server-name <name> 79 Name of target or this instance (sequential numbers are appended 80 on name conflict). 81 82 --remote 83 Sends the rest of the command line to another instance of vifm, 84 --server-name is treated just like any other argument and should 85 precede --remote on the command line. When there is no server, 86 quits silently. There is no limit on how many arguments can be 87 processed. One can combine --remote with -c <command> or +<com- 88 mand> to execute commands in already running instance of vifm. 89 See also "Client-Server" section below. 90 91 --remote-expr 92 passes expression to vifm server and prints result. See also 93 "Client-Server" section below. 94 95 -c <command> or +<command> 96 Run command-line mode <command> on startup. Commands in such 97 arguments are executed in the order they appear in command line. 98 Commands with spaces or special symbols must be enclosed in dou- 99 ble or single quotes or all special symbols should be escaped 100 (the exact syntax strongly depends on shell). "+" argument is 101 equivalent to "$" and thus picks last item of of the view. 102 103 --help, -h 104 Show a brief command summary and exit vifm. 105 106 --version, -v 107 Show version information and quit. 108 109 --no-configs 110 Skip reading vifmrc and vifminfo. 111 112 113 See "Startup" section below for the explanations on $VIFM. 114 115 General keys 116 Ctrl-C or Escape 117 cancel most operations (see "Cancellation" section below), clear 118 all selected files. 119 120 Ctrl-L clear and redraw the screen. 121 122 Basic Movement 123 The basic vi key bindings are used to move through the files and pop-up 124 windows. 125 126 k, gk, or Ctrl-P 127 move cursor up one line. 128 129 j, gj or Ctrl-N 130 move cursor down one line. 131 132 h when 'lsview' is off move up one directory (moves to parent di- 133 rectory node in tree view), otherwise move left one file. 134 135 l when 'lsview' is off move into a directory or launches a file, 136 otherwise move right one file. 137 138 gg move to the first line of the file list. 139 140 G move to the last line in the file list. 141 142 gh go up one directory regardless of view representation (regular, 143 ls-like). Also can be used to leave custom views including tree 144 view. 145 146 gl or Enter 147 enter directory or launch a file. 148 149 H move to the first file in the window. 150 151 M move to the file in the middle of the window. 152 153 L move to the last file in the window. 154 155 Ctrl-F or Page Down 156 move forward one page. 157 158 Ctrl-B or Page Up 159 move back one page. 160 161 Ctrl-D jump back one half page. 162 163 Ctrl-U jump forward one half page. 164 165 n% move to the file that is n percent from the top of the list (for 166 example 25%). 167 168 0 or ^ move cursor to the first column. See 'lsview' option descrip- 169 tion. 170 171 $ move cursor to the last column. See 'lsview' option descrip- 172 tion. 173 174 Space switch file lists. 175 176 gt switch to the next tab (wrapping around). 177 178 {n}gt switch to the tab number {n} (wrapping around). 179 180 gT switch to the previous tab (wrapping around). 181 182 {n}gT switch to {n}-th previous tab. 183 184 Movement with Count 185 Most movement commands also accept a count, 12j would move down 12 186 files. 187 188 [count]% 189 move to percent of the file list. 190 191 [count]j 192 move down [count] files. 193 194 [count]k 195 move up [count] files. 196 197 [count]G or [count]gg 198 move to list position [count]. 199 200 [count]h 201 go up [count] directories. 202 203 Scrolling panes 204 zt redraw pane with file in top of list. 205 206 zz redraw pane with file in center of list. 207 208 zb redraw pane with file in bottom of list. 209 210 Ctrl-E scroll pane one line down. 211 212 Ctrl-Y scroll pane one line up. 213 214 Pane manipulation 215 Second character can be entered with or without Control key. 216 217 Ctrl-W H 218 move the pane to the far left. 219 220 Ctrl-W J 221 move the pane to the very bottom. 222 223 Ctrl-W K 224 move the pane to the very top. 225 226 Ctrl-W L 227 move the pane to the far right. 228 229 230 Ctrl-W h 231 switch to the left pane. 232 233 Ctrl-W j 234 switch to the pane below. 235 236 Ctrl-W k 237 switch to the pane above. 238 239 Ctrl-W l 240 switch to the right pane. 241 242 243 Ctrl-W b 244 switch to bottom-right window. 245 246 Ctrl-W t 247 switch to top-left window. 248 249 250 Ctrl-W p 251 switch to previous window. 252 253 Ctrl-W w 254 switch to other pane. 255 256 257 Ctrl-W o 258 leave only one pane. 259 260 Ctrl-W s 261 split window horizontally. 262 263 Ctrl-W v 264 split window vertically. 265 266 267 Ctrl-W x 268 exchange panes. 269 270 Ctrl-W z 271 quit preview pane or view modes. 272 273 274 Ctrl-W - 275 decrease size of the view by count. 276 277 Ctrl-W + 278 increase size of the view by count. 279 280 Ctrl-W < 281 decrease size of the view by count. 282 283 Ctrl-W > 284 increase size of the view by count. 285 286 287 Ctrl-W | 288 set current view size to count. 289 290 Ctrl-W _ 291 set current view size to count. 292 293 Ctrl-W = 294 make size of two views equal. 295 296 For Ctrl-W +, Ctrl-W -, Ctrl-W <, Ctrl-W >, Ctrl-W | and Ctrl-W _ com- 297 mands count can be given before and/or after Ctrl-W. The resulting 298 count is a multiplication of those two. So "2 Ctrl-W 2 -" decreases 299 window size by 4 lines or columns. 300 301 Ctrl-W | and Ctrl-W _ maximise current view by default. 302 303 Marks 304 Marks are set the same way as they are in vi. 305 306 You can use these characters for marks [a-z][A-Z][0-9]. 307 308 m[a-z][A-Z][0-9] 309 set a mark for the file at the current cursor position. 310 311 '[a-z][A-Z][0-9] 312 navigate to the file set for the mark. 313 314 315 There are also several special marks that can't be set manually: 316 317 - ' (single quote) - previously visited directory of the view, thus 318 hitting '' allows switching between two last locations 319 320 - < - the first file of the last visually selected block 321 322 - > - the last file of the last visually selected block 323 324 Searching 325 /regular expression pattern 326 search for files matching regular expression in forward direc- 327 tion and advance cursor to next match. 328 329 / perform forward search with top item of search pattern history. 330 331 ?regular expression pattern 332 search for files matching regular expression in backward direc- 333 tion and advance cursor to previous match. 334 335 ? perform backward search with top item of search pattern history. 336 337 Trailing slash for directories is taken into account, so /\/ searches 338 for directories and symbolic links to directories. At the moment // 339 works too, but this can change in the future, so consider escaping the 340 slash if not typing pattern by hand. 341 342 Matches are automatically selected if 'hlsearch' is set. Enabling 343 'incsearch' makes search interactive. 'ignorecase' and 'smartcase' op- 344 tions affect case sensitivity of search queries. 345 346 347 [count]n 348 go to the next file matching last search pattern. Takes last 349 search direction into account. 350 351 [count]N 352 go to the previous file matching last search pattern. Takes 353 last search direction into account. 354 355 If 'hlsearch' option is set, hitting n/N to perform search and go to 356 the first matching item resets current selection in normal mode. It is 357 not the case if search was already performed on files in the directory, 358 thus selection is not reset after clearing selection with escape key 359 and hitting n/N key again. 360 361 Note: vifm uses extended regular expressions for / and ?. 362 363 364 [count]f[character] 365 search forward for file with [character] as first character in 366 name. Search wraps around the end of the list. 367 368 [count]F[character] 369 search backward for file with [character] as first character in 370 name. Search wraps around the end of the list. 371 372 [count]; 373 find the next match of f or F. 374 375 [count], 376 find the previous match of f or F. 377 378 Note: f, F, ; and , wrap around list beginning and end when they are 379 used alone and they don't wrap when they are used as selectors. 380 381 File Filters 382 There are three basic file filters: 383 384 - dot files filter (does not affect "." and ".." special directories, 385 whose appearance is controlled by the 'dotdirs' option), see 'dot- 386 files' option; 387 388 - permanent filter; 389 390 - local filter (see description of the "=" normal mode command). 391 392 Permanent filter essentially allows defining a group of files names 393 which are not desirable to be seen by default, like temporary or backup 394 files, which might be created alongside normal ones. Just like you 395 don't usually need to see hidden dot files (files starting with a dot). 396 Local filter on the other hand is for temporary immediate filtering of 397 file list at hand, to get rid of uninterested files in the view or to 398 make it possible to use % range in a :command. 399 400 For the purposes of more deterministic editing permanent filter is 401 split into two parts: 402 403 - one edited explicitly via :filter command; 404 405 - another one which is edited implicitly via zf shortcut. 406 407 Files are tested against both parts and a match counts if at least one 408 of the parts matched. 409 410 411 Each file list has its own copy of each filter. 412 413 Filtered files are not checked in / search or :commands. 414 415 Files and directories are filtered separately. This is done by append- 416 ing a slash to a directory name before testing whether it matches the 417 filter. Examples: 418 419 420 " filter directories which names end with '.files' 421 :filter /^.*\.files\/$/ 422 423 " filter files which names end with '.d' 424 :filter {*.d} 425 426 " filter files and directories which names end with '.o' 427 :filter /^.*\.o\/?$/ 428 429 Note: vifm uses extended regular expressions. 430 431 The basic vim folding key bindings are used for managing filters. 432 433 434 za toggle visibility of dot files. 435 436 zo show dot files. 437 438 zm hide dot files. 439 440 zf add selected files to permanent filter. 441 442 zO reset permanent filter. 443 444 zR save and reset all filters. 445 446 zr clear local filter. 447 448 zM restore all filters (undoes last zR). 449 450 zd exclude selection or current file from a custom view. Does 451 nothing for regular view. For tree view excluding directory ex- 452 cludes that sub-tree. For compare views zd hides group of adja- 453 cent identical files, count can be specified as 1 to exclude 454 just single file or selected items instead. Files excluded this 455 way are not counted as filtered out and can't be returned unless 456 view is reloaded. 457 458 =regular expression pattern 459 filter out files that don't match regular expression. Whether 460 view is updated as regular expression is changed depends on the 461 value of the 'incsearch' option. This kind of filter is auto- 462 matically reset when directory is changed. 463 464 Other Normal Mode Keys 465 [count]: 466 enter command line mode. [count] generates range. 467 468 q: open external editor to prompt for command-line command. See 469 "Command line editing" section for details. 470 471 q/ open external editor to prompt for search pattern to be searched 472 in forward direction. See "Command line editing" section for 473 details. 474 475 q? open external editor to prompt for search pattern to be searched 476 in backward direction. See "Command line editing" section for 477 details. 478 479 q= open external editor to prompt for filter pattern. See "Command 480 line editing" section for details. Unlike other q{x} commands 481 this one doesn't work in Visual mode. 482 483 [count]!! and [count]!<selector> 484 enter command line mode with entered ! command. [count] modi- 485 fies range. 486 487 Ctrl-O go backwards through directory history of current view. Nonex- 488 istent directories are automatically skipped. 489 490 Ctrl-I if 'cpoptions' contains "t" flag, <tab> and <c-i> switch active 491 pane just like <space> does, otherwise it goes forward through 492 directory history of current view. Nonexistent directories are 493 automatically skipped. 494 495 Ctrl-G create a window showing detailed information about the current 496 file. 497 498 Shift-Tab 499 enters view mode (works only after activating view pane with 500 :view command). 501 502 ga calculate directory size. Uses cached directory sizes when pos- 503 sible for better performance. As a special case calculating 504 size of ".." entry results in calculation of size of current di- 505 rectory. 506 507 gA like ga, but force update. Ignores old values of directory 508 sizes. 509 510 If file under cursor is selected, each selected item is processed, oth- 511 erwise only current file is updated. 512 513 gf find link destination (like l with 'followlinks' off, but also 514 finds directories). 515 516 gr only for MS-Windows 517 same as l key, but tries to run program with administrative 518 privileges. 519 520 av go to visual mode into selection amending state preserving cur- 521 rent selection. 522 523 gv go to visual mode restoring last selection. 524 525 [reg]gs 526 when no register is specified, restore last t selection (similar 527 to what gv does for visual mode selection). If register is 528 present, then all files listed in that register and which are 529 visible in current view are selected. 530 531 gu<selector> 532 make names of selected files lowercase. 533 534 [count]guu and [count]gugu 535 make names of [count] files starting from the current one lower- 536 case. Without [count] only current file is affected. 537 538 gU<selector> 539 make names of selected files uppercase. 540 541 [count]gUU and [count]gUgU 542 make names of [count] files starting from the current one upper- 543 case. Without [count] only current file is affected. 544 545 e explore file in the current pane. 546 547 i handle file (even if it's an executable and 'runexec' option is 548 set). 549 550 cw change word is used to rename a file or files. 551 552 cW change WORD is used to change only name of file (without exten- 553 sion). 554 555 cl change link target. 556 557 co only for *nix 558 change file owner. 559 560 cg only for *nix 561 change file group. 562 563 [count]cp 564 change file attributes (permission on *nix and properties on 565 Windows). If [count] is specified, it's treated as numerical 566 argument for non-recursive `chmod` command (of the form 567 [0-7]{3,4}). 568 569 [count]C 570 clone file [count] times. 571 572 [count]dd or d[count]selector 573 move selected file or files to trash directory (if 'trash' op- 574 tion is set, otherwise delete). See "Trash directory" section 575 below. 576 577 [count]DD or D[count]selector 578 like dd and d<selector>, but omitting trash directory (even when 579 'trash' option is set). 580 581 Y, [count]yy or y[count]selector 582 yank selected files. 583 584 p copy yanked files to the current directory or move the files to 585 the current directory if they were deleted with dd or :d[elete] 586 or if the files were yanked from trash directory. See "Trash 587 directory" section below. 588 589 P move the last yanked files. The advantage of using P instead of 590 d followed by p is that P moves files only once. This isn't im- 591 portant in case you're moving files in the same file system 592 where your home directory is, but using P to move files on some 593 other file system (or file systems, in case you want to move 594 files from fs1 to fs2 and your home is on fs3) can save your 595 time. 596 597 al put symbolic links with absolute paths. 598 599 rl put symbolic links with relative paths. 600 601 t select or unselect (tag) the current file. 602 603 u undo last change. 604 605 Ctrl-R redo last change. 606 607 dp in compare view of "ofboth grouppaths" kind, makes corresponding 608 entry of the other pane equal to the current one. The semantics 609 is as follows: 610 - nothing done for identical entries 611 - if file is missing in current view, its pair gets removed 612 - if file is missing or differs in other view, it's replaced 613 - file pairs are defined by matching relative paths 614 File removal obeys 'trash' option. When the option is enabled, 615 the operation can be undone/redone (although results won't be 616 visible automatically). 617 Unlike in Vim, this operation is performed on a single line 618 rather than a set of adjacent changes. 619 620 do same as dp, but applies changes in the opposite direction. 621 622 v or V enter visual mode, clears current selection. 623 624 [count]Ctrl-A 625 increment first number in file name by [count] (1 by default). 626 627 [count]Ctrl-X 628 decrement first number in file name by [count] (1 by default). 629 630 ZQ same as :quit!. 631 632 ZZ same as :quit. 633 634 . repeat last command-line command (not normal mode command) of 635 this session (does nothing right after startup or :restart com- 636 mand). The command doesn't depend on command-line history and 637 can be used with completely disabled history. 638 639 ( go to previous group. Groups are defined by primary sorting 640 key. For name and iname members of each group have same first 641 letter, for all other sorting keys vifm uses size, uid, ... 642 643 ) go to next group. See ( key description above. 644 645 { speeds up navigation to closest previous entry of the opposite 646 type by moving to the first file backwards when cursor is on a 647 directory and to the first directory backwards when cursor is on 648 a file. This is essentially a special case of ( that is locked 649 on "dirs". 650 651 } same as {, but in forward direction. 652 653 [c go to previous mismatched entry in directory comparison view or 654 do nothing. 655 656 ]c go to next mismatched entry in directory comparison view or do 657 nothing. 658 659 [d go to previous directory entry or do nothing. 660 661 ]d go to next directory entry or do nothing. 662 663 [r same as :siblprev. 664 665 ]r same as :siblnext. 666 667 [R same as :siblprev!. 668 669 ]R same as :siblnext!. 670 671 [s go to previous selected entry or do nothing. 672 673 ]s go to next selected entry or do nothing. 674 675 [z go to first sibling of current entry. 676 677 ]z go to last sibling of current entry. 678 679 zj go to next directory sibling of current entry or do nothing. 680 681 zk go to previous directory sibling of current entry or do nothing. 682 683 Using Count 684 You can use count with commands like yy. 685 686 [count]yy 687 yank count files starting from current cursor position downward. 688 689 Or you can use count with motions passed to y, d or D. 690 691 d[count]j 692 delete (count + 1) files starting from current cursor position 693 upward. 694 695 Registers 696 vifm supports multiple registers for temporary storing list of yanked 697 or deleted files. 698 699 Registers should be specified by hitting double quote key followed by a 700 register name. Count is specified after register name. By default 701 commands use unnamed register, which has double quote as its name. 702 703 Though all commands accept registers, most of commands ignores them 704 (for example H or Ctrl-U). Other commands can fill register or append 705 new files to it. 706 707 Presently vifm supports ", _, a-z and A-Z characters as register names. 708 709 As mentioned above " is unnamed register and has special meaning of the 710 default register. Every time when you use named registers (a-z and A- 711 Z) unnamed register is updated to contain same list of files as the 712 last used register. 713 714 _ is black hole register. It can be used for writing, but its list is 715 always empty. 716 717 Registers with names from a to z and from A to Z are named ones. Low- 718 ercase registers are cleared before adding new files, while uppercase 719 aren't and should be used to append new files to the existing file list 720 of appropriate lowercase register (A for a, B for b, ...). 721 722 Registers can be changed on :empty command if they contain files under 723 trash directory (see "Trash directory" section below). 724 725 Registers do not contain one file more than once. 726 727 Example: 728 729 "a2yy 730 731 puts names of two files to register a (and to the unnamed register), 732 733 "Ad 734 735 removes one file and append its name to register a (and to the unnamed 736 register), 737 738 p or "ap or "Ap 739 740 inserts previously yanked and deleted files into current directory. 741 742 Selectors 743 y, d, D, !, gu and gU commands accept selectors. You can combine them 744 with any of selectors below to quickly remove or yank several files. 745 746 Most of selectors are like vi motions: j, k, gg, G, H, L, M, %, f, F, 747 ;, comma, ', ^, 0 and $. But there are some additional ones. 748 749 a all files in current view. 750 751 s selected files. 752 753 S all files except selected. 754 755 Examples: 756 757 - dj - delete file under cursor and one below; 758 759 - d2j - delete file under cursor and two below; 760 761 - y6gg - yank all files from cursor position to 6th file in the list. 762 763 When you pass a count to whole command and its selector they are multi- 764 plied. So: 765 766 - 2d2j - delete file under cursor and four below; 767 768 - 2dj - delete file under cursor and two below; 769 770 - 2y6gg - yank all files from cursor position to 12th file in the 771 list. 772 773 Visual Mode 774 Visual mode has to generic operating submodes: 775 776 - plain selection as it is in Vim; 777 778 - selection editing submode. 779 780 Both modes select files in range from cursor position at which visual 781 mode was entered to current cursor position (let's call it "selection 782 region"). Each of two borders can be adjusted by swapping them via "o" 783 or "O" keys and updating cursor position with regular cursor motion 784 keys. Obviously, once initial cursor position is altered this way, 785 real start position becomes unavailable. 786 787 Plain Vim-like visual mode starts with cleared selection, which is not 788 restored on rejecting selection ("Escape", "Ctrl-C", "v", "V"). Con- 789 trary to it, selection editing doesn't clear previously selected files 790 and restores them after reject. Accepting selection by performing an 791 operation on selected items (e.g. yanking them via "y") moves cursor to 792 the top of current selection region (not to the top most selected file 793 of the view). 794 795 In turn, selection editing supports three types of editing (look at 796 statusbar to know which one is currently active): 797 798 - append - amend selection by selecting elements in selection region; 799 800 - remove - amend selection by deselecting elements in selection re- 801 gion; 802 803 - invert - amend selection by inverting selection of elements in se- 804 lection region. 805 806 No matter how you activate selection editing it starts in "append". 807 One can switch type of operation (in the order given above) via "Ctrl- 808 G" key. 809 810 Almost all normal mode keys work in visual mode, but instead of accept- 811 ing selectors they operate on selected items. 812 813 Enter save selection and go back to normal mode not moving cursor. 814 815 av leave visual mode if in amending mode (restores previous selec- 816 tion), otherwise switch to amending selection mode. 817 818 gv restore previous visual selection. 819 820 v, V, Ctrl-C or Escape 821 leave visual mode if not in amending mode, otherwise switch to 822 normal visual selection. 823 824 Ctrl-G switch type of amending by round robin scheme: append -> remove 825 -> invert. 826 827 : enter command line mode. Selection is cleared on leaving the 828 mode. 829 830 o switch active selection bound. 831 832 O switch active selection bound. 833 834 gu, u make names of selected files lowercase. 835 836 gU, U make names of selected files uppercase. 837 838 View Mode 839 This mode tries to imitate the less program. List of builtin shortcuts 840 can be found below. Shortcuts can be customized using :qmap, :qnoremap 841 and :qunmap command-line commands. 842 843 Shift-Tab, Tab, q, Q, ZZ 844 return to normal mode. 845 846 [count]e, [count]Ctrl-E, [count]j, [count]Ctrl-N, [count]Enter 847 scroll forward one line (or [count] lines). 848 849 [count]y, [count]Ctrl-Y, [count]k, [count]Ctrl-K, [count]Ctrl-P 850 scroll backward one line (or [count] lines). 851 852 [count]f, [count]Ctrl-F, [count]Ctrl-V, [count]Space 853 scroll forward one window (or [count] lines). 854 855 [count]b, [count]Ctrl-B, [count]Alt-V 856 scroll backward one window (or [count] lines). 857 858 [count]z 859 scroll forward one window (and set window to [count]). 860 861 [count]w 862 scroll backward one window (and set window to [count]). 863 864 [count]Alt-Space 865 scroll forward one window, but don't stop at end-of-file. 866 867 [count]d, [count]Ctrl-D 868 scroll forward one half-window (and set half-window to [count]). 869 870 [count]u, [count]Ctrl-U 871 scroll backward one half-window (and set half-window to 872 [count]). 873 874 r, Ctrl-R, Ctrl-L 875 repaint screen. 876 877 R reload view preserving scroll position. 878 879 F toggle automatic forwarding. Roughly equivalent to periodic 880 file reload and scrolling to the bottom. The behaviour is simi- 881 lar to `tail -F` or F key in less. 882 883 [count]/pattern 884 search forward for ([count]-th) matching line. 885 886 [count]?pattern 887 search backward for ([count]-th) matching line. 888 889 [count]n 890 repeat previous search (for [count]-th occurrence). 891 892 [count]N 893 repeat previous search in reverse direction (for [count]-th oc- 894 currence). 895 896 [count]g, [count]<, [count]Alt-< 897 scroll to the first line of the file (or line [count]). 898 899 [count]G, [count]>, [count]Alt-> 900 scroll to the last line of the file (or line [count]). 901 902 [count]p, [count]% 903 scroll to the beginning of the file (or N percent into file). 904 905 v invoke an editor to edit the current file being viewed. The 906 command for editing is taken from the 'vicmd'/'vixcmd' option 907 value and extended with middle line number prepended by a plus 908 sign and name of the current file. 909 910 All "Ctrl-W x" keys work the same was as in Normal mode. Active mode 911 is automatically changed on navigating among windows. When less-like 912 mode activated on file preview is left using one by "Ctrl-W x" keys, 913 its state is stored until another file is displayed using preview (it's 914 possible to leave the mode, hide preview pane, do something else, then 915 get back to the file and show preview pane again with previously stored 916 state in it). 917 918 Command line Mode 919 These keys are available in all submodes of the command line mode: com- 920 mand, search, prompt and filtering. 921 922 Down, Up, Left, Right, Home, End and Delete are extended keys and they 923 are not available if vifm is compiled with --disable-extended-keys op- 924 tion. 925 926 Esc, Ctrl-C 927 leave command line mode, cancels input. Cancelled input is 928 saved into appropriate history and can be recalled later. 929 930 Ctrl-M, Enter 931 execute command and leave command line mode. 932 933 Ctrl-I, Tab 934 complete command or its argument. 935 936 Shift-Tab 937 complete in reverse order. 938 939 Ctrl-_ stop completion and return original input. 940 941 Ctrl-B, Left 942 move cursor to the left. 943 944 Ctrl-F, Right 945 move cursor to the right. 946 947 Ctrl-A, Home 948 go to line beginning. 949 950 Ctrl-E, End 951 go to line end. 952 953 Alt-B go to the beginning of previous word. 954 955 Alt-F go to the end of next word. 956 957 Ctrl-U remove characters from cursor position till the beginning of 958 line. 959 960 Ctrl-K remove characters from cursor position till the end of line. 961 962 Ctrl-H, Backspace 963 remove character before the cursor. 964 965 Ctrl-D, Delete 966 remove character under the cursor. 967 968 Ctrl-W remove characters from cursor position till the beginning of 969 previous word. 970 971 Alt-D remove characters from cursor position till the beginning of 972 next word. 973 974 Ctrl-T swap the order of current and previous character and move cursor 975 forward or, if cursor past the end of line, swap the order of 976 two last characters in the line. 977 978 Alt-. insert last part of previous command to current cursor position. 979 Each next call will insert last part of older command. 980 981 Ctrl-G edit command-line content in external editor. See "Command line 982 editing" section for details. 983 984 Ctrl-N recall more recent command-line from history. 985 986 Ctrl-P recall older command-line from history. 987 988 Up recall more recent command-line from history, that begins as the 989 current command-line. 990 991 Down recall older command-line from history, that begins as the cur- 992 rent command-line. 993 994 Ctrl-] trigger abbreviation expansion. 995 996 Pasting special values 997 The shortcuts listed below insert specified values into current cursor 998 position. Last key of every shortcut references value that it inserts: 999 - c - [c]urrent file 1000 - d - [d]irectory path 1001 - e - [e]xtension of a file name 1002 - r - [r]oot part of a file name 1003 - t - [t]ail part of directory path 1004 1005 - a - [a]utomatic filter 1006 - m - [m]anual filter 1007 - = - local filter, which is bound to "=" in normal mode 1008 1009 Values related to filelist in current pane are available through Ctrl-X 1010 prefix, while values from the other pane have doubled Ctrl-X key as 1011 their prefix (doubled Ctrl-X is presumably easier to type than upper- 1012 case letters; it's still easy to remap the keys to correspond to names 1013 of similar macros). 1014 1015 Ctrl-X c 1016 name of the current file of the active pane. 1017 1018 Ctrl-X d 1019 path to the current directory of the active pane. 1020 1021 Ctrl-X e 1022 extension of the current file of the active pane. 1023 1024 Ctrl-X r 1025 name root of current file of the active pane. 1026 1027 Ctrl-X t 1028 the last component of path to the current directory of the ac- 1029 tive pane. 1030 1031 Ctrl-X Ctrl-X c 1032 name of the current file of the inactive pane. 1033 1034 Ctrl-X Ctrl-X d 1035 path to the current directory of the inactive pane. 1036 1037 Ctrl-X Ctrl-X e 1038 extension of the current file of the inactive pane. 1039 1040 Ctrl-X Ctrl-X r 1041 name root of current file of the inactive pane. 1042 1043 Ctrl-X Ctrl-X t 1044 the last component of path to the current directory of the inac- 1045 tive pane. 1046 1047 1048 Ctrl-X a 1049 value of implicit permanent filter (old name "automatic") of the 1050 active pane. 1051 1052 Ctrl-X m 1053 value of explicit permanent filter (old name "manual") of the 1054 active pane. 1055 1056 Ctrl-X = 1057 value of local filter of the active pane. 1058 1059 1060 Ctrl-X / 1061 last pattern from search history. 1062 1063 Command line editing 1064 vifm provides a facility to edit several kinds of data, that is usually 1065 edited in command-line mode, in external editor (using command speci- 1066 fied by 'vicmd' or 'vixcmd' option). This has at least two advantages 1067 over built-in command-line mode: 1068 - one can use full power of Vim to edit text; 1069 - finding and reusing history entries becomes possible. 1070 1071 The facility is supported by four input submodes of the command-line: 1072 - command; 1073 - forward search; 1074 - backward search; 1075 - file rename (see description of cw and cW normal mode keys). 1076 1077 Editing command-line using external editor is activated by the Ctrl-G 1078 shortcut. It's also possible to do almost the same from Normal and 1079 Visual modes using q:, q/ and q? commands. 1080 1081 Temporary file created for the purpose of editing the line has the fol- 1082 lowing structure: 1083 1084 1. First line, which is either empty or contains text already entered 1085 in command-line. 1086 1087 2. 2nd and all other lines with history items starting with the most 1088 recent one. Altering this lines in any way won't change history 1089 items stored by vifm. 1090 1091 After editing application is finished the first line of the file is 1092 taken as the result of operation, when the application returns zero 1093 exit code. If the application returns an error (see :cquit command in 1094 Vim), all the edits made to the file are ignored, but the initial value 1095 of the first line is saved in appropriate history. 1096 1097 More Mode 1098 This is the mode that appears when status bar content is so big that it 1099 doesn't fit on the screen. One can identify the mode by "-- More --" 1100 message at the bottom. 1101 1102 The following keys are handled in this mode: 1103 1104 1105 Enter, Ctrl-J, j or Down 1106 scroll one line down. 1107 1108 Backspace, k or Up 1109 scroll one line up. 1110 1111 1112 d scroll one page (half of a screen) down. 1113 1114 u scroll one page (half of a screen) up. 1115 1116 1117 Space, f or PageDown 1118 scroll down a screen. 1119 1120 b or PageUp 1121 scroll up a screen. 1122 1123 1124 G scroll to the bottom. 1125 1126 g scroll to the top. 1127 1128 1129 q, Escape or Ctrl-C 1130 quit the mode. 1131 1132 : switch to command-line mode. 1133 1134 Commands 1135 Commands are executed with :command_name<Enter> 1136 1137 Commented out lines should start with the double quote symbol ("), 1138 which may be preceded by whitespace characters intermixed with colons. 1139 Inline comments can be added at the end of the line after double quote 1140 symbol, only last line of a multi-line command can contain such com- 1141 ment. Not all commands support inline comments as their syntax con- 1142 flicts with names of registers and fields where double quotes are al- 1143 lowed. 1144 1145 Most of the commands have two forms: complete and the short one. Exam- 1146 ple: 1147 1148 :noh[lsearch] 1149 1150 This means the complete command is nohlsearch, and the short one is 1151 noh. 1152 1153 Most of command-line commands completely reset selection in the current 1154 view. However, there are several exceptions: 1155 1156 - `:invert s` most likely leaves some files selected; 1157 1158 - :normal command (when it doesn't leave command-line mode); 1159 1160 - :if and :else commands don't affect selection on successful execu- 1161 tion. 1162 1163 '|' can be used to separate commands, so you can give multiple commands 1164 in one line. If you want to use '|' in an argument, precede it with 1165 '\'. 1166 1167 These commands see '|' as part of their arguments even when it's es- 1168 caped: 1169 1170 :[range]! 1171 :autocmd 1172 :cabbrev 1173 :cmap 1174 :cnoreabbrev 1175 :cnoremap 1176 :command 1177 :dmap 1178 :dnoremap 1179 :filetype 1180 :fileviewer 1181 :filextype 1182 :map 1183 :mmap 1184 :mnoremap 1185 :nmap 1186 :nnoremap 1187 :noremap 1188 :normal 1189 :qmap 1190 :qnoremap 1191 :vmap 1192 :vnoremap 1193 :wincmd 1194 :windo 1195 :winrun 1196 1197 To be able to use another command after one of these, wrap it with the 1198 :execute command. An example: 1199 1200 if filetype('.') == 'reg' | execute '!!echo regular file' | endif 1201 1202 :[count] 1203 1204 :number 1205 move to the file number. 1206 :12 would move to the 12th file in the list. 1207 :0 move to the top of the list. 1208 :$ move to the bottom of the list. 1209 1210 :[count]command 1211 The only builtin :[count]command are :[count]d[elete] and 1212 :[count]y[ank]. 1213 1214 :d3 would delete three files starting at the current file position 1215 moving down. 1216 1217 :3d would delete one file at the third line in the list. 1218 1219 :command [args] 1220 1221 :[range]!program 1222 execute command via shell. Accepts macros. 1223 1224 :[range]!command & 1225 1226 same as above, but the command is run in the background using vifm's 1227 means. 1228 1229 Programs that write to stdout like "ls" create an error message showing 1230 partial output of the command. 1231 1232 Note the space before ampersand symbol, if you omit it, command will be 1233 run in the background using job control of your shell. 1234 1235 Accepts macros. 1236 1237 :!! 1238 1239 :[range]!!command 1240 same as :!, but pauses before returning. 1241 1242 :!! repeat the last command. 1243 1244 :alink 1245 1246 :[range]alink[!?] 1247 create absolute symbolic links to files in directory of inactive 1248 view. With "?" prompts for destination file names in an edi- 1249 tor. "!" forces overwrite. 1250 1251 :[range]alink[!] path 1252 create absolute symbolic links to files in directory specified 1253 by the path (absolute or relative to directory of inactive 1254 view). 1255 1256 :[range]alink[!] name1 name2... 1257 create absolute symbolic links of files in directory of other 1258 view giving each next link a corresponding name from the argu- 1259 ment list. 1260 1261 :apropos 1262 1263 :apropos keyword... 1264 create a menu of items returned by the apropos command. Select- 1265 ing an item in the menu opens corresponding man page. By de- 1266 fault the command relies on the external "apropos" utility, 1267 which can be customized by altering value of the 'aproposprg' 1268 option. 1269 1270 :autocmd 1271 1272 :au[tocmd] {event} {pat} {cmd} 1273 register autocommand for the {event}, which can be: 1274 - DirEnter - triggered after directory is changed 1275 Event name is case insensitive. 1276 1277 {pat} is a comma-separated list of modified globs patterns, 1278 which can contain tilde or environment variables. All paths use 1279 slash ('/') as directory separator. The pattern can start with 1280 a '!', which negates it. Patterns that do not contain slashes 1281 are matched against the last item of the path only (e.g. "dir" 1282 in "/path/dir"). Literal comma can be entered by doubling it. 1283 Two modifications to globs matching are as follows: 1284 - * - never matches a slash (i.e., can signify single direc- 1285 tory level) 1286 - ** - matches any character (i.e., can match path of arbi- 1287 trary depth) 1288 1289 {cmd} is a :command or several of them separated with '|'. 1290 1291 Examples of patterns: 1292 - conf.d - matches conf.d directory anywhere 1293 - *.d - matches directories ending with ".d" anywhere 1294 - **.git - matches something.git, but not .git anywhere 1295 - **/.git/** - matches /path/.git/objects, but not /path/.git 1296 - **/.git/**/ - matches /path/.git/ only (because of trailing 1297 slash) 1298 - /etc/* - matches /etc/conf.d/, /etc/X11, but not 1299 /etc/X11/fs 1300 - /etc/**/*.d - matches /etc/conf.d, /etc/X11/conf.d, etc. 1301 - /etc/**/* - matches /etc/ itself and any file below it 1302 - /etc/**/** - matches /etc/ itself and any file below it 1303 1304 :au[tocmd] [{event}] [{pat}] 1305 list those autocommands that match given event-pattern combina- 1306 tion. 1307 {event} and {pat} can be omitted to list all autocommands. To 1308 list any autocommands for specific pattern one can use * place- 1309 holder in place of {event}. 1310 1311 :au[tocmd]! [{event}] [{pat}] 1312 remove autocommands that match given event-pattern combination. 1313 Syntax is the same as for listing above. 1314 1315 :apropos 1316 repeat last :apropos command. 1317 1318 :bmark 1319 1320 :bmark tag1 [tag2 [tag3...]] 1321 bookmark current directory with specified tags. 1322 1323 :bmark! path tag1 [tag2 [tag3...]] 1324 same as :bmark, but allows bookmarking specific path instead of 1325 current directory. This is for use in vifmrc and for bookmark- 1326 ing files. 1327 1328 Path can contain macros that expand to single path (%c, %C, %d, 1329 %D) or those that can expand to multiple paths, but contain only 1330 one (%f, %F, %rx). The latter is done for convenience on using 1331 the command interactively. Complex macros that include spaces 1332 (e.g. "%c:gs/ /_") should be escaped. 1333 1334 :bmarks 1335 1336 :bmarks 1337 display all bookmarks in a menu. 1338 1339 :bmarks [tag1 [tag2...]] 1340 display menu of bookmarks that include all of the specified 1341 tags. 1342 1343 :bmgo 1344 1345 :bmgo [tag1 [tag2...]] 1346 when there are more than one match acts exactly like :bmarks, 1347 otherwise navigates to single match immediately (and fails if 1348 there is no match). 1349 1350 :cabbrev 1351 1352 :ca[bbrev] 1353 display menu of command-line mode abbreviations. 1354 1355 :ca[bbrev] lhs-prefix 1356 display command-line mode abbreviations which left-hand side 1357 starts with specified prefix. 1358 1359 :ca[bbrev] lhs rhs 1360 register new or overwrites existing abbreviation for command- 1361 line mode. rhs can contain spaces and any special sequences ac- 1362 cepted in rhs of mappings (see "Mappings" section below). Ab- 1363 breviations are expanded non-recursively. 1364 1365 :cnoreabbrev 1366 1367 :cnorea[bbrev] 1368 display menu of command-line mode abbreviations. 1369 1370 :cnorea[bbrev] lhs-prefix 1371 display command-line mode abbreviations which left-hand side 1372 starts with specified prefix. 1373 1374 :cnorea[bbrev] lhs rhs 1375 same as :cabbrev, but mappings in rhs are ignored during expan- 1376 sion. 1377 1378 :cd 1379 1380 :cd or :cd ~ or :cd $HOME 1381 change to home directory. 1382 1383 :cd - go to the last visited directory. 1384 1385 :cd ~/dir 1386 change directory to ~/dir. 1387 1388 :cd /curr/dir /other/dir 1389 change directory of the current pane to /curr/dir and directory 1390 of the other pane to /other/dir. Relative paths are assumed to 1391 be relative to directory of current view. Command won't fail if 1392 one of directories is invalid. All forms of the command accept 1393 macros. 1394 1395 :cd! /dir 1396 same as :cd /dir /dir. 1397 1398 :cds 1399 1400 :cds[!] pattern string 1401 navigate to path obtained by substituting first match in current 1402 path. Arguments can include slashes, but starting first argu- 1403 ment with a separator will activate below form of the command. 1404 Specifying "!" changes directory of both panes. 1405 1406 Available flags: 1407 1408 - i - ignore case (the 'ignorecase' and 'smartcase' options are not 1409 used) 1410 1411 - I - don't ignore case (the 'ignorecase' and 'smartcase' options are 1412 not used) 1413 1414 :cds[!]/pattern/string/[flags] 1415 same as above, but with :substitute-like syntax. Other punctua- 1416 tion characters can be used as separators. 1417 1418 :change 1419 1420 :c[hange] 1421 create a menu window to alter a files properties. 1422 1423 :chmod 1424 1425 :[range]chmod 1426 display file attributes (permission on *nix and properties on 1427 Windows) change dialog. 1428 1429 :[range]chmod[!] arg... 1430 only for *nix 1431 change permissions for files. See `man 1 chmod` for arg format. 1432 "!" means set permissions recursively. 1433 1434 :chown 1435 1436 :[range]chown 1437 only for *nix 1438 same as co key in normal mode. 1439 1440 :[range]chown [user][:][group] 1441 only for *nix 1442 change owner and/or group of files. Operates on directories re- 1443 cursively. 1444 1445 :clone 1446 1447 :[range]clone[!?] 1448 clones files in current directory. With "?" vifm will open vi 1449 to edit file names. "!" forces overwrite. Macros are expanded. 1450 1451 :[range]clone[!] path 1452 clones files to directory specified with the path (absolute or 1453 relative to current directory). "!" forces overwrite. Macros 1454 are expanded. 1455 1456 :[range]clone[!] name1 name2... 1457 clones files in current directory giving each next clone a cor- 1458 responding name from the argument list. "!" forces overwrite. 1459 Macros are expanded. 1460 1461 :colorscheme 1462 1463 :colo[rscheme]? 1464 print current color scheme name on the status bar. 1465 1466 :colo[rscheme] 1467 display a menu with a list of available color schemes. You can 1468 choose primary color scheme here. It is used for view if no di- 1469 rectory specific colorscheme fits current path. It's also used 1470 to set border color (except view titles) and colors in menus and 1471 dialogs. 1472 1473 :colo[rscheme] color_scheme_name 1474 change primary color scheme to color_scheme_name. In case of 1475 errors (e.g. some colors are not supported by terminal) either 1476 nothing is changed or color scheme is reset to builtin colors to 1477 ensure that TUI is left in a usable state. 1478 1479 :colo[rscheme] color_scheme_name directory 1480 associate directory with the color scheme. The directory argu- 1481 ment can be either absolute or relative path when :colorscheme 1482 command is executed from command line, but mandatory should be 1483 an absolute path when the command is executed in scripts loaded 1484 at startup (until vifm is completely loaded). 1485 1486 :colo[rscheme] color_scheme_name color_scheme_name... 1487 loads the first color scheme in the order given that exists and 1488 is supported by the terminal. If none matches, current one re- 1489 mains unchanged. For example: 1490 1491 " use a separate color scheme for panes which are inside FUSE mounts 1492 execute 'colorscheme in-fuse' &fusehome 1493 1494 :comclear 1495 1496 :comc[lear] 1497 remove all user defined commands. 1498 1499 :command 1500 1501 :com[mand] 1502 display a menu of user commands. 1503 1504 :com[mand] beginning 1505 display user defined commands that start with the beginning. 1506 1507 :com[mand] name action 1508 set a new user command. 1509 Trying to use a reserved command name will result in an error 1510 message. 1511 Use :com[mand]! to overwrite a previously set command. 1512 Unlike vim user commands do not have to start with a capital 1513 letter. User commands are run in a shell by default. To run a 1514 command in the background you must set it as a background com- 1515 mand with & at the end of the commands action (:com rm rm %f &). 1516 Command name cannot contain numbers or special symbols (except 1517 '?' and '!'). 1518 1519 :com[mand] name /pattern 1520 set search pattern. 1521 1522 :com[mand] name =pattern 1523 set local filter value. 1524 1525 :com[mand] name filter{:filter args} 1526 set file name filter (see :filter command description). For ex- 1527 ample: 1528 1529 " display only audio files 1530 :command onlyaudio filter/.+.\(mp3|wav|mp3|flac|ogg|m4a|wma|ape\)$/i 1531 " display everything except audio files 1532 :command noaudio filter!/.+.\(mp3|wav|mp3|flac|ogg|m4a|wma|ape\)$/i 1533 1534 :com[mand] cmd :commands 1535 set kind of an alias for internal command (like in a shell). 1536 Passes range given to alias to an aliased command, so running 1537 :%cp after 1538 :command cp :copy %a 1539 equals 1540 :%copy 1541 1542 :compare 1543 1544 :compare [byname | bysize | bycontents | listall | listunique | 1545 listdups | ofboth | ofone | groupids | grouppaths | skipempty]... 1546 compare files in one or two views according the arguments. The 1547 default is "bycontents listall ofboth grouppaths". See "Compare 1548 views" section below for details. Tree structure is incompati- 1549 ble with alternative representations, so values of 'lsview' and 1550 'millerview' options are ignored. 1551 1552 :copen 1553 1554 :cope[n] 1555 opens menu with contents of the last displayed menu with naviga- 1556 tion to files by default, if any. 1557 1558 :copy 1559 1560 :[range]co[py][!?][ &] 1561 copy files to directory of other view. With "?" prompts for 1562 destination file names in an editor. "!" forces overwrite. 1563 1564 :[range]co[py][!] path[ &] 1565 copy files to directory specified with the path (absolute or 1566 relative to directory of other view). "!" forces overwrite. 1567 1568 :[range]co[py][!] name1 name2...[ &] 1569 copy files to directory of other view giving each next file a 1570 corresponding name from the argument list. "!" forces over- 1571 write. 1572 1573 :cquit 1574 1575 :cq[uit][!] 1576 same as :quit, but also aborts directory choosing via 1577 --choose-dir (empties output file) and returns non-zero exit 1578 code. 1579 1580 :cunabbrev 1581 1582 :cuna[bbrev] lhs 1583 unregister command-line mode abbreviation by its lhs. 1584 1585 :cuna[bbrev] rhs 1586 unregister command-line mode abbreviation by its rhs, so that 1587 abbreviation could be removed even after expansion. 1588 1589 :delbmarks 1590 1591 :delbmarks 1592 remove bookmarks from current directory. 1593 1594 :delbmarks tag1 [tag2 [tag3...]] 1595 remove set of bookmarks that include all of the specified tags. 1596 1597 :delbmarks! 1598 remove all bookmarks. 1599 1600 :delbmarks! path1 [path2 [path3...]] 1601 remove bookmarks of listed paths. 1602 1603 :delcommand 1604 1605 :delc[ommand] user_command 1606 remove user defined command named user_command. 1607 1608 :delete 1609 1610 :[range]d[elete][!][ &] 1611 delete selected file or files. "!" means complete removal 1612 (omitting trash). 1613 1614 :[range]d[elete][!] [reg] [count][ &] 1615 delete selected or [count] files to the reg register. "!" means 1616 complete removal (omitting trash). 1617 1618 :delmarks 1619 1620 :delm[arks]! 1621 delete all marks. 1622 1623 :delm[arks] marks ... 1624 delete specified marks, each argument is treated as a set of 1625 marks. 1626 1627 :display 1628 1629 :di[splay] 1630 display menu with registers content. 1631 1632 :di[splay] list ... 1633 display the contents of the numbered and named registers that 1634 are mentioned in list (for example "az to display "", "a and "z 1635 content). 1636 1637 :dirs 1638 1639 :dirs display directory stack. 1640 1641 :echo 1642 1643 :ec[ho] [<expr>...] 1644 evaluate each argument as an expression and output them sepa- 1645 rated with a space. See help on :let command for a definition 1646 of <expr>. 1647 1648 :edit 1649 1650 :[range]e[dit] [file...] 1651 open selected or passed file(s) in editor. Macros and environ- 1652 ment variables are expanded. 1653 1654 :else 1655 1656 :el[se] 1657 execute commands until next matching :endif if all other condi- 1658 tions didn't match. See also help on :if and :endif commands. 1659 1660 :elseif 1661 1662 :elsei[f] {expr1} 1663 execute commands until next matching :elseif, :else or :endif if 1664 conditions of previous :if and :elseif branches were evaluated 1665 to zero. See also help on :if and :endif commands. 1666 1667 :empty 1668 1669 :empty permanently remove files from all existing non-empty trash di- 1670 rectories (see "Trash directory" section below). Trash directo- 1671 ries which are specified via %r and/or %u also get deleted com- 1672 pletely. Also remove all operations from undolist that have no 1673 sense after :empty and remove all records about files located 1674 inside directories from all registers. Removal is performed as 1675 background task with undetermined amount of work and can be 1676 checked via :jobs menu. 1677 1678 :endif 1679 1680 :en[dif] 1681 end conditional block. See also help on :if and :else commands. 1682 1683 :execute 1684 1685 :exe[cute] [<expr>...] 1686 evaluate each argument as an expression and join results sepa- 1687 rated by a space to get a single string which is then executed 1688 as a command-line command. See help on :let command for a defi- 1689 nition of <expr>. 1690 1691 :exit 1692 1693 :exi[t][!] 1694 same as :quit. 1695 1696 :file 1697 1698 :f[ile][ &] 1699 display menu of programs set for the file type of the current 1700 file. " &" forces running associated program in background. 1701 1702 :f[ile] arg[ &] 1703 run associated command that begins with the arg skipping opening 1704 menu. " &" forces running associated program in background. 1705 1706 :filetype 1707 1708 :filet[ype] pattern-list [{descr}]def_prog[ &],[{descr}]prog2[ &],... 1709 associate given program list to each of the patterns. Associ- 1710 ated program (command) is used by handlers of l and Enter keys 1711 (and also in the :file menu). If you need to insert comma into 1712 command just double it (",,"). Space followed by an ampersand 1713 as two last characters of a command means running of the command 1714 in the background. Optional description can be given to each 1715 command to ease understanding of what command will do in the 1716 :file menu. Vifm will try the rest of the programs for an asso- 1717 ciation when the default isn't found. When program entry 1718 doesn't contain any of vifm macros, name of current file is ap- 1719 pended as if program entry ended with %c macro on *nix and %"c 1720 on Windows. On Windows path to executables containing spaces 1721 can (and should be for correct work with such paths) be double 1722 quoted. See "Patterns" section below for pattern definition. 1723 See also "Automatic FUSE mounts" section below. Example for zip 1724 archives and several actions: 1725 1726 filetype *.zip,*.jar,*.war,*.ear 1727 \ {Mount with fuse-zip} 1728 \ FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR, 1729 \ {View contents} 1730 \ zip -sf %c | less, 1731 \ {Extract here} 1732 \ tar -xf %c, 1733 1734 Note that on OS X when `open` is used to call an app, vifm is 1735 unable to check whether that app is actually available. So if 1736 automatic skipping of programs that aren't there is desirable, 1737 `open` should be replaced with an actual command. 1738 1739 :filet[ype] filename 1740 list (in menu mode) currently registered patterns that match 1741 specified file name. Same as ":filextype filename". 1742 1743 :filextype 1744 1745 :filex[type] pattern-list [{ description }] def_program,program2,... 1746 same as :filetype, but this command is ignored if not running in 1747 X. In X :filextype is equal to :filetype. See "Patterns" sec- 1748 tion below for pattern definition. See also "Automatic FUSE 1749 mounts" section below. 1750 1751 For example, consider the following settings (the order might 1752 seem strange, but it's for the demonstration purpose): 1753 1754 filetype *.html,*.htm 1755 \ {View in lynx} 1756 \ lynx 1757 filextype *.html,*.htm 1758 \ {Open with dwb} 1759 \ dwb %f %i &, 1760 filetype *.html,*.htm 1761 \ {View in links} 1762 \ links 1763 filextype *.html,*.htm 1764 \ {Open with firefox} 1765 \ firefox %f &, 1766 \ {Open with uzbl} 1767 \ uzbl-browser %f %i &, 1768 1769 If you're using vifm inside a terminal emulator that is running 1770 in graphical environment (when X is used on *nix; always on Win- 1771 dows), vifm attempts to run application in this order: 1772 1773 1. lynx 1774 2. dwb 1775 3. links 1776 4. firefox 1777 5. uzbl 1778 1779 If there is no graphical environment (checked presence of $DIS- 1780 PLAY environment variable on *nix; never happens on Windows), 1781 the list will look like: 1782 1783 1. lynx 1784 2. links 1785 1786 Just as if all :filextype commands were not there. 1787 1788 The purpose of such differentiation is to allow comfortable use 1789 of vifm with same settings in desktop environment/through remote 1790 connection (SSH)/in native console. 1791 1792 Note that on OS X $DISPLAY isn't defined unless you define it, 1793 so :filextype should be used only if you set $DISPLAY in some 1794 way. 1795 1796 :filext[ype] filename 1797 list (in menu mode) currently registered patterns that match 1798 specified file name. Same as ":filetype filename". 1799 1800 :fileviewer 1801 1802 :filev[iewer] pattern-list command1,command2,... 1803 register specified list of commands as viewers for each of the 1804 patterns. Viewer is a command which output is captured and dis- 1805 played in one of the panes of vifm after pressing "e" or running 1806 :view command. When the command doesn't contain any of vifm 1807 macros, name of current file is appended as if command ended 1808 with %c macro. Comma escaping and missing commands processing 1809 rules as for :filetype apply to this command. See "Patterns" 1810 section below for pattern definition. 1811 1812 Example for zip archives: 1813 1814 fileviewer *.zip,*.jar,*.war,*.ear zip -sf %c, echo "No zip to preview:" 1815 1816 :filev[iewer] filename 1817 list (in menu mode) currently registered patterns that match 1818 specified filename. 1819 1820 :filter 1821 1822 :filter[!] {pattern} 1823 filter files matching the pattern out of directory listings. 1824 '!' controls state of filter inversion after updating filter 1825 value (see also 'cpoptions' description). Filter is matched 1826 case sensitively on *nix and case insensitively on Windows. See 1827 "File Filters" and "Patterns" sections. 1828 1829 Example: 1830 1831 " filter all files ending in .o from the filelist. 1832 :filter /.o$/ 1833 1834 1835 :filter[!] {empty-pattern} 1836 same as above, but use last search pattern as pattern value. 1837 1838 Example: 1839 1840 :filter //I 1841 1842 1843 :filter 1844 reset filter (set it to an empty string) and show all files. 1845 1846 :filter! 1847 same as :invert. 1848 1849 :filter? 1850 show information on local, name and auto filters. 1851 1852 :find 1853 1854 :[range]fin[d] pattern 1855 display results of find command in the menu. Searches among se- 1856 lected files if any. Accepts macros. By default the command 1857 relies on the external "find" utility, which can be customized 1858 by altering value of the 'findprg' option. 1859 1860 :[range]fin[d] -opt... 1861 same as :find above, but user defines all find arguments. 1862 Searches among selected files if any. 1863 1864 :[range]fin[d] path -opt... 1865 same as :find above, but user defines all find arguments. Ig- 1866 nores selection and range. 1867 1868 :[range]fin[d] 1869 repeat last :find command. 1870 1871 :finish 1872 1873 :fini[sh] 1874 stop sourcing a script. Can only be used in a vifm script file. 1875 This is a quick way to skip the rest of the file. 1876 1877 :goto 1878 1879 :go[to] 1880 change directory if necessary and put specified path under the 1881 cursor. The path should be existing non-root path. Macros and 1882 environment variables are expanded. 1883 1884 :grep 1885 1886 :[range]gr[ep][!] pattern 1887 will show results of grep command in the menu. Add "!" to re- 1888 quest inversion of search (look for lines that do not match pat- 1889 tern). Searches among selected files if any and no range given. 1890 Ignores binary files by default. By default the command relies 1891 on the external "grep" utility, which can be customized by al- 1892 tering value of the 'grepprg' option. 1893 1894 :[range]gr[ep][!] -opt... 1895 same as :grep above, but user defines all grep arguments, which 1896 are not escaped. Searches among selected files if any. 1897 1898 :[range]gr[ep][!] 1899 repeat last :grep command. "!" of this command inverts "!" in 1900 repeated command. 1901 1902 :help 1903 1904 :h[elp] 1905 show the help file. 1906 1907 :h[elp] argument 1908 is the same as using ':h argument' in vim. Use vifm-<something> 1909 to get help on vifm (tab completion works). This form of the 1910 command doesn't work when 'vimhelp' option is off. 1911 1912 :hideui 1913 1914 :hideui 1915 hide interface to show previous commands' output. 1916 1917 :highlight 1918 1919 :hi[ghlight] 1920 display information about all highlight groups active at the mo- 1921 ment. 1922 1923 :hi[ghlight] clear 1924 reset all highlighting to builtin defaults and removed all file- 1925 name-specific rules. 1926 1927 :hi[ghlight] clear ( {pat1,pat2,...} | /regexp/ ) 1928 remove specified rule. 1929 1930 :hi[ghlight] ( group-name | {pat1,pat2,...} | /regexp/ ) 1931 display information on given highlight group or file name pat- 1932 tern of color scheme used in the active view. 1933 1934 :hi[ghlight] ( group-name | {pat1,pat2,...} | /regexp/[iI] ) 1935 cterm=style | ctermfg=color | ctermbg=color 1936 set style (cterm), foreground (ctermfg) or/and background 1937 (ctermbg) parameters of highlight group or file name pattern for 1938 color scheme used in the active view. 1939 1940 All style values as well as color names are case insensitive. 1941 1942 Available style values (some of them can be combined): 1943 - bold 1944 - underline 1945 - reverse or inverse 1946 - standout 1947 - italic (on unsupported systems becomes reverse) 1948 - none 1949 1950 Available group-name values: 1951 - Win - color of all windows (views, dialogs, menus) and default color 1952 for their content (e.g. regular files in views) 1953 - AuxWin - color of auxiliary areas of windows 1954 - OtherWin - color of inactive pane 1955 - Border - color of vertical parts of the border 1956 - TabLine - tab line color (for 'tabscope' set to "global") 1957 - TabLineSel - color of the tip of selected tab (regardless of 'tab- 1958 scope') 1959 - TopLineSel - top line color of the current pane 1960 - TopLine - top line color of the other pane 1961 - CmdLine - the command line/status bar color 1962 - ErrorMsg - color of error messages in the status bar 1963 - StatusLine - color of the line above the status bar 1964 - JobLine - color of job line that appears above the status line 1965 - WildMenu - color of the wild menu items 1966 - SuggestBox - color of key suggestion box 1967 - CurrLine - line at cursor position in active view 1968 - OtherLine - line at cursor position in inactive view 1969 - Selected - color of selected files 1970 - Directory - color of directories 1971 - Link - color of symbolic links in the views 1972 - BrokenLink - color of broken symbolic links 1973 - Socket - color of sockets 1974 - Device - color of block and character devices 1975 - Executable - color of executable files 1976 - Fifo - color of fifo pipes 1977 - CmpMismatch - color of mismatched files in side-by-side comparison 1978 by path 1979 - User1..User9 - 9 colors which can be used via %* 'statusline' macro 1980 1981 Available colors: 1982 - -1 or default or none - default or transparent 1983 - black and lightblack 1984 - red and lightred 1985 - green and lightgreen 1986 - yellow and lightyellow 1987 - blue and lightblue 1988 - magenta and lightmagenta 1989 - cyan and lightcyan 1990 - white and lightwhite 1991 - 0-255 - corresponding colors from 256-color palette 1992 1993 Light versions of colors are regular colors with bold attribute set. 1994 So order of arguments of :highlight command is important and it's bet- 1995 ter to put "cterm" in front of others to prevent it from overwriting 1996 attributes set by "ctermfg" or "ctermbg" arguments. 1997 1998 For convenience of color scheme authors xterm-like names for 256 color 1999 palette is also supported. The mapping is taken from 2000 http://vim.wikia.com/wiki/Xterm256_color_names_for_console_Vim Dupli- 2001 cated entries were altered by adding an underscore followed by numeri- 2002 cal suffix. 2003 2004 0 Black 86 Aquamarine1 172 Orange3 2005 1 Red 87 DarkSlateGray2 173 LightSalmon3_2 2006 2 Green 88 DarkRed_2 174 LightPink3 2007 3 Yellow 89 DeepPink4_2 175 Pink3 2008 4 Blue 90 DarkMagenta 176 Plum3 2009 5 Magenta 91 DarkMagenta_2 177 Violet 2010 6 Cyan 92 DarkViolet 178 Gold3_2 2011 7 White 93 Purple 179 LightGoldenrod3 2012 8 LightBlack 94 Orange4_2 180 Tan 2013 9 LightRed 95 LightPink4 181 MistyRose3 2014 10 LightGreen 96 Plum4 182 Thistle3 2015 11 LightYellow 97 MediumPurple3 183 Plum2 2016 12 LightBlue 98 MediumPurple3_2 184 Yellow3_2 2017 13 LightMagenta 99 SlateBlue1 185 Khaki3 2018 14 LightCyan 100 Yellow4 186 LightGoldenrod2 2019 15 LightWhite 101 Wheat4 187 LightYellow3 2020 16 Grey0 102 Grey53 188 Grey84 2021 17 NavyBlue 103 LightSlateGrey 189 LightSteelBlue1 2022 18 DarkBlue 104 MediumPurple 190 Yellow2 2023 19 Blue3 105 LightSlateBlue 191 DarkOliveGreen1 2024 20 Blue3_2 106 Yellow4_2 192 DarkOliveG- 2025 reen1_2 2026 21 Blue1 107 DarkOliveGreen3 193 DarkSeaGreen1_2 2027 22 DarkGreen 108 DarkSeaGreen 194 Honeydew2 2028 23 DeepSkyBlue4 109 LightSkyBlue3 195 LightCyan1 2029 24 DeepSkyBlue4_2 110 LightSkyBlue3_2 196 Red1 2030 25 DeepSkyBlue4_3 111 SkyBlue2 197 DeepPink2 2031 26 DodgerBlue3 112 Chartreuse2_2 198 DeepPink1 2032 27 DodgerBlue2 113 DarkOliveGreen3_2 199 DeepPink1_2 2033 28 Green4 114 PaleGreen3_2 200 Magenta2_2 2034 29 SpringGreen4 115 DarkSeaGreen3 201 Magenta1 2035 30 Turquoise4 116 DarkSlateGray3 202 OrangeRed1 2036 31 DeepSkyBlue3 117 SkyBlue1 203 IndianRed1 2037 32 DeepSkyBlue3_2 118 Chartreuse1 204 IndianRed1_2 2038 33 DodgerBlue1 119 LightGreen_2 205 HotPink 2039 34 Green3 120 LightGreen_3 206 HotPink_2 2040 35 SpringGreen3 121 PaleGreen1 207 MediumOrchid1_2 2041 36 DarkCyan 122 Aquamarine1_2 208 DarkOrange 2042 37 LightSeaGreen 123 DarkSlateGray1 209 Salmon1 2043 38 DeepSkyBlue2 124 Red3 210 LightCoral 2044 39 DeepSkyBlue1 125 DeepPink4_3 211 PaleVioletRed1 2045 40 Green3_2 126 MediumVioletRed 212 Orchid2 2046 41 SpringGreen3_2 127 Magenta3 213 Orchid1 2047 42 SpringGreen2 128 DarkViolet_2 214 Orange1 2048 43 Cyan3 129 Purple_2 215 SandyBrown 2049 44 DarkTurquoise 130 DarkOrange3 216 LightSalmon1 2050 45 Turquoise2 131 IndianRed 217 LightPink1 2051 46 Green1 132 HotPink3 218 Pink1 2052 47 SpringGreen2_2 133 MediumOrchid3 219 Plum1 2053 48 SpringGreen1 134 MediumOrchid 220 Gold1 2054 49 MediumSpringGreen 135 MediumPurple2 221 LightGolden- 2055 rod2_2 2056 50 Cyan2 136 DarkGoldenrod 222 LightGolden- 2057 rod2_3 2058 51 Cyan1 137 LightSalmon3 223 NavajoWhite1 2059 52 DarkRed 138 RosyBrown 224 MistyRose1 2060 53 DeepPink4 139 Grey63 225 Thistle1 2061 54 Purple4 140 MediumPurple2_2 226 Yellow1 2062 55 Purple4_2 141 MediumPurple1 227 LightGoldenrod1 2063 56 Purple3 142 Gold3 228 Khaki1 2064 57 BlueViolet 143 DarkKhaki 229 Wheat1 2065 58 Orange4 144 NavajoWhite3 230 Cornsilk1 2066 59 Grey37 145 Grey69 231 Grey100 2067 60 MediumPurple4 146 LightSteelBlue3 232 Grey3 2068 61 SlateBlue3 147 LightSteelBlue 233 Grey7 2069 62 SlateBlue3_2 148 Yellow3 234 Grey11 2070 63 RoyalBlue1 149 DarkOliveGreen3_3 235 Grey15 2071 64 Chartreuse4 150 DarkSeaGreen3_2 236 Grey19 2072 65 DarkSeaGreen4 151 DarkSeaGreen2 237 Grey23 2073 66 PaleTurquoise4 152 LightCyan3 238 Grey27 2074 67 SteelBlue 153 LightSkyBlue1 239 Grey30 2075 68 SteelBlue3 154 GreenYellow 240 Grey35 2076 69 CornflowerBlue 155 DarkOliveGreen2 241 Grey39 2077 70 Chartreuse3 156 PaleGreen1_2 242 Grey42 2078 71 DarkSeaGreen4_2 157 DarkSeaGreen2_2 243 Grey46 2079 72 CadetBlue 158 DarkSeaGreen1 244 Grey50 2080 73 CadetBlue_2 159 PaleTurquoise1 245 Grey54 2081 74 SkyBlue3 160 Red3_2 246 Grey58 2082 75 SteelBlue1 161 DeepPink3 247 Grey62 2083 76 Chartreuse3_2 162 DeepPink3_2 248 Grey66 2084 77 PaleGreen3 163 Magenta3_2 249 Grey70 2085 78 SeaGreen3 164 Magenta3_3 250 Grey74 2086 79 Aquamarine3 165 Magenta2 251 Grey78 2087 80 MediumTurquoise 166 DarkOrange3_2 252 Grey82 2088 81 SteelBlue1_2 167 IndianRed_2 253 Grey85 2089 82 Chartreuse2 168 HotPink3_2 254 Grey89 2090 83 SeaGreen2 169 HotPink2 255 Grey93 2091 84 SeaGreen1 170 Orchid 2092 85 SeaGreen1_2 171 MediumOrchid1 2093 2094 There are two colors (foreground and background) and only one bold at- 2095 tribute. Thus single bold attribute affects both colors when "reverse" 2096 attribute is used in vifm run inside terminal emulator. At the same 2097 time linux native console can handle boldness of foreground and back- 2098 ground colors independently, but for consistency with terminal emula- 2099 tors this is available only implicitly by using light versions of col- 2100 ors. This behaviour might be changed in the future. 2101 2102 Although vifm supports 256 colors in a sense they are supported by UI 2103 drawing library, whether you will be able to use all of them highly de- 2104 pends on your terminal. To set up terminal properly, make sure that 2105 $TERM in the environment you run vifm is set to name of 256-color ter- 2106 minal (on *nixes it can also be set via X resources), e.g. 2107 xterm-256color. One can find list of available terminal names by list- 2108 ing /usr/lib/terminfo/. Number of colors supported by terminal with 2109 current settings can be checked via "tput colors" command. 2110 2111 Here is the hierarchy of highlight groups, which you need to know for 2112 using transparency: 2113 JobLine 2114 SuggestBox 2115 StatusLine 2116 WildMenu 2117 User1..User9 2118 Border 2119 CmdLine 2120 ErrorMsg 2121 Win 2122 OtherWin 2123 AuxWin 2124 File name specific highlights 2125 Directory 2126 Link 2127 BrokenLink 2128 Socket 2129 Device 2130 Fifo 2131 Executable 2132 Selected 2133 CurrLine 2134 OtherLine 2135 TopLine 2136 TopLineSel 2137 TabLineSel (for pane tabs) 2138 TabLine 2139 TabLineSel 2140 2141 "none" means default terminal color for highlight groups at the first 2142 level of the hierarchy and transparency for all others. 2143 2144 Here file name specific highlights mean those configured via globs ({}) 2145 or regular expressions (//). At most one of them is applied per file 2146 entry, namely the first that matches file name, hence order of :high- 2147 light commands might be important in certain cases. 2148 2149 :history 2150 2151 :his[tory] 2152 creates a pop-up menu of directories visited. 2153 2154 :his[tory] x 2155 x can be: 2156 d[ir] or . show directory history. 2157 c[md] or : show command line history. 2158 s[earch] or / show search history and search forward on l key. 2159 f[search] or / show search history and search forward on l key. 2160 b[search] or ? show search history and search backward on l key. 2161 i[nput] or @ show prompt history (e.g. on one file renaming). 2162 fi[lter] or = show filter history (see description of the "=" 2163 normal mode command). 2164 2165 :histnext 2166 2167 :histnext 2168 same as <c-i>. The main use case for this command is to work 2169 around the common pain point of <tab> and <c-i> being the same 2170 ASCII character: one could alter the terminal emulator settings 2171 to emit, for example, the `F1` keycode when Ctrl-I is pressed, 2172 then `:noremap <f1> :histnext<cr>` in vifm, add "t" flag to the 2173 'cpoptions', and thus have both <c-i> and <tab> working as ex- 2174 pected. 2175 2176 :histprev 2177 2178 :histprev 2179 same as <c-o>. 2180 2181 :if 2182 2183 :if {expr1} 2184 starts conditional block. Commands are executed until next 2185 matching :elseif, :else or :endif command if {expr1} evaluates 2186 to non-zero, otherwise they are ignored. See also help on :else 2187 and :endif commands. 2188 2189 Example: 2190 2191 if $TERM == 'screen.linux' 2192 highlight CurrLine ctermfg=lightwhite ctermbg=lightblack 2193 elseif $TERM == 'tmux' 2194 highlight CurrLine cterm=reverse ctermfg=black ctermbg=white 2195 else 2196 highlight CurrLine cterm=bold,reverse ctermfg=black ctermbg=white 2197 endif 2198 2199 :invert 2200 2201 :invert [f] 2202 invert file name filter. 2203 2204 :invert? [f] 2205 show current filter state. 2206 2207 :invert s 2208 invert selection. 2209 2210 :invert o 2211 invert sorting order of the primary sorting key. 2212 2213 :invert? o 2214 show sorting order of the primary sorting key. 2215 2216 :jobs 2217 2218 :jobs shows menu of current backgrounded processes. 2219 2220 :let 2221 2222 :let $ENV_VAR = <expr> 2223 sets environment variable. Warning: setting environment vari- 2224 able to an empty string on Windows removes it. 2225 2226 :let $ENV_VAR .= <expr> 2227 append value to environment variable. 2228 2229 :let &[l:|g:]opt = <expr> 2230 sets option value. 2231 2232 :let &[l:|g:]opt .= <expr> 2233 append value to string option. 2234 2235 :let &[l:|g:]opt += <expr> 2236 increasing option value, adding sub-values. 2237 2238 :let &[l:|g:]opt -= <expr> 2239 decreasing option value, removing sub-values. 2240 2241 Where <expr> could be a single-quoted string, double-quoted string, an 2242 environment variable, function call or a concatanation of any of them 2243 in any order using the '.' operator. Any whitespace is ignored. 2244 2245 :locate 2246 2247 :locate filename 2248 use "locate" command to create a menu of filenames. Selecting a 2249 file from the menu will reload the current file list in vifm to 2250 show the selected file. By default the command relies on the 2251 external "locate" utility (it's assumed that its database is al- 2252 ready built), which can be customized by altering value of the 2253 'locateprg' option. 2254 2255 :locate 2256 repeats last :locate command. 2257 2258 :ls 2259 2260 :ls lists windows of active terminal multiplexer (only when terminal 2261 multiplexer is used). This is achieved by issuing proper com- 2262 mand for active terminal multiplexer, thus the list is not han- 2263 dled by vifm. 2264 2265 :lstrash 2266 2267 :lstrash 2268 displays a menu with list of files in trash. Each element of 2269 the list is original path of a deleted file, thus the list can 2270 contain duplicates. 2271 2272 :mark 2273 2274 :[range]ma[rk][?] x [/full/path] [filename] 2275 Set mark x (a-zA-Z0-9) at /full/path and filename. By default 2276 current directory is being used. If no filename was given and 2277 /full/path is current directory then last file in [range] is 2278 used. Using of macros is allowed. Question mark will stop com- 2279 mand from overwriting existing marks. 2280 2281 :marks 2282 2283 :marks create a pop-up menu of marks. 2284 2285 :marks list ... 2286 display the contents of the marks that are mentioned in list. 2287 2288 :media 2289 2290 :media only for *nix 2291 display media management menu. See also 'mediaprg' option. 2292 2293 :messages 2294 2295 :mes[sages] 2296 shows previously given messages (up to 50). 2297 2298 :mkdir 2299 2300 :[line]mkdir[!] dir ... 2301 create directories at specified paths. The [line] can be used 2302 to pick node in a tree-view. "!" means make parent directories 2303 as needed. Macros are expanded. 2304 2305 :move 2306 2307 :[range]m[ove][!?][ &] 2308 move files to directory of other view. With "?" prompts for 2309 destination file names in an editor. "!" forces overwrite. 2310 2311 :[range]m[ove][!] path[ &] 2312 move files to directory specified with the path (absolute or 2313 relative to directory of other view). "!" forces overwrite. 2314 2315 :[range]m[ove][!] name1 name2...[ &] 2316 move files to directory of other view giving each next file a 2317 corresponding name from the argument list. "!" forces over- 2318 write. 2319 2320 :nohlsearch 2321 2322 :noh[lsearch] 2323 clear selection in current pane. 2324 2325 :normal 2326 2327 :norm[al][!] commands 2328 execute normal mode commands. If "!" is used, user defined map- 2329 pings are ignored. Unfinished last command is aborted as if 2330 <esc> or <c-c> was typed. A ":" should be completed as well. 2331 Commands can't start with a space, so put a count of 1 (one) be- 2332 fore it. 2333 2334 :only 2335 2336 :on[ly] 2337 switch to a one window view. 2338 2339 :popd 2340 2341 :popd remove pane directories from stack. 2342 2343 :pushd 2344 2345 :pushd[!] /curr/dir [/other/dir] 2346 add pane directories to stack and process arguments like :cd 2347 command. 2348 2349 :pushd exchange the top two items of the directory stack. 2350 2351 :put 2352 2353 :[line]pu[t][!] [reg] [ &] 2354 puts files from specified register (" by default) into current 2355 directory. The [line] can be used to pick node in a tree-view. 2356 "!" moves files "!" moves files from their original location in- 2357 stead of copying them. During this operation no confirmation 2358 dialogs will be shown, all checks are performed beforehand. 2359 2360 :pwd 2361 2362 :pw[d] show the present working directory. 2363 2364 :qall 2365 2366 :qa[ll][!] 2367 exit vifm (add ! to skip saving changes and checking for active 2368 backgrounded commands). 2369 2370 :quit 2371 2372 :q[uit][!] 2373 if there is more than one tab, close the current one, otherwise 2374 exit vifm (add ! to skip saving changes and checking for active 2375 backgrounded commands). 2376 2377 :redraw 2378 2379 :redr[aw] 2380 redraw the screen immediately. 2381 2382 :registers 2383 2384 :reg[isters] 2385 display menu with registers content. 2386 2387 :reg[isters] list ... 2388 display the contents of the numbered and named registers that 2389 are mentioned in list (for example "az to display "", "a and "z 2390 content). 2391 2392 :regular 2393 2394 :regular 2395 2396 switch to regular view leaving custom view. 2397 :rename 2398 2399 :[range]rename[!] 2400 rename files using vi to edit names. ! means go recursively 2401 through directories. 2402 2403 :[range]rename name1 name2... 2404 rename each of selected files to a corresponding name. 2405 2406 :restart 2407 2408 :restart 2409 free a lot of things (histories, commands, etc.), reread 2410 vifminfo and vifmrc files and run startup commands passed in the 2411 argument list, thus losing all unsaved changes (e.g. recent his- 2412 tory or keys mapped in current session). 2413 2414 While many things get reset, some basic UI state and current lo- 2415 cations are preserved, including tabs. 2416 2417 :restore 2418 2419 :[range]restore 2420 restore file from trash directory, doesn't work outside one of 2421 trash directories. See "Trash directory" section below. 2422 2423 :rlink 2424 2425 :[range]rlink[!?] 2426 create relative symbolic links to files in directory of other 2427 view. With "?" prompts for destination file names in an editor. 2428 "!" forces overwrite. 2429 2430 :[range]rlink[!] path 2431 create relative symbolic links of files in directory specified 2432 with the path (absolute or relative to directory of other view). 2433 "!" forces overwrite. 2434 2435 :[range]rlink[!] name1 name2... 2436 create relative symbolic links of files in directory of other 2437 view giving each next link a corresponding name from the argu- 2438 ment list. "!" forces overwrite. 2439 2440 :screen 2441 2442 :screen 2443 toggle whether to use the terminal multiplexer or not. 2444 A terminal multiplexer uses pseudo terminals to allow multiple 2445 windows to be used in the console or in a single xterm. Start- 2446 ing vifm from terminal multiplexer with appropriate support 2447 turned on will cause vifm to open a new terminal multiplexer 2448 window for each new file edited or program launched from vifm. 2449 This requires screen version 3.9.9 or newer for the screen -X 2450 argument or tmux (1.8 version or newer is recommended). 2451 2452 :screen! 2453 enable integration with terminal multiplexers. 2454 2455 :screen? 2456 display whether integration with terminal multiplexers is en- 2457 abled. 2458 2459 Note: the command is called screen for historical reasons (when tmux 2460 wasn't yet supported) and might be changed in future releases, or get 2461 an alias. 2462 2463 :select 2464 2465 :[range]select 2466 select files in the given range (current file if no range is 2467 given). 2468 2469 :select {pattern} 2470 select files that match specified pattern. Possible {pattern} 2471 forms are described in "Patterns" section below. Trailing slash 2472 for directories is taken into account, so `:select! */ | invert 2473 s` selects only files. 2474 2475 :select //[iI] 2476 same as item above, but reuses last search pattern. 2477 2478 :select !{external command} 2479 select files from the list supplied by external command. Files 2480 are matched by full paths, relative paths are converted to abso- 2481 lute ones beforehand. 2482 2483 :[range]select! [{pattern}] 2484 same as above, but resets previously selected items before pro- 2485 ceeding. 2486 2487 :set 2488 2489 :se[t] display all options that differ from their default value. 2490 2491 :se[t] all 2492 display all options. 2493 2494 :se[t] opt1=val1 opt2='val2' opt3="val3" ... 2495 sets given options. For local options both values are set. 2496 You can use following syntax: 2497 - for all options - option, option? and option& 2498 - for boolean options - nooption, invoption and option! 2499 - for integer options - option=x, option+=x and option-=x 2500 - for string options - option=x and option+=x 2501 - for string list options - option=x, option+=x, option-=x and 2502 option^=x 2503 - for enumeration options - option=x, option+=x and option-=x 2504 - for set options - option=x, option+=x, option-=x and op- 2505 tion^=x 2506 - for charset options - option=x, option+=x, option-=x and op- 2507 tion^=x 2508 2509 the meaning: 2510 - option - turn option on (for boolean) or print its value (for 2511 all others) 2512 - nooption - turn option off 2513 - invoption - invert option state 2514 - option! - invert option state 2515 - option? - print option value 2516 - option& - reset option to its default value 2517 - option=x or option:x - set option to x 2518 - option+=x - add/append x to option 2519 - option-=x - remove (or subtract) x from option 2520 - option^=x - toggle x presence among values of the option 2521 2522 Option name can be prepended and appended by any number of 2523 whitespace characters. 2524 2525 :setglobal 2526 2527 :setg[lobal] 2528 display all global options that differ from their default value. 2529 2530 :setg[lobal] all 2531 display all global options. 2532 2533 :setg[lobal] opt1=val1 opt2='val2' opt3="val3" ... 2534 same as :set, but changes/prints only global options or global 2535 values of local options. Changes to the latter might be not 2536 visible until directory is changed. 2537 2538 :setlocal 2539 2540 :setl[ocal] 2541 display all local options that differ from their default value. 2542 2543 :setl[ocal] all 2544 display all local options. 2545 2546 :setl[ocal] opt1=val1 opt2='val2' opt3="val3" ... 2547 same as :set, but changes/prints only local values of local op- 2548 tions. 2549 2550 :shell 2551 2552 :sh[ell][!] 2553 start a shell in current directory. "!" suppresses spawning 2554 dedicated window of terminal multiplexer for a shell. To make 2555 vifm adaptive to environment it uses $SHELL if it's defined, 2556 otherwise 'shell' value is used. 2557 2558 2559 :siblnext 2560 2561 :[count]siblnext[!] 2562 2563 change directory to [count]th next sibling directory after cur- 2564 rent path using value of global sort option of current pane. 2565 "!" enables wrapping. 2566 2567 For example, say, you're at /boot and root listing starts like 2568 this: 2569 2570 bin/ 2571 boot/ 2572 dev/ 2573 ... 2574 2575 Issuing :siblnext will navigate to /dev. 2576 2577 2578 :siblprev 2579 2580 :[count]siblprev[!] 2581 same as :siblnext, but in the opposite direction. 2582 2583 :sort 2584 2585 :sor[t] 2586 display dialog with different sorting methods, when one can se- 2587 lect primary sorting key. When 'viewcolumns' options is empty 2588 and 'lsview' is off, changing primary sorting key will also af- 2589 fect view look (in particular the second column of the view will 2590 be changed). 2591 2592 :source 2593 2594 :so[urce] file 2595 read command-line commands from the file. 2596 2597 :split 2598 2599 :sp[lit] 2600 switch to a two window horizontal view. 2601 2602 :sp[lit]! 2603 toggle horizontal window splitting. 2604 2605 :sp[lit] path 2606 splits the window horizontally to show both file directories. 2607 Also changes other pane to path (absolute or relative to current 2608 directory of active pane). 2609 2610 :substitute 2611 2612 :[range]s[ubstitute]/pattern/string/[flags] 2613 for each file in range replace a match of pattern with string. 2614 2615 String can contain \0...\9 to link to capture groups (\0 - all match, 2616 \1 - first group, etc.). 2617 2618 Pattern is stored in search history. 2619 2620 Available flags: 2621 2622 - i - ignore case (the 'ignorecase' and 'smartcase' options are not 2623 used) 2624 2625 - I - don't ignore case (the 'ignorecase' and 'smartcase' options are 2626 not used) 2627 2628 - g - substitute all matches in each file name (each g toggles this) 2629 2630 :[range]s[ubstitute]/pattern 2631 substitute pattern with an empty string. 2632 2633 :[range]s[ubstitute]//string/[flags] 2634 use last pattern from search history. 2635 2636 :[range]s[ubstitute] 2637 repeat previous substitution command. 2638 2639 :sync 2640 2641 :sync [relative path] 2642 change the other pane to the current pane directory or to some 2643 path relative to the current directory. Using macros is al- 2644 lowed. 2645 2646 :sync! change the other pane to the current pane directory and synchro- 2647 nize cursor position. If current pane displays custom list of 2648 files, position before entering it is used (current one might 2649 not make any sense). 2650 2651 2652 :sync! [location | cursorpos | localopts | filters | filelist | tree | 2653 all]... 2654 change enumerated properties of the other pane to match corre- 2655 sponding properties of the current pane. Arguments have the 2656 following meanings: 2657 2658 - location - current directory of the pane; 2659 2660 - cursorpos - cursor position (doesn't make sense without "lo- 2661 cation"); 2662 2663 - localopts - all local options; 2664 2665 - filters - all filters; 2666 2667 - filelist - list of files for custom view (implies "loca- 2668 tion"); 2669 2670 - tree - tree structure for tree view (implies "location"); 2671 2672 - all - all of the above. 2673 2674 :tabclose 2675 2676 :tabc[lose] 2677 close current tab, unless it's the only one open at current 2678 scope. 2679 2680 :tabmove 2681 2682 :tabm[ove] [N] 2683 without the argument or with `$` as the argument, current tab 2684 becomes the last tab. With the argument, current tab is moved 2685 after the tab with the specified number. Argument of `0` moves 2686 current tab to the first position. 2687 2688 :tabname 2689 2690 :tabname [name] 2691 set, update or reset (when no argument is provided) name of the 2692 current tab. 2693 2694 :tabnew 2695 2696 :tabnew [path] 2697 create new tab. Accepts optional path for the new tab. Macros 2698 and environment variables are expanded. 2699 2700 :tabnext 2701 2702 :tabn[ext] 2703 switch to the next tab (wrapping around). 2704 2705 :tabn[ext] {n} 2706 go to the tab number {n}. Tab numeration starts with 1. 2707 2708 :tabprevious 2709 2710 :tabp[revious] 2711 switch to the previous tab (wrapping around). 2712 2713 :tabp[revious] {n} 2714 go to the {n}-th previous tab. Note that :tabnext handles its 2715 argument differently. 2716 2717 :touch 2718 2719 :[line]touch file... 2720 create files at specified paths. Aborts on errors. Doesn't up- 2721 date time of existing files. The [line] can be used to pick 2722 node in a tree-view. Macros are expanded. 2723 2724 :tr 2725 2726 :[range]tr/pattern/string/ 2727 for each file in range transliterate the characters which appear 2728 in pattern to the corresponding character in string. When 2729 string is shorter than pattern, it's padded with its last char- 2730 acter. 2731 2732 :trashes 2733 2734 :trashes 2735 lists all valid trash directories in a menu. Only non-empty and 2736 writable trash directories are shown. This is exactly the list 2737 of directories that are cleared when :empty command is executed. 2738 2739 :trashes? 2740 same as :trashes, but also displays size of each trash direc- 2741 tory. 2742 2743 :tree 2744 2745 :tree turn pane into tree view with current directory as its root. 2746 The tree view is implemented on top of a custom view, but is au- 2747 tomatically kept in sync with file system state and considers 2748 all the filters. Thus the structure corresponds to what one 2749 would see on visiting the directories manually. As a special 2750 case for trees built out of custom view file-system tracking 2751 isn't performed. 2752 2753 To leave tree view go up from its root or use gh at any level of 2754 the tree. Any command that changes directory will also do, in 2755 particular, `:cd ..`. 2756 2757 Tree structure is incompatible with alternative representations, 2758 so values of 'lsview' and 'millerview' options are ignored. 2759 2760 :tree! toggle current view in and out of tree mode. 2761 2762 :undolist 2763 2764 :undol[ist] 2765 display list of latest changes. Use "!" to see actual commands. 2766 2767 :unlet 2768 2769 :unl[et][!] $ENV_VAR1 $ENV_VAR2 ... 2770 remove environment variables. Add ! to omit displaying of warn- 2771 ings about nonexistent variables. 2772 2773 :unselect 2774 2775 :[range]unselect 2776 unselect files in the given range (current file if no range is 2777 given). 2778 2779 :unselect {pattern} 2780 unselect files that match specified pattern. Possible {pattern} 2781 forms are described in "Patterns" section below. Trailing slash 2782 for directories is taken into account, so `:unselect */` unse- 2783 lects directories. 2784 2785 :unselect !{external command} 2786 unselect files from the list supplied by external command. 2787 Files are matched by full paths, relative paths are converted to 2788 absolute ones beforehand. 2789 2790 :unselect //[iI] 2791 same as item above, but reuses last search pattern. 2792 2793 :version 2794 2795 :ve[rsion] 2796 show menu with version information. 2797 2798 :vifm 2799 2800 :vifm same as :version. 2801 2802 :view 2803 2804 :vie[w] 2805 toggle on and off the quick file view. See also 'quickview' op- 2806 tion. 2807 2808 :vie[w]! 2809 turn on quick file view if it's off. 2810 2811 :volumes 2812 2813 :volumes 2814 only for MS-Windows 2815 display menu with volume list. Hitting l (or Enter) key opens 2816 appropriate volume in the current pane. 2817 2818 :vsplit 2819 2820 :vs[plit] 2821 switch to a two window vertical view. 2822 2823 :vs[plit]! 2824 toggle window vertical splitting. 2825 2826 :vs[plit] path 2827 split the window vertically to show both file directories. And 2828 changes other pane to path (absolute or relative to current di- 2829 rectory of active pane). 2830 2831 :wincmd 2832 2833 :[count]winc[md] {arg} 2834 same as running Ctrl-W [count] {arg}. 2835 2836 :windo 2837 2838 :windo [command...] 2839 execute command for each pane (same as :winrun % command). 2840 2841 :winrun 2842 2843 :winrun type [command...] 2844 execute command for pane(s), which is determined by type argu- 2845 ment: 2846 - ^ - top-left pane 2847 - $ - bottom-right pane 2848 - % - all panes 2849 - . - current pane 2850 - , - other pane 2851 2852 :write 2853 2854 :w[rite] 2855 write vifminfo file. 2856 2857 :wq 2858 2859 :wq[!] same as :quit, but ! only disables check of backgrounded com- 2860 mands. :wqall 2861 2862 :wqa[ll][!] 2863 same as :qall, but ! only disables check of backgrounded com- 2864 mands. 2865 2866 :xall 2867 2868 :xa[ll][!] 2869 same as :qall. 2870 2871 :xit 2872 2873 :x[it][!] 2874 same as :quit. 2875 2876 :yank 2877 2878 :[range]y[ank] [reg] [count] 2879 will yank files to the reg register. 2880 2881 :map lhs rhs 2882 2883 :map lhs rhs 2884 map lhs key sequence to rhs in normal and visual modes. 2885 2886 :map! lhs rhs 2887 map lhs key sequence to rhs in command line mode. 2888 2889 2890 :cmap :dmap :mmap :nmap :qmap 2891 :vmap 2892 2893 :cm[ap] lhs rhs 2894 map lhs to rhs in command line mode. 2895 2896 :dm[ap] lhs rhs 2897 map lhs to rhs in dialog modes. 2898 2899 :mm[ap] lhs rhs 2900 map lhs to rhs in menu mode. 2901 2902 :nm[ap] lhs rhs 2903 map lhs to rhs in normal mode. 2904 2905 :qm[ap] lhs rhs 2906 map lhs to rhs in view mode. 2907 2908 :vm[ap] lhs rhs 2909 map lhs to rhs in visual mode. 2910 2911 2912 :*map 2913 2914 :cm[ap] 2915 list all maps in command line mode. 2916 2917 :dm[ap] 2918 list all maps in dialog modes. 2919 2920 :mm[ap] 2921 list all maps in menu mode. 2922 2923 :nm[ap] 2924 list all maps in normal mode. 2925 2926 :qm[ap] 2927 list all maps in view mode. 2928 2929 :vm[ap] 2930 list all maps in visual mode. 2931 2932 :*map beginning 2933 2934 :cm[ap] beginning 2935 list all maps in command line mode that start with the begin- 2936 ning. 2937 2938 :dm[ap] beginning 2939 list all maps in dialog modes that start with the beginning. 2940 2941 :mm[ap] beginning 2942 list all maps in menu mode that start with the beginning. 2943 2944 :nm[ap] beginning 2945 list all maps in normal mode that start with the beginning. 2946 2947 :qm[ap] beginning 2948 list all maps in view mode that start with the beginning. 2949 2950 :vm[ap] beginning 2951 list all maps in visual mode that start with the beginning. 2952 2953 :noremap 2954 2955 :no[remap] lhs rhs 2956 map the key sequence lhs to rhs for normal and visual modes, but 2957 disallow mapping of rhs. 2958 2959 :no[remap]! lhs rhs 2960 map the key sequence lhs to rhs for command line mode, but dis- 2961 allow mapping of rhs. 2962 2963 :cnoremap :dnoremap :mnoremap :nnoremap :qnoremap 2964 :vnoremap 2965 2966 :cno[remap] lhs rhs 2967 map the key sequence lhs to rhs for command line mode, but dis- 2968 allow mapping of rhs. 2969 2970 :dn[oremap] lhs rhs 2971 map the key sequence lhs to rhs for dialog modes, but disallow 2972 mapping of rhs. 2973 2974 :mn[oremap] lhs rhs 2975 map the key sequence lhs to rhs for menu mode, but disallow map- 2976 ping of rhs. 2977 2978 :nn[oremap] lhs rhs 2979 map the key sequence lhs to rhs for normal mode, but disallow 2980 mapping of rhs. 2981 2982 :qn[oremap] lhs rhs 2983 map the key sequence lhs to rhs for view mode, but disallow map- 2984 ping of rhs. 2985 2986 :vn[oremap] lhs rhs 2987 map the key sequence lhs to rhs for visual mode, but disallow 2988 mapping of rhs. 2989 2990 :unmap 2991 2992 :unm[ap] lhs 2993 remove user mapping of lhs from normal and visual modes. 2994 2995 :unm[ap]! lhs 2996 remove user mapping of lhs from command line mode. 2997 2998 :cunmap :dunmap :munmap :nunmap :qunmap 2999 :vunmap 3000 3001 :cu[nmap] lhs 3002 remove user mapping of lhs from command line mode. 3003 3004 :du[nmap] lhs 3005 remove user mapping of lhs from dialog modes. 3006 3007 :mu[nmap] lhs 3008 remove user mapping of lhs from menu mode. 3009 3010 :nun[map] lhs 3011 remove user mapping of lhs from normal mode. 3012 3013 :qun[map] lhs 3014 remove user mapping of lhs from view mode. 3015 3016 :vu[nmap] lhs 3017 remove user mapping of lhs from visual mode. 3018 3019 Ranges 3020 The ranges implemented include: 3021 2,3 - from second to third file in the list (including it) 3022 % - the entire directory. 3023 . - the current position in the filelist. 3024 $ - the end of the filelist. 3025 't - the mark position t. 3026 3027 Examples: 3028 3029 :%delete 3030 3031 would delete all files in the directory. 3032 3033 :2,4delete 3034 3035 would delete the files in the list positions 2 through 4. 3036 3037 :.,$delete 3038 3039 would delete the files from the current position to the end of the 3040 filelist. 3041 3042 :3delete4 3043 3044 would delete the files in the list positions 3, 4, 5, 6. 3045 3046 If a backward range is given :4,2delete - an query message is given and 3047 user can chose what to do next. 3048 3049 The builtin commands that accept a range are :d[elete] and :y[ank]. 3050 3051 Command macros 3052 The command macros may be used in user commands. 3053 3054 %a User arguments. When user arguments contain macros, they are 3055 expanded before preforming substitution of %a. 3056 3057 %c %"c The current file under the cursor. 3058 3059 %C %"C The current file under the cursor in the other directory. 3060 3061 %f %"f All of the selected files. 3062 3063 %F %"F All of the selected files in the other directory list. 3064 3065 %b %"b Same as %f %F. 3066 3067 %d %"d Full path to current directory. 3068 3069 %D %"D Full path to other file list directory. 3070 3071 %rx %"rx 3072 Full paths to files in the register {x}. In case of invalid 3073 symbol in place of {x}, it's processed with the rest of the line 3074 and default register is used. 3075 3076 %m Show command output in a menu. 3077 3078 %M Same as %m, but l (or Enter) key is handled like for :locate and 3079 :find commands. 3080 3081 %u Process command output as list of paths and compose custom view 3082 out of it. 3083 3084 %U Same as %u, but implies less list updates inside vifm, which is 3085 absence of sorting at the moment. 3086 3087 %Iu same as %u, but gives up terminal before running external com- 3088 mand. 3089 3090 %IU same as %U, but gives up terminal before running external com- 3091 mand. 3092 3093 %S Show command output in the status bar. 3094 3095 %q redirect command output to quick view, which is activated if 3096 disabled. 3097 3098 %s Execute command in split window of active terminal multiplexer 3099 (ignored if not running inside one). 3100 3101 %n Forbid using of terminal multiplexer to run the command. 3102 3103 %i Completely ignore command output. 3104 3105 3106 %pc Marks the end of the main command and the beginning of the clear 3107 command for graphical preview, which is invoked on closing pre- 3108 view of a file. 3109 3110 %pd Marks a preview command as one that directly communicates with 3111 the terminal. Beware that this is for things like sixel which 3112 are self-contained sequences that depend only on current cursor 3113 position, using this with anything else is likely to mangle ter- 3114 minal state. 3115 3116 The following dimensions and coordinates are in characters: 3117 3118 %px x coordinate of top-left corner of preview area. 3119 3120 %py y coordinate of top-left corner of preview area. 3121 3122 %pw width of preview area. 3123 3124 %ph height of preview area. 3125 3126 3127 Use %% if you need to put a percent sign in your command. 3128 3129 Note that %m, %M, %s, %S, %i, %u and %U macros are mutually exclusive. 3130 Only the last one of them on the command will take effect. 3131 3132 You can use file name modifiers after %c, %C, %f, %F, %b, %d and %D 3133 macros. Supported modifiers are: 3134 3135 - :p - full path 3136 3137 - :u - UNC name of path (e.g. "\\server" in 3138 "\\server\share"), Windows only. Expands to current computer name 3139 for not UNC paths. 3140 3141 - :~ - relative to the home directory 3142 3143 - :. - relative to current directory 3144 3145 - :h - head of the file name 3146 3147 - :t - tail of the file name 3148 3149 - :r - root of the file name (without last extension) 3150 3151 - :e - extension of the file name (last one) 3152 3153 - :s?pat?sub? - substitute the first occurrence of pat with sub. 3154 You can use any character for '?', but it must not occur in pat or 3155 sub. 3156 3157 - :gs?pat?sub? - like :s, but substitutes all occurrences of pat with 3158 sub. 3159 3160 See ':h filename-modifiers' in Vim's documentation for the detailed de- 3161 scription. 3162 3163 Using %x means expand corresponding macro escaping all characters that 3164 have special meaning. And %"x means using of double quotes and escape 3165 only backslash and double quote characters, which is more useful on 3166 Windows systems. 3167 3168 Position and quantity (if there is any) of %m, %M, %S or %s macros in 3169 the command is unimportant. All their occurrences are removed from the 3170 resulting command. 3171 3172 %c and %f macros are expanded to file names only, when %C and %F are 3173 expanded to full paths. %f and %F follow this in %b too. 3174 3175 :com move mv %f %D 3176 set the :move command to move all of the files selected in the 3177 current directory to the other directory. 3178 3179 The %a macro is replaced with any arguments given to an alias command. 3180 All arguments are considered optional. 3181 :com lsl !!ls -l %a - set the lsl command to execute ls -l with 3182 or without an argument. 3183 3184 :lsl<Enter> 3185 will list the directory contents of the current directory. 3186 3187 :lsl filename<Enter> 3188 will list only the given filename. 3189 3190 The macros can also be used in directly executing commands. ":!mv %f 3191 %D" would move the current directory selected files to the other direc- 3192 tory. 3193 3194 Appending & to the end of a command causes it to be executed in the 3195 background. Typically you want to run two kinds of external commands 3196 in the background: 3197 3198 - GUI applications that doesn't fork thus block vifm (:!sxiv %f &); 3199 3200 - console tools that do not work with terminal (:!mv %f %D &). 3201 3202 You don't want to run terminal commands, which require terminal input 3203 or output something in background because they will mess up vifm's TUI. 3204 Anyway, if you did run such a command, you can use Ctrl-L key to update 3205 vifm's TUI. 3206 3207 Rewriting the example command with macros given above with background- 3208 ing: 3209 3210 %m, %M, %s, %S, %u and %U macros cannot be combined with background 3211 mark (" &") as it doesn't make much sense. 3212 3213 Command backgrounding 3214 Copy and move operation can take a lot of time to proceed. That's why 3215 vifm supports backgrounding of this two operations. To run :copy, 3216 :move or :delete command in the background just add " &" at the end of 3217 a command. 3218 3219 For each background operation a new thread is created. Job cancella- 3220 tion can be requested in the :jobs menu via dd shortcut. 3221 3222 You can see if command is still running in the :jobs menu. Back- 3223 grounded commands have progress instead of process id at the line be- 3224 ginning. 3225 3226 Background operations cannot be undone. 3227 3228 Cancellation 3229 Note that cancellation works somewhat different on Windows platform due 3230 to different mechanism of break signal propagation. One also might 3231 need to use Ctrl-Break shortcut instead of Ctrl-C. 3232 3233 There are two types of operations that can be cancelled: 3234 3235 - file system operations; 3236 3237 - mounting with FUSE (but not unmounting as it can cause loss of 3238 data); 3239 3240 - calls of external applications. 3241 3242 Note that vifm never terminates applications, it sends SIGINT signal 3243 and lets the application quit normally. 3244 3245 When one of set of operations is cancelled (e.g. copying of 5th file of 3246 10 files), further operations are cancelled too. In this case undo 3247 history will contain only actually performed operations. 3248 3249 Cancelled operations are indicated by "(cancelled)" suffix appended to 3250 information message on statusbar. 3251 3252 File system operations 3253 3254 Currently the following commands can be cancelled: :alink, :chmod, 3255 :chown, :clone, :copy, :delete, :mkdir, :move, :restore, :rlink, 3256 :touch. File putting (on p/P key) can be cancelled as well. It's not 3257 hard to see that these are mainly long-running operations. 3258 3259 Cancelling commands when they are repeated for undo/redo operations is 3260 allowed for convenience, but is not recommended as further undo/redo 3261 operations might get blocked by side-effects of partially cancelled 3262 group of operations. 3263 3264 These commands can't be cancelled: :empty, :rename, :substitute, :tr. 3265 3266 Mounting with FUSE 3267 3268 It's not considered to be an error, so only notification on the status 3269 bar is shown. 3270 3271 External application calls 3272 3273 Each of this operations can be cancelled: :apropos, :find, :grep, :lo- 3274 cate. 3275 3276 Patterns 3277 :highlight, :filetype, :filextype, :fileviewer commands and 'classify' 3278 option support globs, regular expressions and mime types to match file 3279 names or their paths. 3280 3281 There are six possible ways to write a single pattern: 3282 3283 1. [!]{comma-separated-name-globs} 3284 3285 2. [!]{{comma-separated-path-globs}} 3286 3287 3. [!]/name-regular-expression/[iI] 3288 3289 4. [!]//path-regular-expression//[iI] 3290 3291 5. [!]<comma-separated-mime-type-globs> 3292 3293 6. undecorated-pattern 3294 3295 First five forms can include leading exclamation mark that negates pat- 3296 tern matching. 3297 3298 The last form is implicitly refers to one of others. :highlight does 3299 not accept undecorated form, while :filetype, :filextype, :fileviewer, 3300 :select, :unselect and 'classify' treat it as list of name globs. 3301 3302 Path patterns receive absolute path of the file that includes its name 3303 component as well. 3304 3305 To combine several patterns (AND them), make sure you're using one of 3306 the first five forms and write patterns one after another, like this: 3307 <text/plain>{*.vifm} 3308 Mind that if you make a mistake the whole string will be treated as the 3309 sixth form. 3310 3311 :filetype, :filextype and :fileviewer commands accept comma-separated 3312 list of patterns instead of a single pattern, thus effectively handling 3313 OR operation on them: 3314 <text/plain>{*.vifm},<application/pdf>{*.pdf} 3315 Forms that accept comma-separated lists of patterns also process them 3316 as lists of alternatives. 3317 3318 Patterns with regular expressions 3319 3320 Regular expression patterns are case insensitive by default, see de- 3321 scription of commands, which might override default behaviour. 3322 3323 Flags of regular expressions mean the following: 3324 - "i" makes filter case insensitive; 3325 - "I" makes filter case sensitive. They can be repeated multiple 3326 times, but the later one takes precedence (e.g. "iiiI" is equivalent 3327 to "I" and "IiIi" is the same as "i"). 3328 3329 There are no implicit `^` or `$`, so make sure to specify them explic- 3330 itly if the pattern should match the whole name or path. 3331 3332 Patterns with globs 3333 3334 "Globs" section below provides short overview of globs and some impor- 3335 tant points that one needs to know about them. 3336 3337 Patterns with mime-types 3338 3339 Mime type matching is essentially globs matching applied to mime type 3340 of a file instead of its name/path. Note: mime types aren't detected 3341 on Windows. 3342 3343 Examples 3344 3345 Associate `evince` to PDF-files only inside `/home/user/downloads/` di- 3346 rectory (excluding its subdirectories): 3347 3348 :filextype //^/home/user/downloads/[^/]*.pdf$// evince %f 3349 3350 3351 Globs 3352 Globs are always case insensitive as it makes sense in general case. 3353 3354 `*`, `?`, `[` and `]` are treated as special symbols in the pattern. 3355 E.g. 3356 3357 :filetype * less %c 3358 3359 matches all files. One can use character classes for escaping, so 3360 3361 :filetype [*] less %c 3362 3363 matches only one file name, the one which contains only asterisk sym- 3364 bol. 3365 3366 `*` means any number of any characters (possibly an empty substring), 3367 with one exception: asterisk at the pattern beginning doesn't match dot 3368 in the first position. E.g. 3369 3370 :fileviewer *.zip,*.jar zip -sf %c 3371 3372 associates using of `zip` program to preview all files with `zip` or 3373 `jar` extensions as listing of their content, but `.file.zip` won't be 3374 matched. 3375 3376 `?` means any character at this position. E.g. 3377 3378 :fileviewer ?.out file %c 3379 3380 calls `file` tool for all files which have exactly one character before 3381 their extension (e.g. a.out, b.out). 3382 3383 Square brackets designate character class, which means that whole char- 3384 acter class matches against any of characters listed in it. For exam- 3385 ple 3386 3387 :fileviewer *.[ch] highlight -O xterm256 -s dante --syntax c %c 3388 3389 makes vifm call `highlight` program to colorize source and header files 3390 in C language for a 256-color terminal. Equal command would be 3391 3392 :fileviewer *.c,*.h highlight -O xterm256 -s dante --syntax c %c 3393 3394 3395 Inside square brackets `^` or `!` can be used for symbol class negotia- 3396 tion and the `-` symbol to set a range. `^` and `!` should appear 3397 right after the opening square bracket. For example 3398 3399 :filetype *.[!d]/ inspect_dir 3400 3401 associates `inspect_dir` as additional handler for all directories that 3402 have one character extension unless it's "d" letter. And 3403 3404 :filetype [0-9].jpg sxiv 3405 3406 associates `sxiv` picture viewer only for JPEG-files that contain sin- 3407 gle digit in their name. 3408 3409 :set options 3410 Local options 3411 These are kind of options that are local to a specific view. So 3412 you can set ascending sorting order for left pane and descending 3413 order for right pane. 3414 3415 In addition to being local to views, each such option also has 3416 two values: 3417 3418 - local to current directory (value associated with current 3419 location); 3420 3421 - global to current directory (value associated with the 3422 pane). 3423 3424 The idea is that current directory can be made a temporary ex- 3425 ception to regular configuration of the view, until directory 3426 change. Use :setlocal for that. :setglobal changes view value 3427 not affecting settings until directory change. :set applies 3428 changes immediately to all values. 3429 3430 3431 'aproposprg' 3432 type: string 3433 default: "apropos %a" 3434 Specifies format for an external command to be invoked by the 3435 :apropos command. The format supports expanding of macros, spe- 3436 cific for a particular *prg option, and %% sequence for insert- 3437 ing percent sign literally. This option should include the %a 3438 macro to specify placement of arguments passed to the :apropos 3439 command. If the macro is not used, it will be implicitly added 3440 after a space to the value of this option. 3441 3442 'autochpos' 3443 type: boolean 3444 default: true 3445 When disabled vifm will set cursor to the first line in the view 3446 after :cd and :pushd commands instead of saved cursor position. 3447 Disabling this will also make vifm clear information about cur- 3448 sor position in the view history on :cd and :pushd commands (and 3449 on startup if 'autochpos' is disabled in the vifmrc). l key in 3450 the ":history ." and ":trashes" menus are treated like :cd com- 3451 mand. This option also affects marks so that navigating to a 3452 mark doesn't restore cursor position. 3453 3454 When this option is enabled, more fine grained control over cur- 3455 sor position is available via 'histcursor' option. 3456 3457 'columns' 'co' 3458 type: integer 3459 default: terminal width on startup 3460 Terminal width in characters. 3461 3462 'caseoptions' 3463 type: charset 3464 default: "" 3465 This option gives additional control over case sensitivity by 3466 allowing overriding default behaviour to either always be case 3467 sensitive or always be case insensitive. Possible values form 3468 pairs of lower and upper case letters that configure specific 3469 aspect of behaviour: 3470 p - always ignore case of paths during completion. 3471 P - always match case of paths during completion. 3472 g - always ignore case of characters for f/F/;/,. 3473 G - always match case of characters for f/F/;/,. 3474 3475 At most one item of each pair takes affect, if both or more are 3476 present, only the last one matters. When none of pair's ele- 3477 ments are present, the behaviour is default (depends on operat- 3478 ing system for path completion and on values of 'ignorecase' and 3479 'smartcase' options for file navigation). 3480 3481 'cdpath' 'cd' 3482 type: string list 3483 default: value of $CDPATH with commas instead of colons 3484 Specifies locations to check on changing directory with relative 3485 path that doesn't start with "./" or "../". When non-empty, 3486 current directory is examined after directories listed in the 3487 option. 3488 3489 This option doesn't affect completion of :cd command. 3490 3491 Example: 3492 3493 set cdpath=~ 3494 3495 This way ":cd bin" will switch to "~/bin" even if directory 3496 named "bin" exists in current directory, while ":cd ./bin" com- 3497 mand will ignore value of 'cdpath'. 3498 3499 'chaselinks' 3500 type: boolean 3501 default: false 3502 When enabled path of view is always resolved to real path (with 3503 all symbolic links expanded). 3504 3505 'classify' 3506 type: string list 3507 default: ":dir:/" 3508 Specifies file name prefixes and suffixes depending on file type 3509 or name. The format is either of: 3510 - [{prefix}]:{filetype}:[{suffix}] 3511 - [{prefix}]::{pattern}::[{suffix}] 3512 Possible {pattern} forms are described in "Patterns" section 3513 above. 3514 3515 Priority rules: 3516 - file name patterns have priority over type patterns 3517 - file name patterns are matched in left-to-right order of 3518 their appearance in this option 3519 3520 Either {prefix} or {suffix} or both can be omitted (which is the 3521 default for all unspecified file types), this means empty {pre- 3522 fix} and/or {suffix}. {prefix} and {suffix} should consist of 3523 at most eight characters. Elements are separated by commas. 3524 Neither prefixes nor suffixes are part of file names, so they 3525 don't affect commands which operate on file names in any way. 3526 Comma (',') character can be inserted by doubling it. List of 3527 file type names can be found in the description of filetype() 3528 function. 3529 3530 'confirm' 'cf' 3531 type: set 3532 default: delete,permdelete 3533 Defines which operations require confirmation: 3534 - delete - moving files to trash (on d or :delete); 3535 - permdelete - permanent deletion of files (on D or :delete! 3536 command or on undo/redo operation). 3537 3538 'cpoptions' 'cpo' 3539 type: charset 3540 default: "fst" 3541 Contains a sequence of single-character flags. Each flag en- 3542 ables behaviour of older versions of vifm. Flags: 3543 - f - when included, running :filter command results in not in- 3544 verted (matching files are filtered out) and :filter! in in- 3545 verted (matching files are left) filter, when omitted, meaning 3546 of the exclamation mark changes to the opposite; 3547 - s - when included, yy, dd and DD normal mode commands act on 3548 selection, otherwise they operate on current file only; 3549 - t - when included, <tab> (thus <c-i>) behave as <space> and 3550 switches active pane, otherwise <tab> and <c-i> go forward in 3551 the view history. It's possible to make both <tab> and <c-i> to 3552 work as expected by setting up the terminal to emit a custom se- 3553 quence when <c-i> is pressed; see :histnext for details. 3554 3555 'cvoptions' 3556 type: set 3557 default: 3558 Specifies whether entering/leaving custom views triggers events 3559 that normally happen on entering/leaving directories: 3560 - autocmds - trigger autocommands on entering/leaving custom 3561 views; 3562 - localopts - reset local options on entering/leaving custom 3563 views; 3564 - localfilter - reset local filter on entering/leaving custom 3565 views. 3566 3567 'deleteprg' 3568 type: string 3569 default: "" 3570 Specifies program to run on files that are permanently removed. 3571 When empty, files are removed as usual, otherwise this command 3572 is invoked on each file by appending its name. If the command 3573 doesn't remove files, they will remain on the file system. 3574 3575 'dirsize' 3576 type: enumeration 3577 default: size 3578 Controls how size of directories is displayed in file views. 3579 The following values are possible: 3580 - size - size of directory (i.e., size used to store list of 3581 files) 3582 - nitems - number of entries in the directory (excluding . and 3583 ..) 3584 3585 Size obtained via ga/gA overwrites this setting so seeing count 3586 of files and occasionally size of directories is possible. 3587 3588 'dotdirs' 3589 type: set 3590 default: nonrootparent 3591 Controls displaying of dot directories. The following values 3592 are possible: 3593 - rootparent - show "../" in root directory of file system 3594 - nonrootparent - show "../" in non-root directories of file 3595 system 3596 3597 Note that empty directories always contain "../" entry regard- 3598 less of value of this option. "../" disappears at the moment at 3599 least one file is created. 3600 3601 'dotfiles' 3602 type: boolean 3603 default: false 3604 Whether dot files are shown in the view. Can be controlled with 3605 z* bindings. 3606 3607 'fastrun' 3608 type: boolean 3609 default: false 3610 With this option turned on you can run partially entered com- 3611 mands with unambiguous beginning using :! (e.g. :!Te instead of 3612 :!Terminal or :!Te<tab>). 3613 3614 'fillchars' 'fcs' 3615 type: string list 3616 default: "" 3617 Sets characters used to fill borders. 3618 3619 item default used for 3620 vborder:c ' ' left, middle and right vertical bor- 3621 ders 3622 3623 If value is omitted, its default value is used. Example: 3624 3625 set fillchars=vborder:. 3626 3627 'findprg' 3628 type: string 3629 default: "find %s %a -print , -type d \( ! -readable -o ! -exe- 3630 cutable \) -prune" 3631 Specifies format for an external command to be invoked by the 3632 :find command. The format supports expansion of macros specific 3633 for this particular option and %% sequence for inserting percent 3634 sign literally. The macros are: 3635 3636 macro value/meaning 3637 %s literal arguments of :find or 3638 list of paths to search in 3639 3640 %A empty or 3641 literal arguments of :find 3642 %a empty or 3643 literal arguments of :find or 3644 predicate followed by escaped arguments of :find 3645 %p empty or 3646 literal arguments of :find or 3647 escaped arguments (parameters) of :find 3648 3649 %u redirect output to custom view instead of showing a 3650 menu 3651 %U redirect output to unsorted custom view instead of 3652 showing a menu 3653 3654 Predicate in %a is "-name" on *nix and "-iname" on Windows. 3655 3656 If both %u and %U are specified, %U is chosen. 3657 3658 Some macros can be added implicitly: 3659 - if %s isn't present, it's appended 3660 - if neither of %a, %A and %p is present, %a is appended 3661 - if neither of %s, %a, %A and %p is present, %s and %a are ap- 3662 pended in this order 3663 3664 The macros slightly change their meaning depending on format of 3665 :find's arguments: 3666 - if the first argument points to an existing directory, %s is 3667 assigned all arguments while %a, %A and %p are left empty 3668 - otherwise: 3669 - %s is assigned a dot (".") meaning current directory or 3670 list of selected file names, if any 3671 - %a, %A and %p are assigned literal arguments when first 3672 argument starts with a dash ("-"), otherwise %a gets an escaped 3673 version of the arguments with a predicate and %p contains es- 3674 caped version of the arguments 3675 3676 Starting with Windows Server 2003 a `where` command is avail- 3677 able. One can configure vifm to use it in the following way: 3678 3679 set findprg="where /R %s %A" 3680 3681 As the syntax of this command is rather limited, one can't use 3682 :find command with selection of more than one item because the 3683 command ignores all directory paths except for the last one. 3684 3685 When using find port on Windows, another option is to setup 3686 'findprg' like this: 3687 3688 set findprg="find %s %a" 3689 3690 3691 'followlinks' 3692 type: boolean 3693 default: true 3694 Follow links on l or Enter. That is navigate to destination 3695 file instead of treating the link as if it were target file. 3696 Doesn't affects links to directories, which are always entered 3697 (use gf key for directories). 3698 3699 'fusehome' 3700 type: string 3701 default: "($XDG_DATA_HOME/.local/share | $VIFM)/fuse/" 3702 Directory to be used as a root dir for FUSE mounts. Value of 3703 the option can contain environment variables (in form "$en- 3704 vname"), which will be expanded (prepend it with a slash to pre- 3705 vent expansion). The value should expand to an absolute path. 3706 3707 If you change this option, vifm won't remount anything. It af- 3708 fects future mounts only. See "Automatic FUSE mounts" section 3709 below for more information. 3710 3711 'gdefault' 'gd' 3712 type: boolean 3713 default: false 3714 When on, 'g' flag is on for :substitute by default. 3715 3716 'grepprg' 3717 type: string 3718 default: "grep -n -H -I -r %i %a %s" 3719 Specifies format for an external command to be invoked by the 3720 :grep command. The format supports expanding of macros, spe- 3721 cific for a particular *prg option, and %% sequence for insert- 3722 ing percent sign literally. This option should include the %i 3723 macro to specify placement of "-v" string when inversion of re- 3724 sults is requested, %a or %A macro to specify placement of argu- 3725 ments passed to the :grep command and the %s macro to specify 3726 placement of list of files to search in. If some of the macros 3727 are not used, they will be implicitly added after a space to the 3728 value of the 'grepprg' option in the following order: %i, %a, 3729 %s. Note that when neither %a nor %A are specified, it's %a 3730 which is added implicitly. 3731 3732 Optional %u or %U macro could be used (if both specified %U is 3733 chosen) to force redirection to custom or unsorted custom view 3734 respectively. 3735 3736 See 'findprg' option for description of difference between %a 3737 and %A. 3738 3739 Example of setup to use ack (http://beyondgrep.com/) instead of 3740 grep: 3741 3742 set grepprg='ack -H -r %i %a %s' 3743 3744 or The Silver Searcher (https://github.com/ggreer/the_sil- 3745 ver_searcher): 3746 3747 set grepprg='ag --line-numbers %i %a %s' 3748 3749 3750 3751 'histcursor' 3752 type: set 3753 default: startup,dirmark,direnter 3754 Defines situations when cursor should be moved according to di- 3755 rectory history: 3756 - startup - on loading file lists during startup 3757 - dirmark - after navigating to a mark that doesn't specify 3758 file 3759 - direnter - on opening directory from a file list 3760 3761 This option has no effect when 'autochpos' is disabled. 3762 3763 Note that the list is not exhaustive and there are other situa- 3764 tions when cursor is positioned automatically. 3765 3766 'history' 'hi' 3767 type: integer 3768 default: 15 3769 Maximum number of stored items in all histories. 3770 3771 'hlsearch' 'hls' 3772 type: boolean 3773 default: true 3774 Highlight all matches of search pattern. 3775 3776 'iec' type: boolean 3777 default: false 3778 Use KiB, MiB, ... suffixes instead of K, M, ... when printing 3779 size in human-friendly format. 3780 3781 'ignorecase' 'ic' 3782 type: boolean 3783 default: false 3784 Ignore case in search patterns (:substitute, / and ? commands) 3785 and characters after f and F commands. It doesn't affect file 3786 filtering. 3787 3788 'incsearch' 'is' 3789 type: boolean 3790 default: false 3791 When this option is set, search and view update for local filter 3792 is be performed starting from initial cursor position each time 3793 search pattern is changed. 3794 3795 'iooptions' 3796 type: set 3797 default: 3798 Controls details of file operations. The following values are 3799 available: 3800 - fastfilecloning - perform fast file cloning (copy-on-write), 3801 when available 3802 (available on Linux and btrfs file system). 3803 3804 'laststatus' 'ls' 3805 type: boolean 3806 default: true 3807 Controls if status bar is visible. 3808 3809 'lines' 3810 type: integer 3811 default: terminal height on startup 3812 Terminal height in lines. 3813 3814 'locateprg' 3815 type: string 3816 default: "locate %a" 3817 Specifies format for an external command to be invoked by the 3818 :locate command. The format supports expanding of macros, spe- 3819 cific for a particular *prg option, and %% sequence for insert- 3820 ing percent sign literally. This option should include the %a 3821 macro to specify placement of arguments passed to the :locate 3822 command. If the macro is not used, it will be implicitly added 3823 after a space to the value of this option. 3824 3825 Optional %u or %U macro could be used (if both specified %U is 3826 chosen) to force redirection to custom or unsorted custom view 3827 respectively. 3828 3829 'mediaprg' 3830 type: string 3831 default: path to bundled script that supports udevil, udisks and 3832 udisks2 3833 (using udisks2 requires python with dbus module in- 3834 stalled) 3835 OS X: path points to a python script that uses diskutil 3836 {only for *nix} 3837 Specifies command to be used to manage media devices. Used by 3838 :media command. 3839 3840 The command can be passed the following parameters: 3841 - list -- list media 3842 - mount {device} -- mount a device 3843 - unmount {path} -- unmount given mount point 3844 3845 The output of `list` subcommand is parsed in search of lines 3846 that start with one of the following prefixes: 3847 - device= - specifies device path (e.g., "/dev/sde") 3848 - label= - specifies optional device label (e.g., "Memory 3849 card") 3850 - info= - specifies arbitrary text to display next to 3851 device (by 3852 default "[label]" is used, if label is pro- 3853 vided) 3854 - mount-point= - specifies a mount point (can be absent or ap- 3855 pear more than once) 3856 3857 All other lines are ignored. Each `device=` starts a new sec- 3858 tion describing a device which should include two other possible 3859 prefixes. 3860 3861 `list` subcommand is assumed to always succeed, while exit code 3862 of `mount` and `unmount` is taken into account to determine 3863 whether operation was performed successfully. 3864 3865 'lsoptions' 3866 type: string list 3867 default: "" 3868 scope: local 3869 3870 Configures ls-like view. 3871 3872 item used for 3873 transposed filling view grid by columns rather than by 3874 lines 3875 3876 3877 'lsview' 3878 type: boolean 3879 default: false 3880 scope: local 3881 When this option is set, directory view will be displayed in 3882 multiple columns with file names similar to output of `ls -x` 3883 command. See "ls-like view" section below for format descrip- 3884 tion. This option has no effect if 'millerview' is on. 3885 3886 'milleroptions' 3887 type: string list 3888 default: "lsize:1,csize:1,rsize:1,rpreview:dirs" 3889 scope: local 3890 3891 Configures miller view. 3892 3893 item default used for 3894 lsize:num 0 left column 3895 csize:num 1 center column (can't be disabled) 3896 rsize:num 0 right column 3897 rpreview:str dirs right column 3898 3899 *size specifies ratios of columns. Each ratio is in the range 3900 from 0 to 100 and values are adjusted to fit the limits. Zero 3901 disables a column, but central (main) column can't be disabled. 3902 3903 rpreview specifies what file-system objects should be previewed 3904 in the right column and can take two values: dirs (only directo- 3905 ries) or all. Both options don't include parent directory 3906 (".."). 3907 3908 Example of two-column mode which is useful in combination with 3909 :view command: 3910 3911 set milleroptions=lsize:1,csize:2 3912 3913 3914 'millerview' 3915 type: boolean 3916 default: false 3917 scope: local 3918 When this option is set, directory view will be displayed in 3919 multiple cascading columns. Ignores 'lsview'. 3920 3921 'mintimeoutlen' 3922 type: integer 3923 default: 150 3924 The fracture of 'timeoutlen' in milliseconds that is waited be- 3925 tween subsequent input polls, which affects various asynchronous 3926 operations (detecting changes made by external applications, 3927 monitoring background jobs, redrawing UI). There are no strict 3928 guarantees, however the higher this value is, the less is CPU 3929 load in idle mode. 3930 3931 'number' 'nu' 3932 type: boolean 3933 default: false 3934 scope: local 3935 Print line number in front of each file name when 'lsview' op- 3936 tion is turned off. Use 'numberwidth' to control width of line 3937 number. Also see 'relativenumber'. 3938 3939 'numberwidth' 'nuw' 3940 type: integer 3941 default: 4 3942 scope: local 3943 Minimal number of characters for line number field. 3944 3945 'previewprg' 3946 type: string 3947 default: "" 3948 scope: local 3949 3950 External command to be used instead of preview programs config- 3951 ured via :fileviewer command. 3952 3953 Example: 3954 3955 " always show git log in preview of files inside some repository 3956 au DirEnter '~/git-repo/**/*' setl previewprg='git log --color -- %c 2>&1' 3957 3958 'quickview' 3959 type: boolean 3960 default: false 3961 Whether quick view (:view) is currently active or not. 3962 3963 'relativenumber' 'rnu' 3964 type: boolean 3965 default: false 3966 scope: local 3967 Print relative line number in front of each file name when 3968 'lsview' option is turned off. Use 'numberwidth' to control 3969 width of line number. Various combinations of 'number' and 3970 'relativenumber' lead to such results: 3971 3972 nonumber number 3973 3974 norelativenumber | first | 1 first 3975 | second | 2 second 3976 | third | 3 third 3977 3978 relativenumber | 1 first | 1 first 3979 | 0 second |2 second 3980 | 1 third | 1 third 3981 3982 3983 'rulerformat' 'ruf' 3984 type: string 3985 default: "%l/%S " 3986 Determines the content of the ruler. Its minimal width is 13 3987 characters and it's right aligned. Following macros are sup- 3988 ported: 3989 %= - separation point between left and right aligned halves of 3990 the line 3991 %l - file number 3992 %L - total number of files in view (including filtered out 3993 ones) 3994 %x - number of files excluded by filters 3995 %0- - old name for %x macro 3996 %S - number of displayed files 3997 %= - separation point between left and right align items 3998 %% - percent sign 3999 %[ - designates beginning of an optional block 4000 %] - designates end of an optional block 4001 4002 Percent sign can be followed by optional minimum field width. 4003 Add '-' before minimum field width if you want field to be right 4004 aligned. 4005 4006 Example: 4007 4008 set rulerformat='%2l-%S%[ +%x%]' 4009 4010 'runexec' 4011 type: boolean 4012 default: false 4013 Run executable file on Enter or l. 4014 4015 'scrollbind' 'scb' 4016 type: boolean 4017 default: false 4018 When this option is set, vifm will try to keep difference of 4019 scrolling positions of two windows constant. 4020 4021 'scrolloff' 'so' 4022 type: integer 4023 default: 0 4024 Minimal number of screen lines to keep above and below the cur- 4025 sor. If you want cursor line to always be in the middle of the 4026 view (except at the beginning or end of the file list), set this 4027 option to some large value (e.g. 999). 4028 4029 'shell' 'sh' 4030 type: string 4031 default: $SHELL or "/bin/sh" or "cmd" (on MS-Windows) 4032 Full path to the shell to use to run external commands. On *nix 4033 a shell argument can be supplied. 4034 4035 'shellcmdflag' 'shcf' 4036 type: string 4037 default: "-c" or "/C" (for cmd.exe on MS-Windows) 4038 Command-line option used to pass a command to 'shell'. It's 4039 used in contexts where command comes from the user. 4040 4041 'shortmess' 'shm' 4042 type: charset 4043 default: "p" 4044 Contains a sequence of single-character flags. Each flag en- 4045 ables shortening of some message displayed by vifm in the TUI. 4046 Flags: 4047 - L - display only last directory in tab line instead of full 4048 path. 4049 - M - shorten titles in windows of terminal multiplexers cre- 4050 ated by vifm down to file name instead of using full path. 4051 - T - truncate status-bar messages in the middle if they are 4052 too long to fit on the command line. "..." will appear in the 4053 middle. 4054 - p - use tilde shortening in view titles. 4055 4056 4057 'showtabline' 'stal' 4058 type: enumeration 4059 default: multiple 4060 Specifies when tab line should be displayed. Possible values: 4061 - never - never display tab line 4062 - multiple - show tab line only when there are at least two 4063 tabs 4064 - always - display tab line always 4065 4066 Alternatively 0, 1 and 2 Vim-like values are also accepted and 4067 correspond to "never", "multiple" and "always" respectively. 4068 4069 4070 'sizefmt' 4071 type: string list 4072 default: "units:iec" 4073 Configures the way size is formatted in human-friendly way. 4074 4075 item value meaning 4076 units: iec Use 1024 byte units (K or KiB, 4077 etc.). 4078 See 'iec' option. 4079 si Use 1000 byte units (KB, etc.). 4080 precision: i > 0 How many fraction digits to con- 4081 sider. 4082 {not set} Precision of 1 for integer part 4083 < 10, 4084 0 otherwise (provides old behav- 4085 iour). 4086 space {present} Insert space before unit sym- 4087 bols. 4088 This is the default. 4089 nospace {present} Do not insert space before unit 4090 symbols. 4091 4092 Numbers are rounded from zero. Trailing zeros are dropped. 4093 4094 Example: 4095 4096 set sizefmt=units:iec,precision:2,nospace 4097 4098 4099 'slowfs' 4100 type: string list 4101 default: "" 4102 only for *nix 4103 A list of mounter fs name beginnings (first column in /etc/mtab 4104 or /proc/mounts) or paths prefixes for fs/directories that work 4105 too slow for you. This option can be used to stop vifm from 4106 making some requests to particular kinds of file systems that 4107 can slow down file browsing. Currently this means don't check 4108 if directory has changed, skip check if target of symbolic links 4109 exists, assume that link target located on slow fs to be a di- 4110 rectory (allows entering directories and navigating to files via 4111 gf). If you set the option to "*", it means all the systems are 4112 considered slow (useful for cygwin, where all the checks might 4113 render vifm very slow if there are network mounts). 4114 4115 Example for autofs root /mnt/autofs: 4116 4117 set slowfs+=/mnt/autofs 4118 4119 'smartcase' 'scs' 4120 type: boolean 4121 default: false 4122 Overrides the ignorecase option if the search pattern contains 4123 at least one upper case character. Only used when ignorecase 4124 option is enabled. It doesn't affect file filtering. 4125 4126 'sort' type: string list 4127 default: +name on *nix and +iname on Windows 4128 scope: local 4129 Sets list of sorting keys (first item is primary key, second is 4130 secondary key, etc.): 4131 [+-]ext - extension of files and directories 4132 [+-]fileext - extension of files only 4133 [+-]name - name (including extension) 4134 [+-]iname - name (including extension, ignores case) 4135 [+-]type - file type 4136 (dir/reg/exe/link/char/block/sock/fifo) 4137 [+-]dir - directory grouping (directory < file) 4138 [+-]gid - group id (*nix only) 4139 [+-]gname - group name (*nix only) 4140 [+-]mode - file type derived from its mode (*nix only) 4141 [+-]perms - permissions string (*nix only) 4142 [+-]uid - owner id (*nix only) 4143 [+-]uname - owner name (*nix only) 4144 [+-]nlinks - number of hard links (*nix only) 4145 [+-]inode - inode number (*nix only) 4146 [+-]size - size 4147 [+-]nitems - number of items in a directory (zero for files) 4148 [+-]groups - groups extracted via regexps from 'sortgroups' 4149 [+-]target - symbolic link target (empty for other file 4150 types) 4151 [+-]atime - time accessed (e.g. read, executed) 4152 [+-]ctime - time changed (changes in metadata, e.g. mode) 4153 [+-]mtime - time modified (when file contents is changed) 4154 4155 Note: look for st_atime, st_ctime and st_mtime in "man 2 stat" 4156 for more information on time keys. 4157 4158 '+' means ascending sort for this key, and '-' means descending 4159 sort. 4160 4161 "dir" key is somewhat similar in this regard but it's added im- 4162 plicitly: when "dir" is not specified, sorting behaves as if it 4163 was the first key in the list. That's why if one wants sorting 4164 algorithm to mix directories and files, "dir" should be appended 4165 to sorting option, for example like this: 4166 4167 set sort+=dir 4168 4169 or 4170 4171 set sort=-size,dir 4172 4173 Value of the option is checked to include dir key and default 4174 sorting key (name on *nix, iname on Windows). Here is what hap- 4175 pens if one of them is missing: 4176 4177 - type key is added at the beginning; 4178 4179 - default key is added at the end; 4180 4181 all other keys are left untouched (at most they are moved). 4182 4183 This option also changes view columns according to primary sort- 4184 ing key set, unless 'viewcolumns' option is not empty. 4185 4186 'sortnumbers' 4187 type: boolean 4188 default: false 4189 scope: local 4190 Natural sort of (version) numbers within text. 4191 4192 'sortgroups' 4193 type: string 4194 default: "" 4195 scope: local 4196 Sets comma-separated list of regular expressions to use for 4197 group sorting, double comma is literal comma. Each expression 4198 should contain at least one group or its value will be consid- 4199 ered to be always empty. Only first match of each regular ex- 4200 pression is considered. Groups are considered from right to 4201 first similar to 'sort', first group divides list of files into 4202 sub-groups, each of which is sorted by the second group and so 4203 on. 4204 4205 Example: 4206 set sortgroups=-(done|todo).* 4207 this would put files with "-done" in their names above all files 4208 with "-todo". 4209 4210 'sortorder' 4211 type: enumeration 4212 default: ascending 4213 Sets sort order for primary key: ascending, descending. 4214 4215 'statusline' 'stl' 4216 type: string 4217 default: "" 4218 Determines the content of the status line (the line right above 4219 command-line). Empty string means use same format like in pre- 4220 vious versions. Following macros are supported: 4221 4222 - %t - file name (considering value of the 'classify' option) 4223 4224 - %T - symbolic link target (empty for other filetypes) 4225 4226 - %f - file name relative to current directory (considers 'clas- 4227 sify') 4228 4229 - %A - file attributes (permissions on *nix or properties on 4230 Windows) %u - user name or uid (if it cannot be resolved) 4231 4232 - %g - group name or gid (if it cannot be resolved) 4233 4234 - %s - file size in human readable format 4235 4236 - %E - size of selected files in human readable format, same as 4237 %s when no files are selected, except that it will never show 4238 size of ../ in visual mode, since it cannot be selected 4239 4240 - %d - file modification date (uses 'timefmt' option) 4241 4242 - %D - path of the other pane for single-pane layout 4243 4244 - %a - amount of free space available at current partition 4245 4246 - %z - short tips/tricks/hints that chosen randomly after one 4247 minute period 4248 4249 - %{<expr>} - evaluate arbitrary vifm expression '<expr>', e.g. 4250 '&sort' 4251 4252 - %* - resets or applies one of User1..User9 highlight groups; 4253 reset happens when width field is 0 or not specified, one of 4254 groups gets picked when width field is in the range from 1 to 4255 9 4256 4257 - all 'rulerformat' macros 4258 4259 Percent sign can be followed by optional minimum field width. 4260 Add '-' before minimum field width if you want field to be right 4261 aligned. 4262 4263 On Windows file properties include the following flags (upper 4264 case means flag is on): 4265 A - archive 4266 H - hidden 4267 I - content isn't indexed 4268 R - readonly 4269 S - system 4270 C - compressed 4271 D - directory 4272 E - encrypted 4273 P - reparse point (e.g. symbolic link) 4274 Z - sparse file 4275 4276 Example without colors: 4277 4278 set statusline=" %t%= %A %10u:%-7g %15s %20d %{&sort} " 4279 4280 Example with colors: 4281 4282 highlight User1 ctermbg=yellow 4283 highlight User2 ctermbg=blue ctermfg=white cterm=bold 4284 set statusline="%1* %-26t %2* %= %1* %A %2* %7u:%-7g %1* %-5s %2* %d " 4285 4286 4287 'suggestoptions' 4288 type: string list 4289 default: 4290 Controls when, for what and how suggestions are displayed. The 4291 following values are available: 4292 - normal - in normal mode; 4293 - visual - in visual mode; 4294 - view - in view mode; 4295 - otherpane - use other pane to display suggestions, when 4296 available; 4297 - delay[:num] - display suggestions after a small delay (to 4298 do not annoy if you just want to type a fast shortcut consisting 4299 of multiple keys), num specifies the delay in ms (500 by de- 4300 fault), 'timeoutlen' at most; 4301 - keys - include shortcuts (commands and selectors); 4302 - foldsubkeys - fold multiple keys with common prefix; 4303 - marks - include marks; 4304 - registers[:num] - include registers, at most num files (5 by 4305 default). 4306 4307 'syncregs' 4308 type: string 4309 default: 4310 Specifies identifier of group of instances that share registers 4311 between each other. When several instances of vifm have this 4312 option set to identical value, they automatically synchronize 4313 contents of their registers on operations which use them. 4314 4315 'syscalls' 4316 type: boolean 4317 default: false 4318 When disabled, vifm will rely on external applications to per- 4319 form file-system operations, otherwise system calls are used in- 4320 stead (much faster and supports progress tracking). The option 4321 should eventually be removed. Mostly *nix-like systems are af- 4322 fected. 4323 4324 'tabscope' 4325 type: enumeration 4326 default: global 4327 Picks style of tabs, which defines what a single tab contains. 4328 Possible values: 4329 - global - tab describes complete UI of two views and how they 4330 are arranged 4331 - pane - tab is located "inside" a pane and manages it and 4332 quick view 4333 4334 'tabstop' 'ts' 4335 type: integer 4336 default: value from curses library 4337 Number of spaces that a Tab in the file counts for. 4338 4339 'timefmt' 4340 type: string 4341 default: "%m/%d %H:%M" 4342 Format of time in file list. See "man 1 date" or "man 3 strf- 4343 time" for details. 4344 4345 'timeoutlen' 'tm' 4346 type: integer 4347 default: 1000 4348 The time in milliseconds that is waited for a mapped key in case 4349 of already typed key sequence is ambiguous. 4350 4351 'title' 4352 type: boolean 4353 default: true when title can be restored, false otherwise 4354 When enabled, title of the terminal or terminal multiplexer's 4355 window is updated according to current location. Because not 4356 all terminals support setting title, this works only if `$TERM` 4357 value matches one of the following conditions: 4358 - equals "xterm" or starts with "xterm-" 4359 - equals "rxvt" or starts with "rxvt-" 4360 - equals "screen" or starts with "screen-" 4361 - equals "aterm" 4362 - equals "Eterm" 4363 4364 'trash' 4365 type: boolean 4366 default: true 4367 Use trash directory. See "Trash directory" section below. 4368 4369 'trashdir' 4370 type: string 4371 default: on *nix: 4372 "%r/.vifm-Trash-%u,$VIFM/Trash,%r/.vifm-Trash" 4373 or if $VIFM/Trash doesn't exist 4374 "%r/.vifm-Trash-%u,$XDG_DATA_HOME/vifm/Trash,%r/.vifm-Trash" 4375 on Windows: 4376 "%r/.vifm-Trash,$XDG_DATA_HOME/vifm/Trash" 4377 List of trash directory path specifications, separated with com- 4378 mas. Each list item either defines an absolute path to trash 4379 directory or a path relative to a mount point root when list el- 4380 ement starts with "%r/". Value of the option can contain envi- 4381 ronment variables (of form "$envname"), which will be expanded 4382 (prepend $ with a slash to prevent expansion). Environment 4383 variables are expanded when the option is set. 4384 4385 On *nix, if element ends with "%u", the mark is replaced with 4386 real user ID and permissions are set so that only that only 4387 owner is able to use it. 4388 Note that even this setup is not completely secure when combined 4389 with "%r/" and it's overall safer to keep files in home direc- 4390 tory, but that implies cost of copying files between partitions. 4391 4392 When new file gets cut (deleted) vifm traverses each element of 4393 the option in the order of their appearance and uses first trash 4394 directory that it was able to create or that is already 4395 writable. 4396 4397 Default value tries to use trash directory per mount point and 4398 falls back to ~/.vifm/Trash on failure. 4399 4400 Will attempt to create the directory if it does not exist. See 4401 "Trash directory" section below. 4402 4403 'tuioptions' 'to' 4404 type: charset 4405 default: "ps" 4406 Each flag configures some aspect of TUI appearance. The flags 4407 are: 4408 p - when included: 4409 * file list inside a pane gets additional single character 4410 padding on left and right sides; 4411 * quick view and view mode get single character padding. 4412 s - when included, left and right borders (side borders, hence 4413 "s" character) are visible. 4414 u - use Unicode characters in the TUI (Unicode ellipsis instead 4415 of "..."). 4416 4417 'undolevels' 'ul' 4418 type: integer 4419 default: 100 4420 Maximum number of changes that can be undone. Note that here 4421 single file operation is used as a unit, not operation, i.e. 4422 deletion of 101 files will exceed default limit. 4423 4424 'vicmd' 4425 type: string 4426 default: "vim" 4427 Command used to edit files in various contexts. Ampersand sign 4428 at the end (regardless whether it's preceded by space or not) 4429 means backgrounding of command. 4430 4431 Background flag is ignored in certain context where vifm waits 4432 for the editor to finish. Such contexts include any command 4433 that spawns editor to change list of file names or a command, 4434 with :rename being one example. `-f` is also appended to pre- 4435 vent forking in such cases, so the command needs to handle the 4436 flag. 4437 4438 Additionally `+{num}` and `+'call cursor()'` arguments are used 4439 to position cursor when location is known. 4440 4441 'viewcolumns' 4442 type: string 4443 default: "" 4444 scope: local 4445 Format string containing list of columns in the view. When this 4446 option is empty, view columns to show are chosen automatically 4447 using sorting keys (see 'sort') as a base. Value of this option 4448 is ignored if 'lsview' is set. See "Column view" section below 4449 for format description. 4450 4451 An example of setting the options for both panes (note :windo 4452 command): 4453 4454 windo set viewcolumns=-{name}..,6{size},11{perms} 4455 4456 'vixcmd' 4457 type: string 4458 default: value of 'vicmd' 4459 Same as 'vicmd', but takes precedence over it when running in- 4460 side a graphical environment. 4461 4462 'vifminfo' 4463 type: set 4464 default: bookmarks,bmarks 4465 Controls what will be saved in the $VIFM/vifminfo file. 4466 4467 bmarks - named bookmarks 4468 bookmarks - marks, except special ones like '< and '> 4469 tui - state of the user interface (sorting, number of 4470 windows, quick 4471 view state, active view) 4472 dhistory - directory history 4473 state - file name and dot filters and terminal multiplex- 4474 ers integration 4475 state 4476 cs - primary color scheme 4477 savedirs - save last visited directory (requires dhistory) 4478 chistory - command line history 4479 shistory - search history (/ and ? commands) 4480 phistory - prompt history 4481 fhistory - history of local filter (see description of the 4482 "=" normal mode 4483 command) 4484 dirstack - directory stack overwrites previous stack, unless 4485 stack of 4486 current session is empty 4487 registers - registers content 4488 options - all options that can be set with the :set command 4489 (obsolete) 4490 filetypes - associated programs and viewers (obsolete) 4491 commands - user defined commands (see :command description) 4492 (obsolete) 4493 4494 'vimhelp' 4495 type: boolean 4496 default: false 4497 Use vim help format. 4498 4499 'wildmenu' 'wmnu' 4500 type: boolean 4501 default: false 4502 Controls whether possible matches of completion will be shown 4503 above the command line. 4504 4505 'wildstyle' 4506 type: enumeration 4507 default: bar 4508 Picks presentation style of wild menu. Possible values: 4509 - bar - one-line with left-to-right cursor 4510 - popup - multi-line with top-to-bottom cursor 4511 4512 'wordchars' 4513 type: string list 4514 default: "1-8,14-31,33-255" (that is all non-whitespace charac- 4515 ters) 4516 Specifies which characters in command-line mode should be con- 4517 sidered as part of a word. Value of the option is comma-sepa- 4518 rated list of ranges. If both endpoints of a range match, sin- 4519 gle endpoint is enough (e.g. "a" = "a-a"). Both endpoints are 4520 inclusive. There are two accepted forms: character representing 4521 itself or number encoding character according to ASCII table. 4522 In case of ambiguous characters (dash, comma, digit) use numeric 4523 form. Accepted characters are in the range from 0 to 255. Any 4524 Unicode character with code greater than 255 is considered to be 4525 part of a word. 4526 4527 The option affects Alt-D, Alt-B and Alt-F, but not Ctrl-W. This 4528 is intentionally to allow two use cases: 4529 4530 - Moving by WORDS and deletion by words. 4531 - Moving by words and deletion by WORDS. 4532 4533 To get the latter use the following mapping: 4534 4535 cnoremap <c-w> <a-b><a-d> 4536 4537 Also used for abbreviations. 4538 4539 'wrap' type: boolean 4540 default: true 4541 Controls whether to wrap text in quick view. 4542 4543 'wrapscan' 'ws' 4544 type: boolean 4545 default: true 4546 Searches wrap around end of the list. 4547 4548 Mappings 4549 Map arguments 4550 4551 LHS of mappings can be preceded by arguments which take the form of 4552 special sequences: 4553 4554 <silent> 4555 Postpone UI updates until RHS is completely processed. 4556 4557 <wait> In case of builtin mapping causing conflict for a user-defined 4558 mapping (e.g., `t` builtin to a partially typed `ta` user-de- 4559 fined mapping), ignore the builtin mapping and wait for input 4560 indefinitely as opposed to default behaviour of triggering the 4561 builtin mapping after a delay defined by 'timeoutlen'. Example: 4562 4563 nnoremap <wait> tw :set wrap!<cr> 4564 nnoremap <wait> tn :set number!<cr> 4565 nnoremap <wait> tr :set relativenumber!<cr> 4566 4567 Special sequences 4568 4569 Since it's not easy to enter special characters there are several spe- 4570 cial sequences that can be used in place of them. They are: 4571 4572 <cr> Enter key. 4573 4574 <esc> Escape key. 4575 4576 <space> 4577 Space key. 4578 4579 <lt> Less-than character (<). 4580 4581 <nop> provides a way to disable a mapping (by mapping it to <nop>). 4582 4583 <bs> Backspace key (see key conflict description below). 4584 4585 <tab> <s-tab> 4586 Tabulation and Shift+Tabulation keys. 4587 4588 <home> <end> 4589 Home/End. 4590 4591 <left> <right> <up> <down> 4592 Arrow keys. 4593 4594 <pageup> <pagedown> 4595 PageUp/PageDown. 4596 4597 <del> <delete> 4598 Delete key. <del> and <delete> mean different codes, but 4599 <delete> is more common. 4600 4601 <insert> 4602 Insert key. 4603 4604 <c-a>,<c-b>,...,<c-z>,<c-[>,<c->,<c-]>,<c-^>,<c-_> 4605 Control + some key (see key conflict description below). 4606 4607 <c-@> only for *nix 4608 Control + Space. 4609 4610 <a-a>,<a-b>,...,<a-z> 4611 <m-a>,<m-b>,...,<m-z> Alt + some key. 4612 4613 <a-c-a>,<a-c-b>,...,<a-c-z> 4614 <m-c-a>,<m-c-b>,...,<m-c-z> only for *nix 4615 Alt + Ctrl + some key. 4616 4617 <f0> - <f63> 4618 Functional keys. 4619 4620 <c-f1> - <c-f12> 4621 only for MS-Windows 4622 functional keys with Control key pressed. 4623 4624 <a-f1> - <a-f12> 4625 only for MS-Windows 4626 functional keys with Alt key pressed. 4627 4628 <s-f1> - <s-f12> 4629 only for MS-Windows 4630 functional keys with Shift key pressed. 4631 4632 Note that due to the way terminals process their input, several key- 4633 board keys might be mapped to single key code, for example: 4634 4635 - <cr> and <c-m>; 4636 4637 - <tab> and <c-i>; 4638 4639 - <c-h> and <bs>; 4640 4641 - etc. 4642 4643 Most of the time they are defined consistently and don't cause sur- 4644 prises, but <c-h> and <bs> are treated differently in different envi- 4645 ronments (although they match each other all the time), that's why they 4646 correspond to different keys in vifm. As a consequence, if you map <c- 4647 h> or <bs> be sure to repeat the mapping with the other one so that it 4648 works in all environments. Alternatively, provide your mapping in one 4649 form and add one of the following: 4650 4651 " if mappings with <c-h> in the LHS work 4652 map <c-h> <bs> 4653 " if mappings with <bs> in the LHS work 4654 map <bs> <c-h> 4655 4656 Whitespace 4657 4658 vifm removes whitespace characters at the beginning and end of com- 4659 mands. That's why you may want to use <space> at the end of rhs in 4660 mappings. For example: 4661 4662 cmap <f1> man<space> 4663 4664 will put "man " in line when you hit the <f1> key in the command line 4665 mode. 4666 4667 Expression syntax 4668 Supported expressions is a subset of what VimL provides. 4669 4670 Expression syntax summary, from least to most significant: 4671 4672 expr1 expr2 4673 expr2 || expr2 .. logical OR 4674 4675 expr2 expr3 4676 expr3 && expr3 .. logical AND 4677 4678 expr3 expr4 4679 expr4 == expr4 equal 4680 expr4 != expr4 not equal 4681 expr4 > expr4 greater than 4682 expr4 >= expr4 greater than or equal 4683 expr4 < expr4 smaller than 4684 expr4 <= expr4 smaller than or equal 4685 4686 expr4 expr5 4687 expr5 + expr5 .. number addition 4688 expr5 - expr5 .. number subtraction 4689 4690 expr5 expr6 4691 expr6 . expr6 .. string concatenation 4692 4693 expr6 expr7 4694 - expr6 unary minus 4695 + expr6 unary plus 4696 ! expr6 logical NOT 4697 4698 expr7 number number constant 4699 "string" string constant, \ is special 4700 'string' string constant, ' is doubled 4701 &option option value 4702 $VAR environment variable 4703 v:var builtin variable 4704 function(expr1, ...) function call 4705 (expr1) nested expression 4706 4707 ".." indicates that the operations in this level can be concatenated. 4708 4709 expr1 4710 ----- 4711 expr2 || expr2 4712 4713 Arguments are converted to numbers before evaluation. 4714 4715 Result is non-zero if at least one of arguments is non-zero. 4716 4717 It's right associative and with short-circuiting, so sub-expressions 4718 are evaluated from left to right until result of whole expression is 4719 determined (i.e., until first non-zero) or end of the expression. 4720 4721 expr2 4722 ----- 4723 expr3 && expr3 4724 4725 Arguments are converted to numbers before evaluation. 4726 4727 Result is non-zero only if both arguments are non-zero. 4728 4729 It's right associative and with short-circuiting, so sub-expressions 4730 are evaluated from left to right until result of whole expression is 4731 determined (i.e., until first zero) or end of the expression. 4732 4733 expr3 4734 ----- 4735 expr4 {cmp} expr4 4736 4737 Compare two expr4 expressions, resulting in a 0 if it evaluates to 4738 false or 1 if it evaluates to true. 4739 4740 equal == 4741 not equal != 4742 greater than > 4743 greater than or equal >= 4744 smaller than < 4745 smaller than or equal <= 4746 4747 Examples: 4748 4749 'a' == 'a' == 1 4750 'a' > 'b' == 1 4751 'a' == 'b' == 0 4752 '2' > 'b' == 0 4753 2 > 'b' == 1 4754 2 > '1b' == 1 4755 2 > '9b' == 0 4756 -1 == -'1' == 1 4757 0 == '--1' == 1 4758 4759 expr4 4760 ----- 4761 expr5 + expr5 .. number addition expr5 - expr5 .. number sub- 4762 traction 4763 4764 Examples: 4765 4766 1 + 3 - 3 == 1 4767 1 + '2' == 3 4768 4769 expr5 4770 ----- 4771 expr6 . expr6 .. string concatenation 4772 4773 Examples: 4774 4775 'a' . 'b' == 'ab' 4776 'aaa' . '' . 'c' == 'aaac' 4777 4778 expr6 4779 ----- 4780 4781 - expr6 unary minus 4782 + expr6 unary plus 4783 ! expr6 logical NOT 4784 4785 For '-' the sign of the number is changed. 4786 For '+' the number is unchanged. 4787 For '!' non-zero becomes zero, zero becomes one. 4788 4789 A String will be converted to a Number first. 4790 4791 These operations can be repeated and mixed. Examples: 4792 4793 --9 == 9 4794 ---9 == -9 4795 -+9 == 9 4796 !-9 == 0 4797 !'' == 1 4798 !'x' == 0 4799 !!9 == 1 4800 4801 expr7 4802 ----- 4803 4804 number number constant 4805 ----- 4806 4807 Decimal number. Examples: 4808 4809 0 == 0 4810 0000 == 0 4811 01 == 1 4812 123 == 123 4813 10000 == 10000 4814 4815 string 4816 ------ 4817 "string" string constant 4818 4819 Note that double quotes are used. 4820 4821 A string constant accepts these special characters: 4822 \b backspace <bs> 4823 \e escape <esc> 4824 \n newline 4825 \r return <cr> 4826 \t tab <tab> 4827 \\ backslash 4828 \" double quote 4829 4830 Examples: 4831 4832 "\"Hello,\tWorld!\"" 4833 "Hi,\nthere!" 4834 4835 literal-string 4836 -------------- 4837 'string' string constant 4838 4839 Note that single quotes are used. 4840 4841 This string is taken as it is. No backslashes are removed or have a 4842 special meaning. The only exception is that two quotes stand for one 4843 quote. 4844 4845 Examples: 4846 4847 'All\slashes\are\saved.' 4848 'This string contains doubled single quotes ''here''' 4849 4850 option 4851 ------ 4852 &option option value (local one is preferred, if exists) 4853 &g:option global option value &l:option local 4854 option value 4855 4856 Examples: 4857 4858 echo 'Terminal size: '.&columns.'x'.&lines 4859 if &columns > 100 4860 4861 Any valid option name can be used here (note that "all" in ":set all" 4862 is a pseudo option). See ":set options" section above. 4863 4864 environment variable 4865 -------------------- 4866 $VAR environment variable 4867 4868 The String value of any environment variable. When it is not defined, 4869 the result is an empty string. 4870 4871 Examples: 4872 4873 'This is my $PATH env: ' . $PATH 4874 'vifmrc at ' . $MYVIFMRC . ' is used.' 4875 4876 builtin variable 4877 -------------------- 4878 v:var builtin variable 4879 4880 Information exposed by vifm for use in scripting. 4881 4882 v:count 4883 count passed to : command, 0 by default. Can be used in mappings to 4884 pass 4885 count to a different command. 4886 v:count1 4887 same as v:count, but 1 by default. 4888 v:servername 4889 See below. 4890 4891 function call 4892 ------------- 4893 function(expr1, ...) function call 4894 4895 See "Functions" section below. 4896 4897 Examples: 4898 4899 "'" . filetype('.') . "'" 4900 filetype('.') == 'reg' 4901 4902 expression nesting 4903 ------------------ 4904 (expr1) nested expression 4905 4906 Groups any other expression of arbitrary complexity enforcing order in 4907 which operators are applied. 4908 4909 4910 Functions 4911 USAGE RESULT DESCRIPTION 4912 4913 chooseopt({opt}) String Queries choose parameters passed on 4914 startup. 4915 executable({expr}) Integer Checks whether {expr} command avail- 4916 able. 4917 expand({expr}) String Expands special keywords in {expr}. 4918 extcached({cache}, {path}, {extcmd}) 4919 String Caches output of {extcmd} per {cache} 4920 and 4921 {path} combination. 4922 filetype({fnum} [, {resolve}]) 4923 String Returns file type from position. 4924 fnameescape({expr}) String Escapes {expr} for use in a :command. 4925 getpanetype() String Returns type of current pane. 4926 has({property}) Integer Checks whether instance has {prop- 4927 erty}. 4928 layoutis({type}) Integer Checks whether layout is of type 4929 {type}. 4930 paneisat({loc}) Integer Checks whether current pane is at 4931 {loc}. 4932 system({command}) String Executes shell command and returns 4933 its output. 4934 tabpagenr([{arg}]) Integer Returns number of current or last 4935 tab. 4936 term({command}) String Like system(), but for interactive 4937 commands. 4938 4939 chooseopt({opt}) 4940 4941 Retrieves values of options related to file choosing. {opt} can be one 4942 of: 4943 files returns argument of --choose-files or empty string 4944 dir returns argument of --choose-dir or empty string 4945 cmd returns argument of --on-choose or empty string 4946 delimiter returns argument of --delimiter or the default one (\n) 4947 4948 executable({expr}) 4949 4950 If {expr} is absolute or relative path, checks whether path destination 4951 exists and refers to an executable, otherwise checks whether command 4952 named {expr} is present in directories listed in $PATH. Checks for 4953 various executable extensions on Windows. Returns boolean value de- 4954 scribing result of the check. 4955 4956 Example: 4957 4958 " use custom default viewer script if it's available and installed 4959 " in predefined system directory, otherwise try to find it elsewhere 4960 if executable('/usr/local/bin/defviewer') 4961 fileview * /usr/local/bin/defviewer %c 4962 else 4963 if executable('defviewer') 4964 fileview * defviewer %c 4965 endif 4966 endif 4967 4968 expand({expr}) 4969 4970 Expands environment variables and macros in {expr} just like it's done 4971 for command-line commands. Returns a string. See "Command macros" 4972 section above. 4973 4974 Examples: 4975 4976 " percent sign 4977 :echo expand('%%') 4978 " the last part of directory name of the other pane 4979 :echo expand('%D:t') 4980 " $PATH environment variable (same as `:echo $PATH`) 4981 :echo expand('$PATH') 4982 4983 extcached({cache}, {path}, {extcmd}) 4984 4985 Caches value of {extcmd} external command automatically updating it as 4986 necessary based on monitoring change date of a {path}. The cache is 4987 invalidated when file or its meta-data is updated. A single path can 4988 have multiple caches associated with it. 4989 4990 {path} value is normalized, but symbolic links in it aren't resolved. 4991 4992 Example: 4993 4994 " display number and size of blocks actually used by a file or directory 4995 set statusline+=" Uses: %{ extcached('uses', 4996 expand('%c'), 4997 expand('stat --format=%%bx%%B %c')) }" 4998 4999 filetype({fnum} [, {resolve}]) 5000 5001 The result is a string, which represents file type and is one of the 5002 list: 5003 exe executables 5004 reg regular files 5005 link symbolic links 5006 broken broken symbolic links (appears only when resolving) 5007 dir directories 5008 char character devices 5009 block block devices 5010 fifo pipes 5011 sock *nix domain sockets 5012 ? unknown file type (should not normally appear) 5013 5014 The result can also be an empty string in case of invalid argument. 5015 5016 Parameter {fnum} can have following values: 5017 - '.' to get type of file under the cursor in the active pane 5018 - numerical value base 1 to get type of file on specified line num- 5019 ber 5020 5021 Optional parameter {resolve} is treated as a boolean and specifies 5022 whether symbolic links should be resolved. 5023 5024 fnameescape({expr}) 5025 5026 Escapes parameter to make it suitable for use as an argument of a :com- 5027 mand. List of escaped characters includes %, which is doubled. 5028 5029 Usage example: 5030 5031 " navigate to most recently modified file in current directory 5032 execute 'goto' fnameescape(system('ls -t | head -1')) 5033 5034 getpanetype() 5035 5036 Retrieves string describing type of current pane. Possible return val- 5037 ues: 5038 regular regular file listing of some directory 5039 custom custom file list (%u) 5040 very-custom very custom file list (%U) 5041 tree tree view 5042 5043 has({property}) 5044 5045 Allows examining internal parameters from scripts to e.g. figure out 5046 environment in which application is running. Returns 1 if property is 5047 true/present, otherwise 0 is returned. Currently the following proper- 5048 ties are supported (anything else will yield 0): 5049 unix runs in *nix-like environment (including Cygwin) 5050 win runs on Windows 5051 5052 Usage example: 5053 5054 " skip user/group on Windows 5055 if !has('win') 5056 let $RIGHTS = '%10u:%-7g ' 5057 endif 5058 5059 execute 'set' 'statusline=" %t%= %A '.$RIGHTS.'%15E %20d "' 5060 5061 layoutis({type}) 5062 5063 Checks whether current interface layout is {type} or not, where {type} 5064 can be: 5065 only single-pane mode 5066 split double-pane mode (either vertical or horizon split) 5067 vsplit vertical split (left and right panes) 5068 hsplit horizontal split (top and bottom panes) 5069 5070 Usage example: 5071 5072 " automatically split vertically before enabling preview 5073 :nnoremap w :if layoutis('only') | vsplit | endif | view!<cr> 5074 5075 paneisat({loc}) 5076 5077 Checks whether position of active pane in current layout matches one of 5078 the following locations: 5079 top pane reaches top border 5080 bottom pane reaches bottom border 5081 left pane reaches left border 5082 right pane reaches right border 5083 5084 system({command}) 5085 5086 Runs the command in shell and returns its output (joined standard out- 5087 put and standard error streams). All trailing newline characters are 5088 stripped to allow easy appending to command output. Ctrl-C should in- 5089 terrupt the command. 5090 5091 Use this function to consume output of external commands that don't re- 5092 quire user interaction and term() for interactive commands that make 5093 use of terminal and are capable of handling stream redirection. 5094 5095 Usage example: 5096 5097 " command to enter .git/ directory of git-repository (when ran inside one) 5098 command! cdgit :execute 'cd' system('git rev-parse --git-dir') 5099 5100 tabpagenr([{arg}]) 5101 5102 When called without arguments returns number of current tab page base 5103 one. 5104 5105 When called with "$" as an argument returns number of the last tab page 5106 base one, which is the same as number of tabs. 5107 5108 term({command}) 5109 5110 Same as system() function, but user interface is shutdown during the 5111 execution of the command, which makes sure that external interactive 5112 applications won't affect the way terminal is used by vifm. 5113 5114 Usage example: 5115 5116 " command to change directory by picking it via fzf 5117 command! fzfcd :execute 'cd' "'".term('find -type d | fzf 2> /dev/tty')."'" 5118 5119 Menus and dialogs 5120 When navigating to some path from a menu there is a difference in end 5121 location depending on whether path has trailing slash or not. Files 5122 normally don't have trailing slashes so "file/" won't work and one can 5123 only navigate to a file anyway. On the other hand with directories 5124 there are two options: navigate to a directory or inside of it. To al- 5125 low both use cases, the first one is used on paths like "dir" and the 5126 second one for "dir/". 5127 5128 Commands 5129 5130 :range navigate to a menu line. 5131 5132 :exi[t][!] :q[uit][!] :x[it][!] 5133 leave menu mode. 5134 5135 :noh[lsearch] 5136 reset search match highlighting. 5137 5138 :w[rite] {dest} 5139 write all menu lines into file specified by {dest}. 5140 5141 General 5142 5143 j, Ctrl-N - move down. 5144 k, Ctrl-P - move up. 5145 Enter, l - select and exit the menu. 5146 Ctrl-L - redraw the menu. 5147 5148 Escape, Ctrl-C, ZZ, ZQ, q - quit. 5149 5150 In all menus 5151 5152 The following set of keys has the same meaning as in normal mode. 5153 5154 Ctrl-B, Ctrl-F 5155 Ctrl-D, Ctrl-U 5156 Ctrl-E, Ctrl-Y 5157 /, ? 5158 n, N 5159 [count]G, [count]gg 5160 H, M, L 5161 zb, zt, zz 5162 5163 zh - scroll menu items [count] characters to the right. 5164 zl - scroll menu items [count] characters to the left. 5165 zH - scroll menu items half of screen width characters to the right. 5166 zL - scroll menu items half of screen width characters to the left. 5167 5168 : - enter command line mode for menus (currently only :exi[t], :q[uit], 5169 :x[it] and :{range} are supported). 5170 5171 b - interpret content of the menu as list of paths and use it to create 5172 custom view in place of previously active pane. See "Custom views" 5173 section below. 5174 B - same as above, but creates unsorted view. 5175 5176 v - load menu content into quickfix list of the editor (Vim compatible 5177 by assumption) or if list doesn't have separators after file names 5178 (colons) open each line as a file name. 5179 5180 5181 Below is description of additional commands and reaction on selection 5182 in some menus and dialogs. 5183 5184 Apropos menu 5185 5186 Selecting menu item runs man on a given topic. Menu won't be closed 5187 automatically to allow view several pages one by one. 5188 5189 Command-line mode abbreviations menu 5190 5191 Type dd on an abbreviation to remove it. 5192 5193 c leaves menu preserving file selection and inserts right-hand side of 5194 selected command into command-line. 5195 5196 Color scheme menu 5197 5198 Selecting name of a color scheme applies it the same way as if ":col- 5199 orscheme <name>" was executed on the command-line. 5200 5201 Commands menu 5202 5203 Selecting command executes it with empty arguments (%a). 5204 5205 dd on a command to remove. 5206 5207 Marks menu 5208 5209 Selecting mark navigates to it. 5210 5211 dd on a mark to remove it. 5212 5213 Bookmarks menu 5214 5215 Selecting a bookmark navigates to it. 5216 5217 Type dd on a bookmark to remove it. 5218 5219 gf and e also work to make it more convenient to bookmark files. 5220 5221 Trash (:lstrash) menu 5222 5223 r on a file name to restore it from trash. 5224 5225 dd deletes file under the cursor. 5226 5227 Trashes menu 5228 5229 dd empties selected trash in background. 5230 5231 Directory history and Trashes menus 5232 5233 Selecting directory name will change directory of the current view as 5234 if :cd command was used. 5235 5236 Directory stack menu 5237 5238 Selecting directory name will rotate stack to put selected directory 5239 pair at the top of the stack. 5240 5241 Filetype menu 5242 5243 Commands from vifmrc or typed in command-line are displayed above empty 5244 line. All commands below empty line are from .desktop files. 5245 5246 c leaves menu preserving file selection and inserts command after :! in 5247 command-line mode. 5248 5249 Grep, find, locate, bookmarks and user menu with navigation (%M macro) 5250 5251 gf - navigate previously active view to currently selected item. 5252 Leaves menu mode except for grep menu. Pressing Enter key has the same 5253 effect. 5254 5255 e - open selected path in the editor, stays in menu mode. 5256 5257 c - leave menu preserving file selection and insert file name after :! 5258 in command-line mode. 5259 5260 User menu without navigation (%m macro) 5261 5262 c leaves menu preserving file selection and inserts whole line after :! 5263 in command-line mode. 5264 5265 Grep menu 5266 5267 Selecting file (via Enter or l key) opens it in editor set by 'vicmd' 5268 at given line number. Menu won't be closed automatically to allow 5269 viewing more than one result. 5270 5271 See above for "gf" and "e" keys description. 5272 5273 Command-line history menu 5274 5275 Selecting an item executes it as command-line command, search query or 5276 local filter. 5277 5278 c leaves menu preserving file selection and inserts line into command- 5279 line of appropriate kind. 5280 5281 Volumes menu 5282 5283 Selecting a drive navigates previously active pane to the root of that 5284 drive. 5285 5286 Fileinfo dialog 5287 5288 Enter, q - close dialog 5289 5290 Sort dialog 5291 5292 h, Space - switch ascending/descending. 5293 q - close dialog 5294 5295 One shortcut per sorting key (see the dialog). 5296 5297 Attributes (permissions or properties) dialog 5298 5299 h, Space - check/uncheck. 5300 q - close dialog 5301 5302 Item states: 5303 5304 - * - checked flag. 5305 5306 - X - means that it has different value for files in selection. 5307 5308 - d (*nix only) - (only for execute flags) means u-x+X, g-x+X or o-x+X 5309 argument for the chmod program. If you're not on OS X and want to 5310 remove execute permission bit from all files, but preserve it for di- 5311 rectories, set all execute flags to 'd' and check 'Set Recursively' 5312 flag. 5313 5314 Jobs menu 5315 5316 dd requests cancellation of job under cursor. The job won't be removed 5317 from the list, but marked as being cancelled (if cancellation was suc- 5318 cessfully requested). A message will pop up if the job has already 5319 stopped. Note that on Windows cancelling external programs like this 5320 might not work, because their parent shell doesn't have any windows. 5321 5322 e key displays errors of selected job if any were collected. They are 5323 displayed in a new menu, but you can get back to jobs menu by pressing 5324 h. 5325 5326 5327 Undolist menu 5328 5329 r - reset undo position to group under the cursor. 5330 5331 5332 Media menu 5333 5334 Selecting a device either mounts (if it wasn't mounted yet) or navi- 5335 gates to its first mount point. 5336 5337 Selecting a mount point navigates to it. 5338 5339 Selecting "not mounted" line causes mounting. 5340 5341 Selecting any other line does nothing. 5342 5343 r - reload the list. 5344 5345 m - mount/unmount device (cursor should be positioned on lines under 5346 device information). 5347 5348 [ - put cursor on the previous device. 5349 5350 ] - put cursor on the next device. 5351 5352 5353 Custom views 5354 Definition 5355 5356 Normally file views contain list of files from a single directory, but 5357 sometimes it's useful to populate them with list of files that do not 5358 belong to the same directory, which is what custom views are for. 5359 5360 Presentation 5361 5362 Custom views are still related to directory they were in before custom 5363 list was loaded. Path to that directory (original directory) can be 5364 seen in the title of a custom view. 5365 5366 Files in same directory have to be named differently, this doesn't hold 5367 for custom views thus seeing just file names might be rather confusing. 5368 In order to give an idea where files come from and when possible, rela- 5369 tive paths to original directory of the view is displayed, otherwise 5370 full path is used instead. 5371 5372 Custom views normally don't contain any inexistent files. 5373 5374 Navigation 5375 5376 Custom views have some differences related to navigation in regular 5377 views. 5378 5379 gf - acts similar to gf on symbolic links and navigates to the file at 5380 its real 5381 location. 5382 5383 h - go to closes parent node in tree view, otherwise return to the 5384 original directory. 5385 5386 gh - return to the original directory. 5387 5388 Opening ".." entry also causes return to the original directory. 5389 5390 History 5391 5392 Custom list exists only while it's visible, once left one can't return 5393 to it, so there is no appearances of it in any history. 5394 5395 Filters 5396 5397 Only local filter affects content of the view. This is intentional, 5398 presumably if one loads list, precisely that list should be displayed 5399 (except for inexistent paths, which are ignored). 5400 5401 Search 5402 5403 Although directory names are visible in listing, they are not search- 5404 able. Only file names are taken into account (might be changed in fu- 5405 ture, searching whole lines seems quite reasonable). 5406 5407 Sorting 5408 5409 Contrary to search sorting by name works on whole visible part of file 5410 path. 5411 5412 Highlight 5413 5414 Whole file name is highlighted as one entity, even if there are direc- 5415 tory elements. 5416 5417 Updates 5418 5419 Reloads can occur, though they are not automatic due to files being 5420 scattered among different places. On a reload, inexistent files are 5421 removed and meta-data of all other files is updated. 5422 5423 Once custom view forgets about the file, it won't add it back even if 5424 it's created again. So not seeing file previously affected by an oper- 5425 ation, which was undone is normal. 5426 5427 Operations 5428 5429 All operations that add files are forbidden for custom views. For ex- 5430 ample, moving/copying/putting files into a custom view doesn't work, 5431 because it doesn't make much sense. 5432 5433 On the other hand, operations that use files of a custom view as a 5434 source (e.g. yanking, copying, moving file from custom view, deletion) 5435 and operations that modify names are all allowed. 5436 5437 Compare views 5438 Kinds 5439 5440 :compare can produce four different results depending on arguments: 5441 - single compare view (ofone and either listall or listdups); 5442 - single custom view (ofone and listunique); 5443 - two compare views (ofboth and either listall or listdups); 5444 - two custom views (ofboth and listunique). 5445 5446 The first two display files of one file system tree. Here duplicates 5447 are files that have at least one copy in the same tree. The other two 5448 kinds of operation compare two trees, in which duplicates are files 5449 that are found in both trees. 5450 5451 Lists of unique files are presented in custom views because there is no 5452 file grouping to preserve as all file ids are guaranteed to be dis- 5453 tinct. 5454 5455 Creation 5456 5457 Arguments passed to :compare form four categories each with its own 5458 prefix and is responsible for particular property of operation. 5459 5460 Which files to compare: 5461 - ofboth - compares files of two panes against each other; 5462 - ofone - compares files of the same directory. 5463 5464 How files are compared: 5465 - byname - by their name only; 5466 - bysize - only by their size; 5467 - bycontents - by combination of size and hash of file contents. 5468 5469 Which files to display: 5470 - listall - all files; 5471 - listunique - unique files only; 5472 - listdups - only duplicated files. 5473 5474 How results are grouped (has no effect if "ofone" specified): 5475 - groupids - files considered identical are always adjacent in out- 5476 put; 5477 - grouppaths - file system ordering is preferred (this also enables 5478 displaying identically named files as mismatches). 5479 5480 Which files to omit: 5481 - skipempty - ignore empty files. 5482 5483 Each argument can appear multiple times, the rightmost one of the group 5484 is considered. Arguments alter default behaviour instead of substitut- 5485 ing it. 5486 5487 Examples 5488 5489 The defaults corresponds to probably the most common use case of com- 5490 paring files in two trees with grouping by paths, so the following are 5491 equivalent: 5492 5493 :compare 5494 :compare bycontents grouppaths 5495 :compare bycontents listall ofboth grouppaths 5496 5497 Another use case is to find duplicates in the current sub-tree: 5498 5499 :compare listdups ofone 5500 5501 The following command lists files that are unique to each pane: 5502 5503 :compare listunique 5504 5505 Look 5506 5507 The view can't switch to ls-like view as it's unable to display diff- 5508 like data. 5509 5510 Comparison views have second column displaying id of the file, files 5511 with same id are considered to be equal. The view columns configura- 5512 tion is predefined. 5513 5514 Behaviour 5515 5516 When two views are being compared against each other the following 5517 changes to the regular behaviour apply: 5518 - views are scrolled synchronously (as if 'scrollbind' was set); 5519 - views' cursors are synchronized; 5520 - local filtering is disabled (its results wouldn't be meaningful); 5521 - zd excludes groups of adjacent identical files, 1zd gives usual be- 5522 haviour; 5523 - sorting is permanently disabled (ordering is fixed); 5524 - removed files hide their counter pairs; 5525 - exiting one of the views terminates the other immediately; 5526 - renaming files isn't blocked, but isn't taken into account and might 5527 require regeneration of comparison; 5528 - entries which indicate absence of equivalent file have empty names 5529 and can be matched as such; 5530 - when unique files of both views are listed custom views can be 5531 empty, this absence of unique files is stated clearly. 5532 5533 One compare view has similar properties (those that are applicable for 5534 single pane). 5535 5536 Files are gathered in this way: 5537 - recursively starting at current location of the view; 5538 - dot files are excluded if view hides them at the moment of compari- 5539 son; 5540 - directories are not taken into account; 5541 - symbolic links to directories are ignored. 5542 5543 Startup 5544 On startup vifm determines several variables that are used during the 5545 session. They are determined in the order they appear below. 5546 5547 On *nix systems $HOME is normally present and used as is. On Windows 5548 systems vifm tries to find correct home directory in the following or- 5549 der: 5550 - $HOME variable; 5551 - $USERPROFILE variable (on Windows only); 5552 - a combination of $HOMEDRIVE and $HOMEPATH variables (on Windows 5553 only). 5554 5555 vifm tries to find correct configuration directory by checking the fol- 5556 lowing places: 5557 - $VIFM variable; 5558 - parent directory of the executable file (on Windows only); 5559 - $HOME/.vifm directory; 5560 - $APPDATA/Vifm directory (on Windows only); 5561 - $XDG_CONFIG_HOME/vifm directory; 5562 - $HOME/.config/vifm directory. 5563 5564 vifm tries to find correct configuration file by checking the following 5565 places: 5566 - $MYVIFMRC variable; 5567 - vifmrc in parent directory of the executable file (on Windows only); 5568 - $VIFM/vifmrc file. 5569 5570 Configure 5571 See "Startup" section above for the explanations on $VIFM and $MYV- 5572 IFMRC. 5573 5574 The vifmrc file contains commands that will be executed on vifm 5575 startup. There are two such files: global and local. Global one is at 5576 {prefix}/etc/vifm/vifmrc, see $MYVIFMRC variable description for the 5577 search algorithm used to find local vifmrc. Global vifmrc is loaded 5578 before the local one, so that the later one can redefine anything con- 5579 figured globally. 5580 5581 Use vifmrc to set settings, mappings, filetypes etc. To use multi line 5582 commands precede each next line with a slash (whitespace before slash 5583 is ignored, but all spaces at the end of the lines are saved). For ex- 5584 ample: 5585 5586 set 5587 \smartcase 5588 5589 equals "setsmartcase". When 5590 5591 set<space here> 5592 \ smartcase 5593 5594 equals "set smartcase". 5595 5596 The $VIFM/vifminfo file contains session settings. You may edit it by 5597 hand to change the settings, but it's not recommended to do that, edit 5598 vifmrc instead. You can control what settings will be saved in 5599 vifminfo by setting 'vifminfo' option. Vifm always writes this file on 5600 exit unless 'vifminfo' option is empty. Marks, bookmarks, commands, 5601 histories, filetypes, fileviewers and registers in the file are merged 5602 with vifm configuration (which has bigger priority). 5603 5604 Generally, runtime configuration has bigger priority during merging, 5605 but there are some exceptions: 5606 5607 - directory stack stored in the file is not overwritten unless some- 5608 thing is changed in vifm session that performs merge; 5609 5610 - each mark or bookmark is marked with a timestamp, so that newer 5611 value is not overwritten by older one, thus no matter from where it 5612 comes, the newer one wins. 5613 5614 The $VIFM/scripts directory can contain shell scripts. vifm modifies 5615 its PATH environment variable to let user run those scripts without 5616 specifying full path. All subdirectories of the $VIFM/scripts will be 5617 added to PATH too. Script in a subdirectory overlaps script with the 5618 same name in all its parent directories. 5619 5620 The $VIFM/colors/ and {prefix}/etc/vifm/colors/ directories contain 5621 color schemes. Available color schemes are searched in that order, so 5622 on name conflict the one in $VIFM/colors/ wins. 5623 5624 Each color scheme should have ".vifm" extension. This wasn't the case 5625 before and for this reason the following rules apply during lookup: 5626 5627 - if there is no file with .vifm extension, all regular files are 5628 listed; 5629 5630 - otherwise only files with .vifm extension are listed (with the ex- 5631 tension being truncated). 5632 5633 Automatic FUSE mounts 5634 vifm has a builtin support of automated FUSE file system mounts. It is 5635 implemented using file associations mechanism. To enable automated 5636 mounts, one needs to use a specially formatted program line in filetype 5637 or filextype commands. These use special macros, which differ from 5638 macros in commands unrelated to FUSE. Currently three formats are sup- 5639 ported: 5640 5641 1) FUSE_MOUNT This format should be used in case when all information 5642 needed for mounting all files of a particular type is the same. E.g. 5643 mounting of tar files don't require any file specific options. 5644 5645 Format line: 5646 FUSE_MOUNT|mounter %SOURCE_FILE %DESTINATION_DIR [%FOREGROUND] 5647 5648 Example filetype command: 5649 5650 :filetype FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR 5651 5652 2) FUSE_MOUNT2 This format allows one to use specially formatted files 5653 to perform mounting and is useful for mounting remotes, for example re- 5654 mote file systems over ftp or ssh. 5655 5656 Format line: 5657 FUSE_MOUNT2|mounter %PARAM %DESTINATION_DIR [%FOREGROUND] 5658 5659 Example filetype command: 5660 5661 :filetype *.ssh FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR 5662 5663 Example file content: 5664 5665 root@127.0.0.1:/ 5666 5667 3) FUSE_MOUNT3 5668 5669 This format is equivalent to FUSE_MOUNT, but omits unmounting. It is 5670 useful for cases, when unmounting isn't needed, like when using AVFS. 5671 5672 Example :filetype command: 5673 5674 :filetype *.tar,*.tar.bz2,*.tbz2,*.tgz,*.tar.gz,*.tar.xz,*.txz,*.deb 5675 \ {Mount with avfs} 5676 \ FUSE_MOUNT3|mount-avfs %DESTINATION_DIR %SOURCE_FILE 5677 5678 Example `mount-avfs` helper script: 5679 5680 #!/bin/sh 5681 5682 dest=$1 5683 file=$2 5684 5685 rmdir "$dest" 5686 ln -s "$HOME/.avfs$file#/" "$dest" 5687 5688 All % macros are expanded by vifm at runtime and have the following 5689 meaning: 5690 - %SOURCE_FILE is replaced by full path to selected file; 5691 - %DESTINATION_DIR is replaced by full path to mount directory, which 5692 is created by vifm basing on the value of 'fusehome' option; 5693 - %PARAM value is filled from the first line of file (whole line), 5694 though in the future it can be changed to whole file content; 5695 - %FOREGROUND means that you want to run mount command as a regular 5696 command (required to be able to provide input for communication with 5697 mounter in interactive way). 5698 5699 %FOREGROUND is an optional macro. Other macros are not mandatory, but 5700 mount commands likely won't work without them. 5701 5702 %CLEAR is obsolete name of %FOREGROUND, which is still supported, but 5703 might be removed in future. Its use is discouraged. 5704 5705 Unlike macros elsewhere, these are recognized only if they appear at 5706 the end of a command or are followed by a space. There is no way to 5707 escape % either. These are historical limitations, which might be ad- 5708 dressed in the future. 5709 5710 The mounted FUSE file systems will be automatically unmounted in two 5711 cases: 5712 5713 - when vifm quits (with ZZ, :q, etc. or when killed by signal); 5714 5715 - when you explicitly leave mount point going up to its parent direc- 5716 tory (with h, Enter on "../" or ":cd ..") and other pane is not in 5717 the same directory or its child directories. 5718 5719 View look 5720 vifm supports displaying of file list view in two different ways: 5721 5722 - in a table mode, when multiple columns can be set using 'view- 5723 columns' option (see "Column view" section below for details); 5724 5725 - in a multicolumn list manner which looks almost like `ls -x` com- 5726 mand output (see "ls-like view" section below for details). 5727 5728 The look is local for each view and can be chosen by changing value of 5729 the 'lsview' boolean option. 5730 5731 Depending on view look some of keys change their meaning to allow more 5732 natural cursor moving. This concerns mainly h, j, k, l and other simi- 5733 lar navigation keys. 5734 5735 Also some of options can be ignored if they don't affect view display- 5736 ing in selected look. For example value of 'viewcolumns' when 'lsview' 5737 is set. 5738 5739 ls-like view 5740 When this view look is enabled by setting 'lsview' option on, vifm will 5741 display files in multiple columns. Number of columns depends on the 5742 length of the longest file name present in current directory of the 5743 view. Whole file list is automatically reflowed on directory change, 5744 terminal or view resize. 5745 5746 View looks close to output of `ls -x` command, so files are listed left 5747 to right in rows. 5748 5749 In this mode file manipulation commands (e.g. d) don't work line-wise 5750 like they do in Vim, since such operations would be uncommon for file 5751 manipulation tasks. Thus, for example, dd will remove only current 5752 file. 5753 5754 By default the view is filled by lines, 'lsoptions' can be used to get 5755 filling by columns. 5756 5757 Note that tree-view and compare view inhibit ls-like view. 5758 5759 Column view 5760 View columns are described by a comma-separated list of column descrip- 5761 tions, each of which has the following format 5762 [ '-' ] [ fw ( [ '.' tw ] | '%' ) ] '{' type '}' '.'{0,3} 5763 where fw stands for full width and tw stands for text width. 5764 5765 So it basically consists of four parts: 5766 1. Optional alignment specifier 5767 2. Optional width specifier 5768 3. Mandatory column name 5769 4. Optional cropping specifier 5770 5771 Alignment specifier 5772 5773 It's an optional minus or asterisk sign as the first symbol of the 5774 string. 5775 5776 Specifies type of text alignment within a column. Three types are sup- 5777 ported: 5778 5779 - left align 5780 5781 set viewcolumns=-{name} 5782 5783 - right align (default) 5784 5785 set viewcolumns={name} 5786 5787 - dynamic align 5788 5789 It's like left alignment, but when the text is bigger than the col- 5790 umn, the alignment is made at the right (so the part of the field is 5791 always visible). 5792 5793 set viewcolumns=*{name} 5794 5795 Width specifier 5796 5797 It's a number followed by a percent sign, two numbers (second one 5798 should be less than or equal to the first one) separated with a dot or 5799 a single number. 5800 5801 Specifies column width and its units. There are three size types: 5802 5803 - absolute size - column width is specified in characters 5804 5805 set viewcolumns=-100{name},20.15{ext} 5806 5807 results in two columns with lengths of 100 and 20 and a reserved 5808 space of five characters on the left of second column. 5809 5810 - relative (percent) size - column width is specified in percents of 5811 view width 5812 5813 set viewcolumns=-80%{name},15%{ext},5%{mtime} 5814 5815 results in three columns with lengths of 80/100, 15/100 and 5/100 of 5816 view width. 5817 5818 - auto size (default) - column width is automatically determined 5819 5820 set viewcolumns=-{name},{ext},{mtime} 5821 5822 results in three columns with length of one third of view width. 5823 There is no size adjustment to content, since it will slow down ren- 5824 dering. 5825 5826 Columns of different sizing types can be freely mixed in one view. 5827 Though sometimes some of columns can be seen partly or be completely 5828 invisible if there is not enough space to display them. 5829 5830 Column name 5831 5832 This is just a sort key surrounded with curly braces or {root}, e.g. 5833 5834 {name},{ext},{mtime} 5835 5836 {name} and {iname} keys are the same and present both for consistency 5837 with 'sort' option. 5838 5839 Following keys don't have corresponding sorting keys: 5840 5841 - {root} - display name without extension (as a complement for 5842 {ext}) 5843 5844 - {fileroot} - display name without extension for anything except for 5845 directories and symbolic links to directories (as a complement for 5846 {fileext}) 5847 5848 Empty curly braces ({}) are replaced with the default secondary column 5849 for primary sort key. So after the next command view will be displayed 5850 almost as if 'viewcolumns' is empty, but adding ellipsis for long file 5851 names: 5852 5853 set viewcolumns=-{name}..,6{}. 5854 5855 Cropping specifier 5856 5857 It's from one to three dots after closing curly brace in column format. 5858 5859 Specifies type of text truncation if it doesn't fit in the column. 5860 Currently three types are supported: 5861 5862 - truncation - text is truncated 5863 5864 set viewcolumns=-{name}. 5865 5866 results in truncation of names that are too long too fit in the 5867 view. 5868 5869 - adding of ellipsis - ellipsis on the left or right are added when 5870 needed 5871 5872 set viewcolumns=-{name}.. 5873 5874 results in that ellipsis are added at the end of too long file 5875 names. 5876 5877 - none (default) - text can pass column boundaries 5878 5879 set viewcolumns=-{name}...,{ext} 5880 5881 results in that long file names can partially be written on the ext 5882 column. 5883 5884 Color schemes 5885 The color schemes in vifm can be applied in two different ways: 5886 5887 - as the primary color scheme; 5888 5889 - as local to a pane color scheme. 5890 5891 Both types are set using :colorscheme command, but of different forms: 5892 5893 - :colorscheme color_scheme_name - for the primary color scheme; 5894 5895 - :colorscheme color_scheme_name directory - for local color schemes. 5896 5897 Look of different parts of the TUI (Text User Interface) is determined 5898 in this way: 5899 5900 - Border, TabLine, TabLineSel, TopLineSel, TopLine, CmdLine, Er- 5901 rorMsg, StatusLine, JobLine, SuggestBox and WildMenu are always de- 5902 termined by the primary color scheme; 5903 5904 - CurrLine, Selected, Directory, Link, BrokenLink, Socket, Device, 5905 Executable, Fifo, CmpMismatch, Win, AuxWin and OtherWin are deter- 5906 mined by primary color scheme and a set of local color schemes, 5907 which can be empty. 5908 5909 There might be a set of local color schemes because they are structured 5910 hierarchically according to file system structure. For example, having 5911 the following piece of file system: 5912 5913 ~ 5914 `-- bin 5915 | 5916 `-- my 5917 5918 Two color schemes: 5919 5920 # ~/.vifm/colors/for_bin 5921 highlight Win cterm=none ctermfg=white ctermbg=red 5922 highlight CurrLine cterm=none ctermfg=red ctermbg=black 5923 5924 # ~/.vifm/colors/for_bin_my 5925 highlight CurrLine cterm=none ctermfg=green ctermbg=black 5926 5927 And these three commands in the vifmrc file: 5928 5929 colorscheme Default 5930 colorscheme for_bin ~/bin 5931 colorscheme for_bin_my ~/bin/my 5932 5933 File list will look in the following way for each level: 5934 5935 - ~/ - Default color scheme 5936 black background 5937 cursor with blue background 5938 5939 - ~/bin/ - mix of Default and for_bin color schemes 5940 red background 5941 cursor with black background and red foreground 5942 5943 - ~/bin/my/ - mix of Default, for_bin and for_bin_my color schemes 5944 red background 5945 cursor with black background and green foreground 5946 5947 Trash directory 5948 vifm has support of trash directory, which is used as temporary storage 5949 for deleted files or files that were cut. Using trash is controlled by 5950 the 'trash' option, and exact path to the trash can be set with 5951 'trashdir' option. Trash directory in vifm differs from the system- 5952 wide one by default, because of possible incompatibilities of storing 5953 deleted files among different file managers. But one can set 5954 'trashdir' to "~/.local/share/Trash" to use a "standard" trash direc- 5955 tory. 5956 5957 There are two scenarios of using trash in vifm: 5958 5959 1. As a place for storing files that were cut by "d" and may be in- 5960 serted to some other place in file system. 5961 5962 2. As a storage of files, that are deleted but not purged yet. 5963 5964 The first scenario uses deletion ("d") operations to put files to trash 5965 and put ("p") operations to restore files from trash directory. Note 5966 that such operations move files to and from trash directory, which can 5967 be long term operations in case of different partitions or remote 5968 drives mounted locally. 5969 5970 The second scenario uses deletion ("d") operations for moving files to 5971 trash directory and :empty command-line command to purge all previously 5972 deleted files. 5973 5974 Deletion and put operations depend on registers, which can point to 5975 files in trash directory. Normally, there are no nonexistent files in 5976 registers, but vifm doesn't keep track of modifications under trash di- 5977 rectory, so one shouldn't expect value of registers to be absolutely 5978 correct if trash directory was modified not by operation that are meant 5979 for it. But this won't lead to any issues with operations, since they 5980 ignore nonexistent files. 5981 5982 Client-Server 5983 vifm supports remote execution of command-line mode commands, remote 5984 changing of directories and expression evaluation. This is possible 5985 using --remote and --remote-expr command-line arguments. 5986 5987 To execute a command remotely combine --remote argument with -c <com- 5988 mand> or +<command>. For example: 5989 5990 vifm --remote -c 'cd /' 5991 vifm --remote '+cd /' 5992 5993 To change directory not using command-line mode commands one can spec- 5994 ify paths right after --remote argument, like this: 5995 5996 vifm --remote / 5997 vifm --remote ~ 5998 vifm --remote /usr/bin /tmp 5999 6000 Evaluating expression remotely might be useful to query information 6001 about an instance, for example its location: 6002 6003 vifm --remote-expr 'expand("%d")' 6004 6005 If there are several running instances, the target can be specified 6006 with --server-name option (otherwise, the first one lexicographically 6007 is used): 6008 6009 vifm --server-name work --remote ~/work/project 6010 6011 List of names of running instances can be obtained via --server-list 6012 option. Name of the current one is available via v:servername. 6013 6014 6015 v:servername 6016 server name of the running vifm instance. Empty if client- 6017 server feature is disabled. 6018 6019 Plugin 6020 Plugin for using vifm in vim as a file selector. 6021 6022 Commands: 6023 6024 :EditVifm select a file or files to open in the current buffer. 6025 :Vifm alias for :EditVifm. 6026 :SplitVifm split buffer and select a file or files to open. 6027 :VsplitVifm vertically split buffer and select a file or files to 6028 open. 6029 :DiffVifm select a file or files to compare to the current file 6030 with 6031 :vert diffsplit. 6032 :TabVifm select a file or files to open in tabs. 6033 6034 Each command accepts up to two arguments: left pane directory and right 6035 pane directory. After arguments are checked, vifm process is spawned 6036 in a special "file-picker" mode. To pick files just open them either 6037 by pressing l, i or Enter keys, or by running :edit command. If no 6038 files are selected, file under the cursor is opened, otherwise whole 6039 selection is passed to the plugin and opened in vim. 6040 6041 The plugin have only two settings. It's a string variable named 6042 g:vifm_term to let user specify command to run GUI terminal. By de- 6043 fault it's equal to 'xterm -e'. And another string variable named 6044 g:vifm_exec, which equals "vifm" by default and specifies path to 6045 vifm's executable. To pass arguments to vifm use g:vifm_exec_args, 6046 which is empty by default. 6047 6048 To use the plugin copy the vifm.vim file to either the system wide 6049 vim/plugin directory or into ~/.vim/plugin. 6050 6051 If you would prefer not to use the plugin and it is in the system wide 6052 plugin directory add 6053 6054 let loaded_vifm=1 6055 6056 to your ~/.vimrc file. 6057 6058 Reserved 6059 The following command names are reserved and shouldn't be used for user 6060 commands. 6061 6062 g[lobal] 6063 v[global] 6064 6065 ENVIRONMENT 6066 VIFM Points to main configuration directory (usually ~/.vifm/). 6067 6068 MYVIFMRC 6069 Points to main configuration file (usually ~/.vifm/vifmrc). 6070 6071 These environment variables are valid inside vifm and also can be used 6072 to configure it by setting some of them before running vifm. 6073 6074 When $MYVIFMRC isn't set, it's made as $VIFM/vifmrc (exception for Win- 6075 dows: vifmrc in the same directory as vifm.exe has higher priority than 6076 $VIFM/vifmrc). 6077 6078 See "Startup" section above for more details. 6079 6080 VIFM_FUSE_FILE 6081 On execution of external commands this variable is set to the 6082 full path of file used to initiate FUSE mount of the closes 6083 mount point from current pane directory up. It's not set when 6084 outside FUSE mount point. When vifm is used inside terminal 6085 multiplexer, it tries to set this variable as well (it doesn't 6086 work this way on its own). 6087 6088 SEE ALSO 6089 vifm-convert-dircolors(1), vifm-pause(1) 6090 6091 Website: https://vifm.info/ 6092 Wiki: https://wiki.vifm.info/ 6093 6094 Esperanto translation of the documentation by Sebastian Cyprych: 6095 http://cyprych.neostrada.pl/tekstoj/komputiloj/vifm-help.eo.html 6096 6097 AUTHOR 6098 Vifm was written by ksteen <ksteen@users.sourceforge.net> 6099 And currently is developed by xaizek <xaizek@posteo.net> 6100 6101 6102 6103 vifm 0.10.1 July 29, 2019 VIFM(1)