Ⅰ. 插件描述
A simple Vim plugin which usesⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'aben20807/vim-runner'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'aben20807/vim-runner'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'aben20807/vim-runner'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/aben20807/vim-runner
Ⅳ. 文档说明
# Runner

1. Installation
1.a. Installation with Vim-Plug
- Add
Plug 'aben20807/vim-runner'to your vimrc file. - Reload your vimrc or restart.
- Run
:PlugInstall
1.b. Installation with Vundle
- Add
Plugin 'aben20807/vim-runner'to your vimrc file. - Reload your vimrc or restart
- Run
:PluginInstall
2. Usage
2.a. Supported Languages
- C, C++, Python, Rust, Markdown, Lisp.
2.b. Settings
" Use key mappings setting from this plugin by default.
let g:runner_use_default_mapping = 1
" Save file first before compile and run by default.
let g:runner_is_save_first = 1
" Print a timestamp on the top of output by default.
let g:runner_print_timestamp = 1
" Print time usage of do all actions by default.
let g:runner_print_time_usage = 1
" Show the comment information by default.
let g:runner_show_info = 1
" Not auto remove tmp file by default.
let g:runner_auto_remove_tmp = 0
" Use <F5> to compile and run code by default.
" Feel free to change mapping you like.
let g:runner_run_key = "<F5>"
" Set tmp dir for output.
let g:runner_tmp_dir = "/tmp/vim-runner/"
" Section: work with other plugins
" w0rp/ale
let g:runner_is_with_ale = 0
" iamcco/markdown-preview.vim
let g:runner_is_with_md = 0
" Section: executable settings
let g:runner_c_executable = "gcc"
let g:runner_cpp_executable = "g++"
let g:runner_rust_executable = "cargo"
let g:runner_python_executable = "python3"
" Section: compile options settings
let g:runner_c_compile_options = "-std=c11 -Wall"
let g:runner_cpp_compile_options = "-std=c++11 -Wall"
let g:runner_rust_compile_options = ""
" Section: run options settings
let g:runner_c_run_options = ""
let g:runner_cpp_run_options = ""
let g:runner_rust_run_backtrace = 1
let g:runner_rust_run_options = ""