From a2d60202b935722e9f00b7c909df6c74e2976b34 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 19 Apr 2024 11:33:33 +0200 Subject: [PATCH] vifm: Fix tabular data visidata opening and preview Tabular data was only opened in visidata if it was a csv file, now we also correctly open xlsx, tsv, and even json files. Also do not display an extra file title in the tabular previewer since we already know which file we are pointing at to gain some space. --- terminal/.config/vifm/vifmrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/terminal/.config/vifm/vifmrc b/terminal/.config/vifm/vifmrc index 61ba557..b5443b1 100644 --- a/terminal/.config/vifm/vifmrc +++ b/terminal/.config/vifm/vifmrc @@ -470,11 +470,11 @@ filetype *.sqlite,*.db \ sqlite3 %f, " tabular data -filextype *.csv, *.xlsx, *.tsv, *.json +filetype *.csv,*.xlsx,*.tsv,*.json \ {Open with visidata} \ vd %f, fileviewer *.tsv,*.csv - \ tidy-viewer --color-always --title %c + \ tidy-viewer --color-always %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