Home

Awesome

<div style="text-align:center"><img src="ressources/visual_assets/Sniprun_transparent.png" /></div> <div align="center"><p> <a href="https://github.com/michaelb/sniprun/releases/latest"> <img alt="Latest release" src="https://img.shields.io/github/v/release/michaelb/sniprun" /> </a> <a href="https://github.com/michaelb/sniprun/actions"> <img alt="CI build" src="https://github.com/michaelb/sniprun/workflows/Rust/badge.svg" /> </a> <a href="https://github.com/michaelb/sniprun/releases"> <img alt="Total downloads" src="https://img.shields.io/github/downloads/michaelb/sniprun/total" /> </a> <a href="https://github.com/michaelb/sniprun/pulse"> <img alt="Last commit" src="https://img.shields.io/github/last-commit/michaelb/sniprun"/> </a> </p> </div>

Introduction

Sniprun is a code runner plugin for neovim written in Lua and Rust. It aims to provide stupidly fast partial code testing for interpreted and compiled languages . Sniprun blurs the line between standard save/run workflow, jupyter-like notebook, and REPL/interpreters.

</br>

TLDR: Plug 'michaelb/sniprun', {'do': 'sh install.sh'}, :SnipRun, :'<,'>SnipRun, :SnipInfo

Installation, configuration, ...

See installation instructions , configuration tips , usage explanations and much more useful information on the WIKI.

spacer

Demos

Send to Sniprun snippets of any language

A very simple example (in C), play the .gif and look in the command area:

demo_c

The result can be returned in multiple (even at the same time) ways:
ClassicVirtual Text
Temporary Floating WindowTerminal
NotificationAPI
REPL-like behavior is available for some languages

Python, Julia, Lua, JavaScript & Typescript (via deno), Clojure, R, Mathematica, Sage, coming soon for many other interpreted (and compiled) languages. With REPL-like behavior ,you can run code dependent on previously executed code, just like in a REPL, from within your favorite editor.

spacer

Features

Sniprun is a way to quickly run small snippets of code, on the fly, and iterate very quickly and conveniently. To learn a language, to quickly experiment with new features (not yet embedded in classes or a whole project etc...), or to develop simple code pipelines (like a machine learning exercise) that fit in a unique file, sniprun is probably the best plugin out there.

As a matter of proof, Sniprun :

Known limitations

Due to its nature, Sniprun may have trouble with programs that :

Changelog

It's been quite a journey already! For history fans, see the full changelog.

Contributing

Sniprun has been made contributor-friendly (see CONTRIBUTING.md), so it's relatively easy to create / fix interpreters for any language. But any (constructive) issue, discussion, or doc Pull Request is a welcome form of contribution !