如何配置c.vim以便它可以在Powershell vim中编译?

如何配置c.vim以便它可以在Powershell vim中编译?,c,powershell,vim,plugins,C,Powershell,Vim,Plugins,在Ubuntu上使用c.vim插件在vim中编译c文件时,我没有遇到这个问题,但在Windows上,我在vim中编译时遇到这个错误(通过键入\rc或\rr): 无法加载文件C:\Users\Kosine\Documents\WindowsPowerShell\Microsoft.PowerShell\u profile.ps1,因为在此系统上禁用了脚本的执行。有关更多详细信息,请参阅“获取有关签名的帮助”。 第1行字符数:2 + . 听起来您的Microsoft.PowerShell\u pr

在Ubuntu上使用c.vim插件在vim中编译c文件时,我没有遇到这个问题,但在Windows上,我在vim中编译时遇到这个错误(通过键入\rc或\rr):

无法加载文件C:\Users\Kosine\Documents\WindowsPowerShell\Microsoft.PowerShell\u profile.ps1,因为在此系统上禁用了脚本的执行。有关更多详细信息,请参阅“获取有关签名的帮助”。 第1行字符数:2
+ . 听起来您的Microsoft.PowerShell\u profile.ps1文件已下载并设置了Internet\u区域标志。使用此文件上的
取消阻止文件
命令取消阻止文件,然后重试


也可能是VIM正在发射一个32位外壳。特定于每个PowerShell控制台(x64和x86)的执行。

Unblock文件在我的PowerShell中无法识别cmdlet。另外,Microsoft.PowerShell_profile.ps1是一个配置文件,其中包含我自己编写的自定义功能。我注意到,当vim尝试编译c文件时,它可能使用了不同的Powershell会话(因为在我关闭vim后,Powershell上不会出现该错误消息)。我不得不在屏幕上打印错误信息,直到它消失大约一秒钟。我希望我讲得有道理。我在.vimrc文件中添加了一行代码,修复了第一个错误:
set shell=powershell.exe \-ExecutionPolicy\Unrestricted
,但它仍然找不到gcc.exe。这也可以解决问题。可能是VIM正在发射一个32位外壳。特定于每个PowerShell控制台(x64和x86)的执行。
File C:\Users\Kosine\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details.
At line:1 char:2
+ . <<<< 'C:\Users\Kosine\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1'
    + CategoryInfo         : NotSpecified: (:) [], PSSecurityException

The term 'gcc.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char: 8
+ gcc.exe <<<<   -Wall -g -00 -c C:/Users/Kosine/Programming/prog0402.c -o C:/User/Kosine/Programming/prog0402.obj > C:/User/Kosine/AppData/Local/Temp/VIeCE08.tmp
    + CategoryInfo          : ObjectNotFound: (gcc.exe:String) [], CommandNotFoundException
    + FullyQualifiedErrorID : CommandNotFoundException