Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在 vim 中运行 python 脚本。我将以下代码放入插件文件夹中的 python.vim 中:
map <buffer> <S-e> :w<CR>:!/usr/bin/env python % <CR>
但它似乎是Linux。有什么办法可以调整它并绕过Win7?谢谢!
尝试map <buffer> <S-e> :w<CR>:!C:\Python27\python.exe % <CR>
map <buffer> <S-e> :w<CR>:!C:\Python27\python.exe % <CR>
怎么样map :w:!C:/path/to/your/python %?
map :w:!C:/path/to/your/python %
您应该将 python.exe 路径紧跟在!. 例如:
!
map :w:!C:\Python27\python.exe %