vifmrc.orig (13070B)
1 " vim: filetype=vifm : 2 " Sample configuration file for vifm (last updated: 20 July, 2018) 3 " You can edit this file by hand. 4 " The " character at the beginning of a line comments out the line. 5 " Blank lines are ignored. 6 " The basic format for each item is shown with an example. 7 8 " ------------------------------------------------------------------------------ 9 10 " This is the actual command used to start vi. The default is vim. 11 " If you would like to use another vi clone such as Elvis or Vile 12 " you will need to change this setting. 13 14 set vicmd=vim 15 " set vicmd=elvis\ -G\ termcap 16 " set vicmd=vile 17 18 " This makes vifm perform file operations on its own instead of relying on 19 " standard utilities like `cp`. While using `cp` and alike is a more universal 20 " solution, it's also much slower when processing large amounts of files and 21 " doesn't support progress measuring. 22 23 set syscalls 24 25 " Trash Directory 26 " The default is to move files that are deleted with dd or :d to 27 " the trash directory. If you change this you will not be able to move 28 " files by deleting them and then using p to put the file in the new location. 29 " I recommend not changing this until you are familiar with vifm. 30 " This probably shouldn't be an option. 31 32 set trash 33 34 " This is how many directories to store in the directory history. 35 36 set history=100 37 38 " Automatically resolve symbolic links on l or Enter. 39 40 set nofollowlinks 41 42 " With this option turned on you can run partially entered commands with 43 " unambiguous beginning using :! (e.g. :!Te instead of :!Terminal or :!Te<tab>). 44 45 " set fastrun 46 47 " Natural sort of (version) numbers within text. 48 49 set sortnumbers 50 51 " Maximum number of changes that can be undone. 52 53 set undolevels=100 54 55 " If you installed the vim.txt help file set vimhelp. 56 " If would rather use a plain text help file set novimhelp. 57 58 set novimhelp 59 60 " If you would like to run an executable file when you 61 " press return on the file name set this. 62 63 set norunexec 64 65 " Selected color scheme 66 67 colorscheme Default 68 69 " Format for displaying time in file list. For example: 70 " TIME_STAMP_FORMAT=%m/%d-%H:%M 71 " See man date or man strftime for details. 72 73 set timefmt=%m/%d\ %H:%M 74 75 " Show list of matches on tab completion in command-line mode 76 77 set wildmenu 78 79 " Display completions in a form of popup with descriptions of the matches 80 81 set wildstyle=popup 82 83 " Display suggestions in normal, visual and view modes for keys, marks and 84 " registers (at most 5 files). In other view, when available. 85 86 set suggestoptions=normal,visual,view,otherpane,keys,marks,registers 87 88 " Ignore case in search patterns unless it contains at least one uppercase 89 " letter 90 91 set ignorecase 92 set smartcase 93 94 " Don't highlight search results automatically 95 96 set nohlsearch 97 98 " Use increment searching (search while typing) 99 set incsearch 100 101 " Try to leave some space from cursor to upper/lower border in lists 102 103 set scrolloff=4 104 105 " Don't do too many requests to slow file systems 106 107 if !has('win') 108 set slowfs=curlftpfs 109 endif 110 111 " Set custom status line look 112 113 set statusline=" Hint: %z%= %A %10u:%-7g %15s %20d " 114 115 " ------------------------------------------------------------------------------ 116 117 " :mark mark /full/directory/path [filename] 118 119 mark b ~/bin/ 120 mark h ~/ 121 122 " ------------------------------------------------------------------------------ 123 124 " :com[mand][!] command_name action 125 " The following macros can be used in a command 126 " %a is replaced with the user arguments. 127 " %c the current file under the cursor. 128 " %C the current file under the cursor in the other directory. 129 " %f the current selected file, or files. 130 " %F the current selected file, or files in the other directory. 131 " %b same as %f %F. 132 " %d the current directory name. 133 " %D the other window directory name. 134 " %m run the command in a menu window 135 136 command! df df -h %m 2> /dev/null 137 command! diff vim -d %f %F 138 command! zip zip -r %f.zip %f 139 command! run !! ./%f 140 command! make !!make %a 141 command! mkcd :mkdir %a | cd %a 142 command! vgrep vim "+grep %a" 143 command! reload :write | restart 144 145 " ------------------------------------------------------------------------------ 146 147 " The file type is for the default programs to be used with 148 " a file extension. 149 " :filetype pattern1,pattern2 defaultprogram,program2 150 " :fileviewer pattern1,pattern2 consoleviewer 151 " The other programs for the file type can be accessed with the :file command 152 " The command macros %f, %F, %d, %F may be used in the commands. 153 " The %a macro is ignored. To use a % you must put %%. 154 155 " For automated FUSE mounts, you must register an extension with :file[x]type 156 " in one of following formats: 157 " 158 " :filetype extensions FUSE_MOUNT|some_mount_command using %SOURCE_FILE and %DESTINATION_DIR variables 159 " %SOURCE_FILE and %DESTINATION_DIR are filled in by vifm at runtime. 160 " A sample line might look like this: 161 " :filetype *.zip,*.jar,*.war,*.ear FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR 162 " 163 " :filetype extensions FUSE_MOUNT2|some_mount_command using %PARAM and %DESTINATION_DIR variables 164 " %PARAM and %DESTINATION_DIR are filled in by vifm at runtime. 165 " A sample line might look like this: 166 " :filetype *.ssh FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR 167 " %PARAM value is filled from the first line of file (whole line). 168 " Example first line for SshMount filetype: root@127.0.0.1:/ 169 " 170 " You can also add %CLEAR if you want to clear screen before running FUSE 171 " program. 172 173 " Pdf 174 filextype *.pdf zathura %c %i &, apvlv %c, xpdf %c 175 fileviewer *.pdf pdftotext -nopgbrk %c - 176 177 " PostScript 178 filextype *.ps,*.eps,*.ps.gz 179 \ {View in zathura} 180 \ zathura %f, 181 \ {View in gv} 182 \ gv %c %i &, 183 184 " Djvu 185 filextype *.djvu 186 \ {View in zathura} 187 \ zathura %f, 188 \ {View in apvlv} 189 \ apvlv %f, 190 191 " Audio 192 filetype *.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus 193 \ {Play using ffplay} 194 \ ffplay -nodisp -autoexit %c, 195 \ {Play using MPlayer} 196 \ mplayer %f, 197 fileviewer *.mp3 mp3info 198 fileviewer *.flac soxi 199 200 " Video 201 filextype *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob, 202 \*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx, 203 \*.as[fx] 204 \ {View using ffplay} 205 \ ffplay -fs -autoexit %f, 206 \ {View using Dragon} 207 \ dragon %f:p, 208 \ {View using mplayer} 209 \ mplayer %f, 210 fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob, 211 \*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx, 212 \*.as[fx] 213 \ ffprobe -pretty %c 2>&1 214 215 " Web 216 filextype *.html,*.htm 217 \ {Open with dwb} 218 \ dwb %f %i &, 219 \ {Open with firefox} 220 \ firefox %f &, 221 \ {Open with uzbl} 222 \ uzbl-browser %f %i &, 223 filetype *.html,*.htm links, lynx 224 225 " Object 226 filetype *.o nm %f | less 227 228 " Man page 229 filetype *.[1-8] man ./%c 230 fileviewer *.[1-8] man ./%c | col -b 231 232 " Images 233 filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm 234 \ {View in sxiv} 235 \ sxiv %f, 236 \ {View in gpicview} 237 \ gpicview %c, 238 \ {View in shotwell} 239 \ shotwell, 240 fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm 241 \ convert -identify %f -verbose /dev/null 242 243 " OpenRaster 244 filextype *.ora 245 \ {Edit in MyPaint} 246 \ mypaint %f, 247 248 " Mindmap 249 filextype *.vym 250 \ {Open with VYM} 251 \ vym %f &, 252 253 " MD5 254 filetype *.md5 255 \ {Check MD5 hash sum} 256 \ md5sum -c %f %S, 257 258 " SHA1 259 filetype *.sha1 260 \ {Check SHA1 hash sum} 261 \ sha1sum -c %f %S, 262 263 " SHA256 264 filetype *.sha256 265 \ {Check SHA256 hash sum} 266 \ sha256sum -c %f %S, 267 268 " SHA512 269 filetype *.sha512 270 \ {Check SHA512 hash sum} 271 \ sha512sum -c %f %S, 272 273 " GPG signature 274 filetype *.asc 275 \ {Check signature} 276 \ !!gpg --verify %c, 277 278 " Torrent 279 filetype *.torrent ktorrent %f & 280 fileviewer *.torrent dumptorrent -v %c 281 282 " FuseZipMount 283 filetype *.zip,*.jar,*.war,*.ear,*.oxt,*.apkg 284 \ {Mount with fuse-zip} 285 \ FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR, 286 \ {View contents} 287 \ zip -sf %c | less, 288 \ {Extract here} 289 \ tar -xf %c, 290 fileviewer *.zip,*.jar,*.war,*.ear,*.oxt zip -sf %c 291 292 " ArchiveMount 293 filetype *.tar,*.tar.bz2,*.tbz2,*.tgz,*.tar.gz,*.tar.xz,*.txz 294 \ {Mount with archivemount} 295 \ FUSE_MOUNT|archivemount %SOURCE_FILE %DESTINATION_DIR, 296 fileviewer *.tgz,*.tar.gz tar -tzf %c 297 fileviewer *.tar.bz2,*.tbz2 tar -tjf %c 298 fileviewer *.tar.txz,*.txz xz --list %c 299 fileviewer *.tar tar -tf %c 300 301 " Rar2FsMount and rar archives 302 filetype *.rar 303 \ {Mount with rar2fs} 304 \ FUSE_MOUNT|rar2fs %SOURCE_FILE %DESTINATION_DIR, 305 fileviewer *.rar unrar v %c 306 307 " IsoMount 308 filetype *.iso 309 \ {Mount with fuseiso} 310 \ FUSE_MOUNT|fuseiso %SOURCE_FILE %DESTINATION_DIR, 311 312 " SshMount 313 filetype *.ssh 314 \ {Mount with sshfs} 315 \ FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR %FOREGROUND, 316 317 " FtpMount 318 filetype *.ftp 319 \ {Mount with curlftpfs} 320 \ FUSE_MOUNT2|curlftpfs -o ftp_port=-,,disable_eprt %PARAM %DESTINATION_DIR %FOREGROUND, 321 322 " Fuse7z and 7z archives 323 filetype *.7z 324 \ {Mount with fuse-7z} 325 \ FUSE_MOUNT|fuse-7z %SOURCE_FILE %DESTINATION_DIR, 326 fileviewer *.7z 7z l %c 327 328 " Office files 329 filextype *.odt,*.doc,*.docx,*.xls,*.xlsx,*.odp,*.pptx libreoffice %f & 330 fileviewer *.doc catdoc %c 331 fileviewer *.docx docx2txt.pl %f - 332 333 " TuDu files 334 filetype *.tudu tudu -f %c 335 336 " Qt projects 337 filextype *.pro qtcreator %f & 338 339 " Directories 340 filextype */ 341 \ {View in thunar} 342 \ Thunar %f &, 343 344 " Syntax highlighting in preview 345 " 346 " Explicitly set highlight type for some extensions 347 " 348 " 256-color terminal 349 " fileviewer *.[ch],*.[ch]pp highlight -O xterm256 -s dante --syntax c %c 350 " fileviewer Makefile,Makefile.* highlight -O xterm256 -s dante --syntax make %c 351 " 352 " 16-color terminal 353 " fileviewer *.c,*.h highlight -O ansi -s dante %c 354 " 355 " Or leave it for automatic detection 356 " 357 " fileviewer *[^/] pygmentize -O style=monokai -f console256 -g 358 359 " Displaying pictures in terminal 360 " 361 " fileviewer *.jpg,*.png shellpic %c 362 363 " Open all other files with default system programs (you can also remove all 364 " :file[x]type commands above to ensure they don't interfere with system-wide 365 " settings). By default all unknown files are opened with 'vi[x]cmd' 366 " uncommenting one of lines below will result in ignoring 'vi[x]cmd' option 367 " for unknown file types. 368 " For *nix: 369 " filetype * xdg-open 370 " For OS X: 371 " filetype * open 372 " For Windows: 373 " filetype * start, explorer 374 375 " ------------------------------------------------------------------------------ 376 377 " What should be saved automatically between vifm runs 378 " Like in previous versions of vifm 379 " set vifminfo=options,filetypes,commands,bookmarks,dhistory,state,cs 380 " Like in vi 381 set vifminfo=dhistory,savedirs,chistory,state,tui,shistory, 382 \phistory,fhistory,dirstack,registers,bookmarks,bmarks 383 384 " ------------------------------------------------------------------------------ 385 386 " Examples of configuring both panels 387 388 " Customize view columns a bit (enable ellipsis for truncated file names) 389 " 390 " set viewcolumns=-{name}..,6{}. 391 392 " Filter-out build and temporary files 393 " 394 " filter! /^.*\.(lo|o|d|class|py[co])$|.*~$/ 395 396 " ------------------------------------------------------------------------------ 397 398 " Sample mappings 399 400 " Start shell in current directory 401 nnoremap s :shell<cr> 402 403 " Display sorting dialog 404 nnoremap S :sort<cr> 405 406 " Toggle visibility of preview window 407 nnoremap w :view<cr> 408 vnoremap w :view<cr>gv 409 410 " Open file in existing instance of gvim 411 nnoremap o :!gvim --remote-tab-silent %f<cr> 412 " Open file in new instance of gvim 413 nnoremap O :!gvim %f<cr> 414 415 " Open file in the background using its default program 416 nnoremap gb :file &<cr>l 417 418 " Yank current directory path into the clipboard 419 nnoremap yd :!echo %d | xclip %i<cr> 420 421 " Yank current file path into the clipboard 422 nnoremap yf :!echo %c:p | xclip %i<cr> 423 424 " Mappings for faster renaming 425 nnoremap I cw<c-a> 426 nnoremap cc cw<c-u> 427 nnoremap A cw 428 429 " Open console in current directory 430 nnoremap ,t :!xterm &<cr> 431 432 " Open editor to edit vifmrc and apply settings after returning to vifm 433 nnoremap ,c :write | edit $MYVIFMRC | restart<cr> 434 " Open gvim to edit vifmrc 435 nnoremap ,C :!gvim --remote-tab-silent $MYVIFMRC &<cr> 436 437 " Toggle wrap setting on ,w key 438 nnoremap ,w :set wrap!<cr> 439 440 " Example of standard two-panel file managers mappings 441 nnoremap <f3> :!less %f<cr> 442 nnoremap <f4> :edit<cr> 443 nnoremap <f5> :copy<cr> 444 nnoremap <f6> :move<cr> 445 nnoremap <f7> :mkdir<space> 446 nnoremap <f8> :delete<cr> 447 448 " ------------------------------------------------------------------------------ 449 450 " Various customization examples 451 452 " Use ag (the silver searcher) instead of grep 453 " 454 " set grepprg='ag --line-numbers %i %a %s' 455 456 " Add additional place to look for executables 457 " 458 " let $PATH = $HOME.'/bin/fuse:'.$PATH 459 460 " Block particular shortcut 461 " 462 " nnoremap <left> <nop> 463 464 " Export IPC name of current instance as environment variable and use it to 465 " communicate with the instance later. 466 " 467 " It can be used in some shell script that gets run from inside vifm, for 468 " example, like this: 469 " vifm --server-name "$VIFM_SERVER_NAME" --remote +"cd '$PWD'" 470 " 471 " let $VIFM_SERVER_NAME = v:servername