-
Notifications
You must be signed in to change notification settings - Fork 0
/
vifmrc
152 lines (100 loc) · 2.67 KB
/
vifmrc
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
""" Settings
" show relative line numbers
set rnu
" use trash
set trash
" keep 100 lines of history
set history=100
" follow links
set followlinks
" make partial commands work
set fastrun
" sort versions naturally
set sortnumbers
" allow up to 100 undos
set undolevels=100
" use vim-style help
set vimhelp
" do not run executable files on open
set norunexec
" do not print human readable filesizes, I am a robot
set noiec
" directory for root mounts
set fusehome="~/vifm/fuse/"
" mounting options that are too slow
set slowfs=curlftpfs
" timeformat template
set timefmt=" %m/%d %H:%M"
" use popup autocompletion
set wildmenu
" ignore case when searching unless caps are included
set ignorecase smartcase
" do not automatically select search items
" different from vim, still does highlighting
set nohlsearch
" search from current position
set incsearch
" lines to keep around the cursor
set scrolloff=4
" status line template
set statusline=" %t%= %A %10u:%-7g %15s %20d "
" save everything in $VIFM/vifminfo
set vifminfo=bookmarks,tui,state,cs,savedirs,dhistory,chistory,shistory,phistory,fhistory,dirstack,registers
" do not show ../
set dotdirs=none
" use tab to switch active pane (legacy behaviour)
set cpoptions-=t
" automatically hide filenames on entering a directory
autocmd DirEnter * :filter
colorscheme gruvbox
""" Bookmarks
mark b /usr/local/bin/
mark d ~/Downloads
" mnemonic: files
mark f ~/docs
mark F ~/.vifm
mark p ~/prog
mark i ~/img
mark m ~/music
mark t ~/.local/share/vifm/Trash
mark v ~/.vim
mark V ~/Videos
" mnemonic: home
mark h ~/
" mnemonic: root
mark r /
""" Commands
" sorry nothing
""" Mappings
" open a shell
nmap s :shell<cr>
" change sort method
nmap S :sort<cr>
" view the current file using the extension-specific file viewer
nmap w :view<cr>
" alternative for jumping to bookmarks (picked this up from vimperator)
nmap go '
" change the full filename
nmap cc cw<c-u>
" go to home
nmap ~ :cd ~<cr>
""" Filetypes
" pdf
filetype *.pdf,*.epub zathura %f &> /dev/null &
" audio
filetype *.wav,*.mp3,*.flac,*.ogg,*.m4a mpv %f
fileviewer *.mp3 mp3info
" video
filextype *.avi,*.mp4,*.m4v,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.vob,*.flv,*.webm,*.mov
\ mpv %f &> /dev/null &,
fileviewer *.avi,*.mp4,*.m4v,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.vob,*.flv,*.web,*.mov
\ ffprobe -show_files -pretty %f 2> /dev/null
" web
filetype *.html,*.htm links,mozilla,brave %f %i &
" image
filetype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm,*.webp imv -s none %f
fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm convert -identify %f -verbose /dev/null
" office files
filextype *.rtf,*.doc,*.docx,*.xls,*.xlsx libreoffice %f &
" directory
fileview */ tree %f