-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvifmrc
185 lines (137 loc) · 5.26 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
" vim: filetype=vifm :
" You can edit this file by hand.
" The " character at the beginning of a line comments out the line.
" Blank lines are ignored.
" The basic format for each item is shown with an example.
" This is the actual command used to start vi. The default is vim.
" If you would like to use another vi clone such Elvis or Vile
" you will need to change this setting.
set vicmd=vim
" set vicmd=elvis\ -G\ termcap
" set vicmd=vile
" Trash Directory
" The default is to move files that are deleted with dd or :d to
" the trash directory. If you change this you will not be able to move
" files by deleting them and then using p to put the file in the new location.
" I recommend not changing this until you are familiar with vifm.
" This probably shouldn't be an option.
set trash
" This is how many directories to store in the directory history.
set history=15
" Follow links on l or Enter.
set followlinks
" With this option turned on you can run partially entered commands with
" unambiguous beginning using :! (e.g. :!Te instead of :!Terminal or :!Te<tab>).
set fastrun
" Natural sort of (version) numbers within text.
set sortnumbers
" Maximum number of changes that can be undone.
set undolevels=100
" If you installed the vim.txt help file set vimhelp.
" If would rather use a plain text help file set novimhelp.
set novimhelp
" If you would like to run an executable file when you
" press return on the file name set this.
set norunexec
" Use KiB, MiB, ... instead of KB, MB, ...
set iec
" Selected color scheme
colorscheme Default
" The FUSE_HOME directory will be used as a root dir for all FUSE mounts.
" Unless it exists with write/exec permissions set, vifm will attempt to
" create it.
set fusehome=/tmp/vifm_FUSE
" Format for displaying time in file list. For example:
" TIME_STAMP_FORMAT=%m/%d-%H:%M
" See man date or man strftime for details.
set timefmt=%m/%d\ %H:%M
" :mark mark /full/directory/path [filename]
mark b ~/bin/
" :com[mand] command_name action
" The following macros can be used in a command
" %a is replaced with the user arguments.
" %c the current file under the cursor.
" %C the current file under the cursor in the other directory.
" %f the current selected file, or files.
" %F the current selected file, or files in the other directory.
" %b same as %f %F.
" %d the current directory name.
" %D the other window directory name.
" %m run the command in a menu window
command df df -h %m 2> /dev/null
command diff vim -d %f %F
command zip zip -r %f.zip %f
command run !! ./%f
command make !!make
command vgrep vim "+grep %a"
" The file type is for the default programs to be used with
" a file extension.
" :filetype pattern1,pattern2 defaultprogram,program2
" :fileviewer pattern1,pattern2 consoleviewer
" The other programs for the file type can be accessed with the :file command
" The command macros %f, %F, %d, %F may be used in the commands.
" The %a macro is ignored. To use a % you must put %%.
" Pdf
filetype *.pdf apvlv %f &
" Mp3
filetype *.mp3 ffplay %f
fileviewer *.mp3 ffprobe -show_format -pretty %f 2> /dev/null
" Video
filetype *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv dragon %f
fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv ffprobe -show_format -pretty %f 2> /dev/null
" Web
filetype *.html,*.htm links,mozilla
" Object
filetype *.o nm %f | less
" Image
filetype *.jpg,*.jpeg,*.png,*.gif feh --scale-down %c &
" Md5
filetype *.md5 md5sum -c %f
" FuseZipMount
filetype *.zip,*.jar,*.war,*.ear FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR
fileviewer *.zip,*.jar,*.war,*.ear zip -sf %c
" ArchiveMount
filetype *.bz2,*.tgz,*.tar.gz FUSE_MOUNT|archivemount %SOURCE_FILE %DESTINATION_DIR
fileviewer *.bz2,*.tgz,*.tar.gz tar -tzf %c
" Rar2FsMount
filetype *.rar FUSE_MOUNT|rar2fs %SOURCE_FILE %DESTINATION_DIR
" IsoMount
filetype *.iso FUSE_MOUNT|fuseiso %SOURCE_FILE %DESTINATION_DIR
" SshMount
filetype *.ssh FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR
" For automated FUSE mounts, you must register an extension with FILETYPE=..
" in one of following formats:
"
" :filetype extensions FUSE_MOUNT|some_mount_command using %SOURCE_FILE and %DESTINATION_DIR variables
" %SOURCE_FILE and %DESTINATION_DIR are filled in by vifm at runtime.
" A sample line might look like this:
" :filetype *.zip,*.jar,*.war,*.ear FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR
"
" :filetype extensions FUSE_MOUNT2|some_mount_command using %PARAM and %DESTINATION_DIR variables
" %PARAM and %DESTINATION_DIR are filled in by vifm at runtime.
" A sample line might look like this:
" :filetype *.ssh FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR
" %PARAM value is filled from the first line of file (whole line).
" Example first line for SshMount filetype: [email protected]:/
"
" You can also add %CLEAR if you want to clear screen before running FUSE
" program.
" What should be saved automatically between vifm runs
" Like in previous versions of vifm
" set vifminfo=options,filetypes,commands,bookmarks,dhistory,state,cs
" Like in vi
set vifminfo=bookmarks
" Sample mappings
nmap s :shell<cr>
nmap S :sort<cr>
nmap w :view<cr>
nmap o :!gvim --remote-tab-silent %f<cr>
nmap O :!gvim %f<cr>
" open file in the background using its default program
nmap gb :file &<cr>l
nmap <f3> :!less %f<cr>
nmap <f4> :edit<cr>
nmap <f5> :copy<cr>
nmap <f6> :move<cr>
nmap <f7> :mkdir<space>
nmap <f8> :delete<cr>