This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Diogo Cordeiro 5ef34e26c4 Add support to SWIProlog 2018-11-18 22:33:32 +00:00
autoload Add support to SWIProlog 2018-11-18 22:33:32 +00:00
doc Add support to SWIProlog 2018-11-18 22:33:32 +00:00
plugin Add support to SWIProlog 2018-11-18 22:33:32 +00:00
test Add support to SWIProlog 2018-11-18 22:33:32 +00:00
.gitignore Create Japanese document 2016-01-03 16:45:09 +09:00
.travis.yml Create .travis.yml 2015-12-26 09:54:43 +09:00
README.md Add support to SWIProlog 2018-11-18 22:33:32 +00:00
top.gif Update README.md with top.gif 2015-12-23 02:05:41 +09:00

README.md

repl.vim

Open the interactive environment with the code you are writing.

example

Ruby Example

You are writing the following code in an unnamed buffer.

class C
  def self.f(x)
    x + 1
  end
end

Now you want to try running the code in an interactive environment. Usually you are supposed to (1) save the code on somewhere, (2) open a terminal, (3) run irb -r {the-file}.

If you already installed repl.vim, you just have to run :Repl or to type <space>i. It opens a buffer that is the environment you wanted.

irb>

You can do

irb> C.f 23
24
irb>

Haskell Example

import Test.HUnit
foo _ = (1, 2)
test1 = TestCase (assertEqual "for (foo 3)," (1,2) (foo 3))
tests = TestList [TestLabel "test1" test1]

Run :Repl without saving the code on a file.

ghci> runTestTT tests

Supports

  • Ruby
  • Haskell
  • Python (You can chose python2 or python3 interpreter)
  • Erlang
  • JavaScript
  • Clojure
  • Idris
  • Racket
  • SWIProlog

Installation

Example for neobundle.vim

Please add the following line into your .vimrc

NeoBundle 'ujihisa/repl.vim'

and run :NeoBundleInstall.

Requirements

Authors

  • Tatsuhiro Ujihisa
  • aiya000 <aiya000.develop at gmail com>

Licence

GPL version 3 or any later version Copyright (c) Tatsuhiro Ujihisa