vifm: Add alt file opening, option cycling mappings

Added cycling through (command mode) options with C-p/C-n since
I am used to doing this.

Added a quick short mapping to `o` to show all file openers
defined for the current file and be able to select one.
This commit is contained in:
Marty Oehme 2023-12-04 08:42:56 +01:00
parent 5941f6f77a
commit 80f2afb1cf
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -1,4 +1,4 @@
" vim: filetype=vifm : set foldmethod=marker foldlevel=0 nomodeline: " vim: filetype=vim : set foldmethod=marker foldlevel=0 nomodeline:
" Sample configuration file for vifm (last updated: 20 July, 2018) " Sample configuration file for vifm (last updated: 20 July, 2018)
" You can edit this file by hand. " You can edit this file by hand.
" The " character at the beginning of a line comments out the line. " The " character at the beginning of a line comments out the line.
@ -227,12 +227,15 @@ nmap Q :q<cr>
" Sample mappings " Sample mappings
" for now they use space for my leader key - so we can't switch panels with " for now they use space for my leader key - so we can't switch panels with
" space, use tab for that " space, use tab for that
"nnoremap <space> <nop> nmap <space> <nop>
nnoremap <space><space> <space> nnoremap <space><space> <nop>
" switch pane with tab, like cpoption did " switch pane with tab, like cpoption did
nnoremap <tab> <c-w>w nnoremap <tab> <c-w>w
" scroll through command-line options with C-p/C-n
cnoremap <c-p> <s-tab>
cnoremap <c-n> <tab>
" Start shell in current directory " Start shell in current directory
nnoremap s :shell<cr> nnoremap s :shell<cr>
@ -274,6 +277,9 @@ nnoremap cW cw
" esc quits out of preview mode (it does in vim, why not here?) " esc quits out of preview mode (it does in vim, why not here?)
qnoremap <esc> q qnoremap <esc> q
" quickly show alternative file opening applications
nnoremap o :file <tab>
" Select file and jump in the indicated direction " Select file and jump in the indicated direction
nnoremap J tj nnoremap J tj
nnoremap K tk nnoremap K tk
@ -361,12 +367,13 @@ source $VIFM/favicons.vifm
" program. " program.
" Pdf " Pdf
filextype *.pdf filextype <application/pdf>,*.pdf
\ { view as rich file } \ { view as rich file }
\ sioyek %c %i, zathura %c %i &, apvlv %c, xpdf %c, \ sioyek %c %i, zathura %c %i &, apvlv %c, xpdf %c,
\ { edit text content } \ { edit text content }
\ pdftotext -nopgbrk %c - | nvim \ pdftotext -nopgbrk %c - | nvim
fileviewer *.pdf pdftotext -nopgbrk %c - filextype <application/pdf>,*.pdf
\ pdftotext -nopgbrk %c -
" PostScript " PostScript
filextype *.ps,*.eps,*.ps.gz filextype *.ps,*.eps,*.ps.gz
@ -458,6 +465,11 @@ filextype *.ora
\ {Edit in MyPaint} \ {Edit in MyPaint}
\ mypaint %f, \ mypaint %f,
" OpenRaster
filetype *.sqlite,*.db
\ {Edit in sqlite3}
\ sqlite3 %f,
" tabular data " tabular data
filextype *.csv filextype *.csv
\ {Open with visidata} \ {Open with visidata}