1

要像计算器一样使用 Vim/Python,一个选项是在 gVim 中执行以下命令:

:pyf[ile] P:\Computer Applications\Python\pi.py 

我打算将所有py文件存储在目录中P:\Computer Applications\Python\。我可以在我的_vimrc文件中添加一些东西,以便将来 gVim 知道我所有的 python 文件都存储在哪里,而我需要写的只是以下内容?

:pyf[ile] pi.py  
4

1 回答 1

2

为什么不使用映射?

nnoremap <Leader>p :pyf P:\Computer Applications\Python\

然后,您可以按\p(在正常模式下)获取:pyf P:\Computer Applications\Python\前缀。

参考

于 2013-05-09T08:37:37.427 回答