You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
E484: Can't open file c:\Users\username~\AppData\Local\Temp\VIo7EE2.tmp #86
call vundle#end()
filetype plugin indent on
" the glaive#Install() should go after the "call vundle#end()"
call glaive#Install()
" Optional: Enable codefmt's default mappings on the = prefix.
Glaive codefmt plugin[mappings]
Glaive codefmt google_java_executable="java -jar C:/Users/Balasubramanian/.vim/bundle/vim-glaive/google-java-format-VERSION-all-deps.jar"
`
Can the community please help me ? every time i have to format the code, i am using a Visual Code to format it and i have to switch back to Vim for coding.
I have also disabled my "RealTime Scanner" , even then, get the same issue.
You're saying this happens only when you have codefmt enabled? Hard for me to see how that would be related. If so, is there a more complete error you could paste?
So this triggers in particular when you run :FormatCode? Are there any other error details you can provide? Does it trigger the same sort of error if you run
@dbarnett
I encounter the same issue using GVim on Windows 10. Of your code snippets, the second one does work perfectly fine. I think the tmp file is either not being created correctly, or vim does not have permission to create the tmp file.
(can you confirm the first one does give you a E484 error?)
I believe from the details you've given that you can temporarily work around it by disabling syscall job support when you're using Windows 10 by adding this to your .vimrc:
:call maktaba#syscall#Create(['cat']).WithStdin('').Call()
Error detected while processing function maktaba#syscall#Call[3]..<SNR>112_DoSyscallCommon[16]..maktaba#function#Apply[1]..maktaba#function#Call[0]..maktaba#function#Call[13]..maktaba#syscall#DoCall:
line 5
E484: Can't open file C:\Users\<me>\AppData\Local\Temp\VIoFBAB.tmp
Second one does the flash, and no response
Third code snippet, I put in and get the same result after running :FormatCode Error formatting file: Vim(let):E484: Can't open file C:\Users\<me>\AppData\Local\Temp\VIoCD01.tmp
Ah, it makes sense that /bin/sh would be problematic on Windows. I filed google/vim-maktaba#215 with my understanding of the issue and a suggested workaround based on @kkkk9's solution (can you comment there if the other 'shell' and 'shellcmdflag' overrides are actually necessary? IIUC those are vim's defaults).
Activity
dbarnett commentedon Dec 4, 2017
You're saying this happens only when you have codefmt enabled? Hard for me to see how that would be related. If so, is there a more complete error you could paste?
jasonwangm commentedon Jun 3, 2018
I met with the same problem and have found no method to solve this issue.
dbarnett commentedon Jun 3, 2018
So this triggers in particular when you run
:FormatCode? Are there any other error details you can provide? Does it trigger the same sort of error if you runor
?
rachaeldawn commentedon Jun 7, 2018
@dbarnett
I encounter the same issue using GVim on Windows 10. Of your code snippets, the second one does work perfectly fine. I think the tmp file is either not being created correctly, or vim does not have permission to create the tmp file.
dbarnett commentedon Jun 7, 2018
So you see the same sort of error with the first one?
How about
and
?
rachaeldawn commentedon Jun 8, 2018
@dbarnett
First one responds with
1Second one flashes a window really quick and doesn't appear to do anything else.
If you need access to my machine, drop me a message and I'll get a TeamViewer session going. But for me it's super reproducible.
dbarnett commentedon Jun 8, 2018
Okay, so to summarize observations so far and give you some context, the gist of this bug seems to be that:
Sounds like you see an error with
but not with
(can you confirm the first one does give you a E484 error?)
I believe from the details you've given that you can temporarily work around it by disabling syscall job support when you're using Windows 10 by adding this to your .vimrc:
And then the remaining bit is to figure out whether it's a vim issue for Windows 10 or a maktaba issue.
rachaeldawn commentedon Jun 8, 2018
Result of first call
Second one does the flash, and no response
Third code snippet, I put in and get the same result after running
:FormatCodeError formatting file: Vim(let):E484: Can't open file C:\Users\<me>\AppData\Local\Temp\VIoCD01.tmpkkkk9 commentedon Jun 13, 2018
I think the problem is in maktaba's usable_shell.
I also met this problem,
my solution is:
change th code:
to
Alghouth the solution is ugly, but worked for me..(Win7, Vim8)
dbarnett commentedon Jun 24, 2018
Ah, it makes sense that /bin/sh would be problematic on Windows. I filed google/vim-maktaba#215 with my understanding of the issue and a suggested workaround based on @kkkk9's solution (can you comment there if the other
'shell'and'shellcmdflag'overrides are actually necessary? IIUC those are vim's defaults).