dotfiles

My collection of dotfiles
git clone git://git.noxz.tech/dotfiles
Log | Files | Refs

vifmrc (5029B)


      1 "" have a look : https://github.com/xaizek/dotvifm/blob/master/colors/near-default.vifm
      2 
      3 " color scheme
      4 colorscheme Default
      5 
      6 " don't show side borders ('s'), and don't show margins
      7 set tuioptions-=s
      8 set tuioptions-=p
      9 
     10 " vertical border
     11 set fillchars=vborder:" "
     12 
     13 " view columns
     14 set viewcolumns=-{name}..,6{size},11{perms},-12{mtime}
     15 
     16 " line numbers
     17 set number
     18 set relativenumber
     19 
     20 " wildmenu
     21 set wildmenu
     22 set wildstyle=popup
     23 
     24 " hide parent dir, and use right pane for preview
     25 set dotdirs=""
     26 "set millerview
     27 "set milleroptions=lsize:2,csize:5
     28 fileviewer */,.*/,../
     29     \ [ -z "$(find %c -maxdepth 0 -empty)" ]
     30     \ && ls --group-directories-first --color %c 2>&1 | sed -e 's/^/ /'
     31     \ || echo -e " empty directory..."
     32 nnoremap w :view<cr>
     33 view
     34 
     35 " set classify "icons" (prefix:class:sufix)
     36 set classify=""
     37 
     38 " highlight files
     39 highlight Directory         cterm=bold      ctermfg=blue        ctermbg=default
     40 highlight Link              cterm=none      ctermfg=yellow      ctermbg=default
     41 highlight BrokenLink        cterm=none      ctermfg=red         ctermbg=default
     42 highlight Socket            cterm=none      ctermfg=magenta     ctermbg=default
     43 highlight Device            cterm=none      ctermfg=red         ctermbg=default
     44 highlight Fifo              cterm=none      ctermfg=cyan        ctermbg=default
     45 highlight Executable        cterm=bold      ctermfg=10          ctermbg=default
     46 highlight /(.ff.gz|.ff|.bmp|.jpg|.jpeg|.png|,gif|.xpm|.svg)$/
     47     \                       cterm=bold      ctermfg=6           ctermbg=default
     48 highlight /(.pdf|.ps)$/
     49     \                       cterm=bold      ctermfg=6           ctermbg=default
     50 highlight /(.tar.gz|.tar|.zip)$/
     51     \                       cterm=bold      ctermfg=red         ctermbg=default
     52 
     53 " open images with sxiv (in background)
     54 filextype *.ff,*.ff.gz,*.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
     55     \ sxiv %c 2>/dev/null &
     56 " open current file in sxiv (TODO :: if %c is not dir, take it's dir)
     57 nnoremap ,p :!sxiv -t %c 2>/dev/null &<cr>
     58 
     59 " open pdf and ps with zathura (in background)
     60 filextype *.pdf,*.ps
     61     \ zathura %c 2>/dev/null &
     62 
     63 " send media to mpvd (in bakground)
     64 filextype *.avi,*.mp3,*.mp4,*.wmv,*.dat,*.3gp,*.ogg,*.ogv,*.mkv,*.mpg,*.mpeg,
     65     \ *.vob,*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,
     66     \ mpvc load %c 2>/dev/null &
     67 
     68 fileviewer *.zip        unzip -Z1 %c | fold -w $((%pw-1)) | sed -e 's/^/ /'
     69 fileviewer *.tar        tar -tf %c | fold -w $((%pw-1)) | sed -e 's/^/ /'
     70 fileviewer *.tar.gz     tar -ztf %c | fold -w $((%pw-1)) | sed -e 's/^/ /'
     71 
     72 fileviewer *.pdf
     73     \ vifmimg pdfpreview %px %py %pw %ph %c
     74     \ %pc
     75     \ vifmimg clear
     76 fileviewer *.epub
     77     \ vifmimg epubpreview %px %py %pw %ph %c
     78     \ %pc
     79     \ vifmimg clear
     80 fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
     81     \ *.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,
     82     \ vifmimg videopreview %px %py %pw %ph %c
     83     \ %pc
     84     \ vifmimg clear
     85 fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.xpm
     86     \ vifmimg draw %px %py %pw %ph %c
     87     \ %pc
     88     \ vifmimg clear
     89 fileviewer *.svg,*.ico
     90     \ vifmimg drawmagick %px %py %pw %ph %c
     91     \ %pc
     92     \ vifmimg clear
     93 fileviewer *.ff,*.ff.xz,*.ff.gz,*.ff.bz
     94     \ vifmimg drawff %px %py %pw %ph %c
     95     \ %pc
     96     \ vifmimg clear
     97 fileviewer *.gif
     98     \ vifmimg gifpreview %px %py %pw %ph %c
     99     \ %pc
    100     \ vifmimg clear
    101 
    102 " disable preview of binary files (or files not yet handled)
    103 fileviewer *
    104     \ grep -P "[^\x00-\x7F]" %c 2>&1 >/dev/null
    105     \ && mediainfo %c
    106     \ || cat %c | sed -e "s/\t/    /g" | fold -w $((%pw-1)) | sed -e 's/^/ /'
    107 
    108 " time format
    109 set timefmt="%Y-%m-%d %H:%M"
    110 
    111 " ruler
    112 set rulerformat='%2l/%S%[ (+%x)%]'
    113 
    114 " status line
    115 highlight User1 cterm=none  ctermfg=6   ctermbg=5
    116 highlight User2 cterm=none  ctermfg=5   ctermbg=6
    117 let &statusline  = "%2* %t"     " file name
    118 let &statusline .= " %1* "     " left separator
    119 let &statusline .= "%= "        " fill the whole status line
    120 let &statusline .= "%1*"       " right separator
    121 let &statusline .= " %A "       " file attributes
    122 let &statusline .= "%1*"       " right separator
    123 let &statusline .= " %7u:%-7g " " user and group owners of the file
    124 let &statusline .= "%1*"       " right separator
    125 let &statusline .= " %-5s "     " human readable file size
    126 let &statusline .= " %1*%2* "  " right separator
    127 let &statusline .= " %d "       " file modification date and time
    128 
    129 
    130 " bring up sort menu
    131 nmap s :sort<cr>
    132 nmap w :view<cr>
    133 nmap S :shell<cr>
    134 
    135 " set selected file as wallpaper
    136 nmap ,W :!echo %c:p | set-wallpaper &<cr>
    137 
    138 " fzf integration
    139 command! fzffind
    140     \   :set noquickview
    141     \ | :execute 'goto "'.system('find \( -name ".*" -or -name "*" \)
    142     \ | fzf
    143         \ --layout="reverse-list"
    144         \ --height=100
    145         \ --preview="grep -sq -P ''[^\x00-\x7F]'' {}
    146             \ && echo binary file: {}
    147             \ || cat {}"
    148         \ --preview-window="right:70%%:wrap"
    149         \ 2>/dev/tty').'"%IU'
    150     \ | :set quickview
    151     \ | redraw
    152 nnoremap <c-f> :fzffind<cr>
    153 
    154 " icons
    155 set classify='» :dir:/'