Skip to content

raspine/vim-code-runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

vim-code-runner

=============================

Single file compiler/runner for c/c++ code

I wanted a simple way to compile and run code snippets directly in Vim.

Some websites like http://en.cppreference.com offers a convenient way to select compiler/standard in a web code runner and I wanted something similar.

vim-code-runner lets you choose compiler/standard and extends to also let you choose flags/libs interactively,

If you have the AsyncRun plugin installed, it will be used automatically so you can use the quickfix with :cnext and friends.

Commands

:InteractiveCompile Starts an interactive session to choose compiler/standard/flags/libs.

:DirectCompile Compiles directly using the last settings from :InteractiveCompile.

:RunCode Runs the executable.

Variables

These variables can be set if you want defaults. If set, DirectCompile works directly without first doing InteractiveCompile.

let g:code_runner_compiler = 'g++'
let g:code_runner_standard = 'c++14'
let g:code_runner_flags = '-O2'
let g:code_runner_libs = ''

Installation

Use your Vim package manager.

License

Distributed under the same terms as Vim itself. See the vim license.

About

Single file compiler/runner for c/c++ code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •