2010-09-21 15:28:13 +01:00
# repl.vim
2010-09-21 07:03:19 +01:00
Open the interactive environment with the code you are writing.
## 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}` .
2010-09-21 15:28:13 +01:00
If you already installed quickinteractive.vim, you just have to run `:Repl` or to type `<space>i` . It opens a buffer that is the environment you wanted.
2010-09-21 07:03:19 +01:00
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]
2010-09-21 15:28:13 +01:00
Run `:Repl` without saving the code on a file.
2010-09-21 07:03:19 +01:00
ghci> runTestTT tests
2010-10-19 07:28:22 +01:00
## Supports
* Ruby
* Haskell
2015-12-16 11:37:48 +00:00
* Python (You can chose python2 or python3 interpreter)
2010-10-19 07:28:22 +01:00
* Erlang
2010-09-21 07:03:19 +01:00
## Installation
2015-12-16 23:04:06 +00:00
Example for [neobundle.vim ](https://github.com/Shougo/neobundle.vim )
2015-12-16 11:37:48 +00:00
2015-12-16 23:04:06 +00:00
Please add the following line into your .vimrc
2015-12-16 11:37:48 +00:00
NeoBundle 'ujihisa/repl.vim'
2015-12-16 23:04:06 +00:00
and run `:NeoBundleInstall` .
2010-09-21 07:03:19 +01:00
2015-12-16 23:04:06 +00:00
## Requirements
2015-12-16 11:37:48 +00:00
* [vimshell.vim ](https://github.com/Shougo/vimshell.vim )
2015-12-16 23:04:06 +00:00
* [vimproc.vim ](https://github.com/Shougo/vimproc.vim ) (vimproc.vim is required by vimshell.vim)
2010-09-21 07:03:19 +01:00
2015-12-12 22:59:57 +00:00
## Authors
2010-09-21 07:03:19 +01:00
2015-12-12 22:59:57 +00:00
* Tatsuhiro Ujihisa < ujihisa at gmail com >
2015-12-13 08:59:57 +00:00
* aiya000 < aiya000.develop at gmail com >
2015-12-12 22:59:57 +00:00
## Licence
GPL version 3 or any later version
Copyright (c) Tatsuhiro Ujihisa