Ⅰ. 插件描述
Plugin for running Python scripts.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/runscript-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/runscript-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/runscript-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/runscript.vim
Ⅳ. 文档说明
Vim global plugin for running Python scripts
Version: 1.1
Maintainer: Frederick Young <lordfyb@hotmail.com>
Last change: 2001 Oct 30
--Pressing the "F12" key will run the Python script in the current buffer
--Pressing the "F11" key will designate the Python script in the current
buffer as the script to run when pressing F12"
--Pressing "Shift-F11" will remove the designation performed by pressing "F11"
and will allow pressing "F12" to run the script in the current buffer
--Typing the Ex command "Rs" will also allow you to run a Python script but
with the benefit of allowing you to pass up to 20 parameters to the script.
Sample syntax...
:rs -xy 800 600
The above will run the script in the current buffer or the one designated
to run when pressing "F11" and pass to it the parameters "-xy 800 600"
--Pressing "F9" will toggle the display of a buffer containing the output
produced when running the Ex command "Rs" or pressing "F12".
Also, the value of the variable s:PathToExecutable in the script may need to be changed to reflect the location of Python on your system.
With some minor modifications, it should be possible to run other scripts
like perl, vbscript, or even executables compiled with the Ex command
"make".