From 8a5b45f41f2beb6ef705af6d9e16e21ab9246d2c Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 28 Jul 2020 18:15:26 +0200 Subject: [PATCH] vifm: Add doc|docx preview and nvim opening Added preview and opening of doc(x) files with nvim. Makes use of docx2txt, catdoc to display the files, meaning they are required. Added some spellchecking words. --- .gitignore | 6 ++++++ nvim/.config/nvim/spell/en.utf-8.add | 4 ++++ vifm/.config/vifm/scripts/README | 6 ++++++ vifm/.config/vifm/vifmrc | 4 +++- 4 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 vifm/.config/vifm/scripts/README diff --git a/.gitignore b/.gitignore index e213a5a..e3708a8 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,9 @@ sponsorblock.txt # ignore any just-in-time settings that took place in qutebrowser qutebrowser/.config/qutebrowser/autoconfig.yml + +# ignore vifm & ueberzug utility files +vifm-help.txt +vifmimgpdfpage +vifmimgpdffile +vifminfo diff --git a/nvim/.config/nvim/spell/en.utf-8.add b/nvim/.config/nvim/spell/en.utf-8.add index 4981a6f..1a1cac5 100644 --- a/nvim/.config/nvim/spell/en.utf-8.add +++ b/nvim/.config/nvim/spell/en.utf-8.add @@ -40,3 +40,7 @@ transnationalism heroization technologization Kyūshū +Qing +analyses +megaprojects +weaponization diff --git a/vifm/.config/vifm/scripts/README b/vifm/.config/vifm/scripts/README new file mode 100644 index 0000000..7694952 --- /dev/null +++ b/vifm/.config/vifm/scripts/README @@ -0,0 +1,6 @@ +This directory is dedicated for user-supplied scripts/executables. +vifm modifies its PATH environment variable to let user run those +scripts without specifying full path. All subdirectories are added +as well. File in a subdirectory overrules file with the same name +in parent directories. Restart might be needed to recognize files +in newly created or renamed subdirectories. \ No newline at end of file diff --git a/vifm/.config/vifm/vifmrc b/vifm/.config/vifm/vifmrc index dde57e1..704fda8 100644 --- a/vifm/.config/vifm/vifmrc +++ b/vifm/.config/vifm/vifmrc @@ -334,8 +334,10 @@ fileviewer *.7z 7z l %c " Office files filextype *.odt,*.doc,*.docx,*.xls,*.xlsx,*.odp,*.pptx libreoffice %f & +fileviewer *.doc catdoc %c | nvim fileviewer *.doc catdoc %c -fileviewer *.docx docx2txt.pl %f - +filextype *.docx docx2txt %f - | nvim +fileviewer *.docx docx2txt %f - " TuDu files filetype *.tudu tudu -f %c