summaryrefslogtreecommitdiffstats
path: root/.config/vifm/vifmrc
blob: 1fee1d1bda747b82a15fbff4dc56f52d8658ca50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
" vim: filetype=vifm
" source ~/.config/vifm/vifmshortcuts

set vicmd="nvim"
set shell=/usr/local/bin/dash
set syscalls
set nofollowlinks
set sortnumbers
set undolevels=100
set wildmenu
set wildstyle=popup
set scrolloff=4
set ignorecase
set smartcase
set nohlsearch
set incsearch
set suggestoptions=normal,visual,view,otherpane,keys,marks,registers
colorscheme gruvbox

map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <C-w>l
map <C-o> <C-w>o
map <C-s> <C-w>s
map <C-v> <C-w>v

map R :restart<CR>
map x :!sxiv -b -ft * 2>/dev/null &<CR>
nnoremap o :file &<cr>
map l :file <cr><cr>
map E :!nvim %f<CR>
map mkd :mkdir<space>
map bg :!setwp %f &<CR>
map X :!ext %f &<CR>
nnoremap S :shell<cr>
nnoremap w :view<cr>
vnoremap w :view<cr>gv
nnoremap yd :!echo %d | xclip %i<cr>
nnoremap yf :!echo %c:p | xclip %i<cr>
nnoremap I cw<c-a>
nnoremap cc cw<c-u>
nnoremap A cw
nnoremap ,w :set wrap!<cr>
nnoremap zh za
nmap <space> tj
nmap q ZQ
nnoremap <F2> :rename<CR>
nnoremap <F7> :mkdir<space>
map gh :cd ~/<CR>
map gr :cd /<CR>
map gm :cd /media<CR>

fileviewer */ exa -L 1 -T --color=always --group-directories-first %c
fileviewer ../ exa -L 1 -T --color=always --group-directories-first %c
fileviewer *.html w3m -dump %c
filextype *.html,*.htm {firefox} firefox %f >/dev/null 2>&1 &,
filextype *.html,*.htm {w3m} st -e w3m %f >/dev/null 2>&1 &,

fileviewer *.docx docx2txt %c -
fileviewer *.odt odt2txt %c -

fileviewer *.csv sed "s/,,,,/,,-,,/g;s/,,/ /g" %c | column -t | sed "s/ - /  /g" | cut -c -%pw
filetype *.csv,*.xlsx sc-im %c

fileviewer *.pdf pdftotext -l 1 -nopgbrk %c -
filextype *.pdf,*.ps,*.eps,*.ps.gz,*.djvu,*.epub zathura %f 2>/dev/null &,
fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.qt,*.divx,*.as[fx],*.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus file %c
filextype *.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus {mpv} st -e mpv --no-audio-display --audio-channels=stereo %f &,
filextype *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,*.as[fx] {mpv} mpv --fullscreen --really-quiet --audio-channels=stereo %f 2>/dev/null &,

fileviewer *.zip,*.rar,*.tar.gz atool -l %f
filetype *.zip,*.rar,*.tar.gz ext %f

fileviewer *.[1-8] man ./%c | col -b
filetype *.[1-8] man ./%c

fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.ico,*.gif,*.xpm file &c
filextype *.bmp,*.jpg,*.jpeg,*.png,*.ico,*.gif,*.xpm sxiv -b -ia %f 2>/dev/null &

filextype *.svg inkscape %f 2>/dev/null &
filextype *.xcf gimp %f 2>/dev/null &

set vifminfo=dhistory,chistory,tui,shistory,phistory,fhistory,dirstack,registers,bookmarks,bmarks

source /home/jozan/.local/packs/vifm_devicons/favicons.vifm