Ⅰ. 插件描述
Asynchronously run vimscriptⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'sillybun/vim-async-is-written-on'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'sillybun/vim-async-is-written-on'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'sillybun/vim-async-is-written-on'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/sillybun/vim-async
Ⅳ. 文档说明
# vim-async
Introduction
This plugin provide API to run vim function asynchronously.
Usage
The code need to be executed should be put into list. For example:
let to_be_executed = ['let g:a = 1', 'let g:b = g:a + 1', 'if g:b == 2', 'echo "hello world"', 'endif']And then start the asynchronous job by:
AsyncCodeRun(to_be_executed, 'code_name')Install
Use your plugin manager of choice.
- Add
Plug 'sillybun/vim-async'to .vimrc - Run
:PlugInstall
- Add
- Add
Bundle 'https://github.com/sillybun/vim-async'to .vimrc - Run
:BundleInstall
- Add
Feature
- Support Basic Expression:
let, set, echo[m], call, execute, ... - Support if-statement: if/elseif/else/endif
- Support
wait [condition] - Support
sleep [time][s|ms] - Support
LABEL [name],GOTO [name]