Plugin doesn't do anything when writing on openSUSE, but on MacOS it does
I found your fancy β€οΈ vim-plugin and use it on MacOS and on openSUSE (both are my main workstation(s) and servers):
On MacOS it behaves like this:
- π©
shellcheckon write (:w)
- π
shellcheckon demand (:Shellcheck!)
And on openSUSE it only works on demand:
- π
shellcheckon write (:w) (nothing happens at all!?) - π©
shellcheckon demand (:Shellcheck!)
My vim on MacOS:
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Sep 24 2021 06:02:32)
macOS version - x86_64
Included patches: 1-3455
Compiled by Homebrew
My vim on OpenSUSE:
VIM - Vi IMproved 8.0 (2016 Sep 12)
Included patches: 1-1568
Compiled by 'http://www.opensuse.org/'
I tried it also with a more current vim on openSUSE (8.2.4375-lp153.721.1), but this didn't make it better in any wayβ¦
shellcheck on write would be what I prefer. Can you @itspriddle please help what's wrong here? π€·π»ββοΈ Thanks a lot!
Hey @thomasmerz
Are you using any other listing plugins, such as syntastic? This plugin doesn't do anything on :w on its own (although you could add it with an autocmd BufWrite *.sh :ShellCheck!)
The other thing that stands out is the error from your macOS screenshot using :ShellCheck!. Behind the scenes, this plugin creates a temp file here, which has the contents of the current buffer (or highlighted text) written to it. This temp file is the one that actually has spellcheck -f gcc ... performed on it. The point this plugin is trying to run spellcheck the file is missing. I can't duplicate that on Vim 8.2p4400 from Homebrew on my M1 Macs running macOS 12.2.1 .
It feels like vim-spellcheck is indeed working as designed on your OpenSUSE box, but the temp file issue on macOS is definitely a weird issue I haven't seen myself.
Are you doing anything out of the ordinary with temp files/dirs on your Mac?
Regarding the tempfile:
I've set set directory=~/temp,. on both MacOS and openSUSE. But also with set directory=. or set directory= nothing changes with :ShellCheck! on π MacOS or on π© openSUSE.
On MacOS there's TMPDIR=/var/folders/89/t8gb_dhj0bl_fmcj76pxy4g80000gp/T/ set in my bash:
$ ll -d $TMPDIR
drwx------ Thomas.Merz staff 6.0 KB now ο /var/folders/89/t8gb_dhj0bl_fmcj76pxy4g80000gp/T/
Nothing like this on my openSUSEβ¦
That's really weird:
"/var/folders/89/t8gb_dhj0bl_fmcj76pxy4g80000gp/T/vsvCjOn/3-abc.sh: /var/folders/89/t8gb_dhj0bl_fmcj76pxy4g80000gp/T/vsvCjOn/3-abc.sh: openBinaryFile: does not exist (No such file or directory)" π€₯

Here are my vim-plugins on:
-
MacOS ο ack.vim/ ο aws-vim/ ο sudo.vim/ ο syntastic/ ο tabular/ ο vim-airline/ ο vim-airline-themes/ ο vim-better-whitespace/ ο vim-fugitive/ ο vim-gitgutter/ ο vim-gnupg/ ο vim-json/ ο vim-puppet/ ο vim-shellcheck/
-
openSUSE 22:08 $ ls -1d */ ο vim-airline/ ο vim-better-whitespace/ ο vim-fugitive/ ο vim-gitgutter/ ο vim-gnupg/ ο vim-shellcheck/
π© After adding syntastic also on openSUSE it works for me with :w to shellcheck also on openSUSE. Thank you for this "hint" π That's the way I like it ππ»
@itspriddle , have you any idea after my update?