vifm: Improve file preview for tabular data

Slightly improved display of csv files and added tsv to same preview.
Added nice previews for json and excel files.
This commit is contained in:
Marty Oehme 2023-12-12 12:21:59 +01:00
parent b0bcb9dd60
commit 8c9a233a8b
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -215,7 +215,7 @@ set viewcolumns=-{name}..,6{}.
" Filter-out build and temporary files
"
" filter! /^.*\.(lo|o|d|class|py[co])$|.*~$/
filter! /^.*\.(lo|o|d|class|py[co])$|.*~$/
" }}}
" Mappings {{{
@ -471,13 +471,17 @@ filetype *.sqlite,*.db
\ sqlite3 %f,
" tabular data
filextype *.csv
filextype *.csv, *.xlsx, *.tsv, *.json
\ {Open with visidata}
\ vd %f,
fileviewer *.csv
\ tidy-viewer
fileviewer *.tsv,*.csv
\ tidy-viewer --color-always --title %c
" \ xsv sample 100 %c | xsv table -c8 -p1 -w1,
" \ {cat %c | sed -e 's/,,/, ,/g' | column -s, -t | less -#5 -N -S; }
fileviewer *.xlsx
\ xlsx2csv %c | tidy-viewer --color-always --title %c
fileviewer *.json
\ jq '.' --color-output %c
" Mindmap
filextype *.vym