gVIM on Windows: execute buffer and paths with spaces

柔情痞子 提交于 2019-12-10 15:35:31

问题


In gVim for windows it's possible to execute current buffer via :!% command. But, unfortunately, the buffer file name is supplied to cmd.exe without quotes, so if file path has spaces gVim will not be able to execute it.

Is it any easy way to fix it in order to be able execute .bat, .py etc from within gVim?


回答1:


This's my guess, I don't have windows machine to try. Try

:!python "%"

or

:!"%"

credit: Eye of Hell



来源:https://stackoverflow.com/questions/1531232/gvim-on-windows-execute-buffer-and-paths-with-spaces

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!