vifmrc cleanup

This commit is contained in:
Luke Smith 2019-03-21 17:24:49 -04:00
parent 08a9db0554
commit 7e72b8cf60

View file

@ -1,6 +1,21 @@
" vim: filetype=vifm " vim: filetype=vifm
source ~/.config/vifm/vifmshortcuts source ~/.config/vifm/vifmshortcuts
set vicmd=$EDITOR
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 luke
map <C-h> <C-w>h map <C-h> <C-w>h
map <C-j> <C-w>j map <C-j> <C-w>j
map <C-k> <C-w>k map <C-k> <C-w>k
@ -11,142 +26,50 @@ map <C-v> <C-w>v
map R :restart<CR> map R :restart<CR>
map x :!sxiv -ft * 2>/dev/null &<CR> map x :!sxiv -ft * 2>/dev/null &<CR>
nnoremap o :file &<cr>l nnoremap o :file &<cr>
map E :!$EDITOR %f<CR> map E :!$EDITOR %f<CR>
map mkd :mkdir<space> map mkd :mkdir<space>
map bg :!setbg %f &<CR> map bg :!setbg %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>
nmap <space> tj nmap <space> tj
nmap q ZQ nmap q ZQ
fileviewer *.html,*.css,*.py,*.c,*.h,*.sh,*.diff,*.tex,*.md highlight -O ansi %c
fileview */ tree %c -L 1 --dirsfirst fileview */ tree %c -L 1 --dirsfirst
fileview ../ tree %c -L 1 --dirsfirst fileview ../ tree %c -L 1 --dirsfirst
fileviewer *md,*xml,*.css,*.py,*.c,*.h,*.sh,*.diff,*.tex,*.md,*.bib,*.sty,*.desktop highlight -O ansi %c
set vicmd=$EDITOR fileviewer *.html w3m -dump %c
filextype *.html,*.htm firefox %f 2>/dev/null &
fileviewer *.docx docx2txt %c - fileviewer *.docx docx2txt %c -
filetype *.csv,*.xlsx sc-im %c filetype *.csv,*.xlsx sc-im %c
fileviewer *.csv sed "s/,,,,/,,-,,/g;s/,,/ /g" %c | column -t | sed "s/ - / /g" | cut -c -%pw
set syscalls filetype *.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus mpv --no-audio-display --input-ipc-server=/tmp/mpvsoc$(date +%%s) %c
set nofollowlinks
set sortnumbers
set undolevels=100
colorscheme luke
set wildmenu
set wildstyle=popup
" Display suggestions in normal, visual and view modes for keys, marks and
" registers (at most 5 files). In other view, when available.
set suggestoptions=normal,visual,view,otherpane,keys,marks,registers
set ignorecase
set smartcase
set nohlsearch
set incsearch
" Try to leave some space from cursor to upper/lower border in lists
set scrolloff=4
" Don't do too many requests to slow file systems
if !has('win')
set slowfs=curlftpfs
endif
" Set custom status line look
" :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
filextype *.pdf,*.ps,*.eps,*.ps.gz,*.djvu zathura %f 2>/dev/null &, filextype *.pdf,*.ps,*.eps,*.ps.gz,*.djvu zathura %f 2>/dev/null &,
fileviewer *.pdf pdftotext -l 1 -nopgbrk %c - fileviewer *.pdf pdftotext -l 1 -nopgbrk %c -
fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.qt,*.divx,*.as[fx],*mp3,*.flac mediafile %c
" Audio
filetype *.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus mpv --no-audio-display --input-ipc-server=/tmp/mpvsoc$(date +%%s) %c
fileviewer *.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus mediainfo %c
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 --input-ipc-server=/tmp/mpvsoc$(date +%%s) %f 2>/dev/null &, 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 --input-ipc-server=/tmp/mpvsoc$(date +%%s) %f 2>/dev/null &,
"fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,*.as[fx],*mp3,*.flac echo %c is a video file.
fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob, *.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx vifmimg videopreview %px %py %pw %ph %c %pc vifmimg clear
fileview *.zip,*.rar,*.tar.gz atool -l %f fileview *.zip,*.rar,*.tar.gz atool -l %f
filetype *.zip,*.rar,*.tar.gz ext %f
filextype *.html,*.htm firefox %f 2>/dev/null &
filetype *.o nm %f | less
filetype *.[1-8] man ./%c
fileviewer *.[1-8] man ./%c | col -b fileviewer *.[1-8] man ./%c | col -b
filetype *.[1-8] man ./%c
fileviewer *.jpg,*.jpeg,*.png,*.ico vifmimg draw %px %py %pw %ph %c %pc vifmimg clear
filextype *.bmp,*.jpg,*.jpeg,*.png,*.ico,*.gif,*.xpm rotdir %f 2>/dev/null | sxiv -ia 2>/dev/null &
filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm rotdir %f 2>/dev/null | sxiv -ia 2>/dev/null &
"fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm file %f
fileviewer *.jpg,*.jpeg,*.png
\ vifmimg draw %px %py %pw %ph %c
\ %pc
\ vifmimg clear
filextype *.svg inkscape %f 2>/dev/null & filextype *.svg inkscape %f 2>/dev/null &
filextype *.xcf gimp %f 2>/dev/null & filextype *.xcf gimp %f 2>/dev/null &
" MD5 set vifminfo=dhistory,chistory,tui,shistory,phistory,fhistory,dirstack,registers,bookmarks,bmarks
filetype *.md5
\ {Check MD5 hash sum}
\ md5sum -c %f %S,
" SHA1
filetype *.sha1
\ {Check SHA1 hash sum}
\ sha1sum -c %f %S,
" SHA256
filetype *.sha256
\ {Check SHA256 hash sum}
\ sha256sum -c %f %S,
" SHA512
filetype *.sha512
\ {Check SHA512 hash sum}
\ sha512sum -c %f %S,
" GPG signature
filetype *.asc
\ {Check signature}
\ !!gpg --verify %c,
set vifminfo=dhistory,chistory,tui,shistory,
\phistory,fhistory,dirstack,registers,bookmarks,bmarks
" Start shell in current directory
nnoremap s :shell<cr>
" Toggle visibility of preview window
nnoremap w :view<cr>
vnoremap w :view<cr>gv
" Yank current directory path into the clipboard
nnoremap yd :!echo %d | xclip %i<cr>
" Yank current file path into the clipboard
nnoremap yf :!echo %c:p | xclip %i<cr>
nnoremap I cw<c-a>
nnoremap cc cw<c-u>
nnoremap A cw
" Open editor to edit vifmrc and apply settings after returning to vifm
nnoremap ,c :write | edit $MYVIFMRC | restart<cr>
" Toggle wrap setting on ,w key
nnoremap ,w :set wrap!<cr>