0

I'm running vim // gvim 8.2 (fresh off of vim.org, and was before---just re-installed to do so as administrator, per instructions I'd missed before).

I've been getting this since getting this Windows 10 running Windows 10 + Cygwin. I also tried sending these via email to vim@vim.org (after joining) but both bounced, so I gather that's gone.

Ok, here's what's going on. I use !!foo a LOT, e.g., !!sort -u, !!stuff_for_calendar, etc. The problem is, I get the following instead (and nothing actually runs)---this is the version of the error in gvim (I got it working in normal vim while working through these examples):

shell returned 1

E485: Can't read file C:/Users/gamed/AppData/Local/Temp/VIolC9C.tmp

Note: /bin/zsh is /bin/zsh.exe and has permissions at 777 while working on this.

9
  • 1
    You are getting that no matter the shell comamnd you run? None of them should be using the Windows temp dir. What's the environment variable TMP set to? (:echo $TMP). Or actually Vim may be using that as it uses a temp file during filtering....same issue though...check envvars. And what do you have for 'shelltemp' setting? For that matter check all of the settings that start with "shell". – B Layer Jan 21 at 1:34
  • $TMP in zsh is set to /cygdrive/c/Users/gamed/AppData/Local/Temp which gvim uses. Setting it (and exporting it) does nothing...still uses the above. Note that, after fixing this issue (it was a zsh permissions problem thanks to M$) in vim, it's only gvim that's messed up now. – GTbrewer Jan 21 at 1:38
  • Personally, I have it set to c:\cygwin\tmp...can't remember at the moment if I did that for cosmetic reasons or for something more significant. – B Layer Jan 21 at 1:39
  • Oh, and yes, no matter what shell command I run. – GTbrewer Jan 21 at 1:43
  • Also, be on the lookout for my second question, about fileformats (I'd asked about it before, and it magically fixed itself. Well, it's back. I couldn't post it myself (40 minute rule) so it should post on its own sometime while I'm having dinner once that 40 minute limit is passed.. – GTbrewer Jan 21 at 1:46
0

Confusing....am I sure I want to answer my question? Thanks to the comment from Christian that led me straight to the answer, I am, yes!

I did the following in a zsh window:

export SHELL=C:/cygwin64/bin/zsh.exe

That fixed it. So I'll be adding that to my ~/.zprofile.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.