Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows下无法识别路径? #6

Closed
nmxiao opened this issue Feb 16, 2020 · 11 comments
Closed

windows下无法识别路径? #6

nmxiao opened this issue Feb 16, 2020 · 11 comments

Comments

@nmxiao
Copy link

nmxiao commented Feb 16, 2020

在windows下用neovim,用户名中有空格时,无法识别路径?报错如下:

'C:\Users\XXX' 不是内部或外部命令,也不是可运行的程序
或批处理文件。用户文件夹为XXX XX

@skywind3000
Copy link
Owner

用的命令是什么?

@skywind3000
Copy link
Owner

怎么定义的

@nmxiao
Copy link
Author

nmxiao commented Feb 16, 2020

我自己写的bat,里面的具体内容为
@echo off
@cd /d %~dp1
call "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\bin\compilervars.bat" intel64
icl %1

@skywind3000
Copy link
Owner

定位到了,neovim 在 windows 下面的问题,我传给 jobstart 的 args 是一个列表,列表的话 args 每个项目都应该是一个独立的参数,结果 nvim 它没做好,把一个 args[n] 的项目弄成了,vim没问题,linux下也没问题。我 escape 了都有问题。

@skywind3000
Copy link
Owner

你查 ":h jobstart" 下面有一段 “NOTE: on Windows ...",实际上我按照它的做了,把包含空格的参数在 windows 下 quote 起来了,还是失败。vim 没问题,linux 下都没问题,我再看看。

@nmxiao
Copy link
Author

nmxiao commented Feb 16, 2020

好的,我直觉应该是neovim的问题。以前用在vim下用asyncrun没啥问题。这个插件对我这种多种语言下的快速编译测试还是很有帮助的,多谢!

@skywind3000
Copy link
Owner

可以了,已经修正,专门针对 neovim+windows 换了一种传参方式,麻烦试试。

@skywind3000
Copy link
Owner

更新下 asyncrun.vim 即可,那边已经修正,

neomake 现在 nvim+windows 都有问题:

图片

现在 asyncrun 完美传参了:

图片

@nmxiao
Copy link
Author

nmxiao commented Feb 16, 2020

quickfix下问题解决了。asynctask下用terminal好像还出现这个问题,terminal用的是cmd。

@skywind3000
Copy link
Owner

一并解决了,完美传参了,这回,主要是 windows 下面用户名包含空格 + neovim 实在太少见。
麻烦帮确认下,更新 asyncrun.vim 即可

@nmxiao
Copy link
Author

nmxiao commented Feb 16, 2020

搞定了,quickfix和terminal两种模式都OK,多谢!

@nmxiao nmxiao closed this as completed Feb 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants