virb 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -2,17 +2,20 @@
2
2
 
3
3
  Virb is an interactive Vim mode for IRB, Rails console, and Pry.
4
4
 
5
+ ![screen1](https://raw.github.com/danchoi/virb/master/images/virb1-sm.png)
6
+ ![screen2](https://raw.github.com/danchoi/virb/master/images/virb2-sm.png)
7
+
5
8
  ## Motivation
6
9
 
7
- The IRB is Ruby's interactive REPL. IRB is a very handy tool, but its
8
- text-editing capabilities are limited. Virb wraps an IRB session in a Vim
9
- session and gives you convenient ways to evaluate Ruby code from Vim.
10
+ IRB is Ruby's interactive REPL. IRB is a very handy tool, but its text-editing
11
+ capabilities are limited. Virb wraps an IRB session in a Vim session and gives
12
+ you convenient ways to evaluate Ruby code from Vim.
10
13
 
11
14
  Virb inverts the approach taken by
12
15
  the [interactive_editor](https://github.com/jberkel/interactive_editor) gem and
13
16
  similar solutions which let you pop out into Vim from IRB and come back to IRB
14
17
  to see the results. Virb keeps you in Vim at all times, calling IRB behind the
15
- scenes and fetching IBR's output to display inside Vim.
18
+ scenes and fetching IRB's output to display inside Vim.
16
19
 
17
20
  ## Install
18
21
 
@@ -69,9 +72,13 @@ Put this in your Gemfile:
69
72
  gem 'virb'
70
73
  end
71
74
 
72
- and start Rails console as you do normally. You should see the Virb interface
73
- open, where you can interact with the Ralis console through a Vim buffer and
74
- see its output in the other Vim buffer.
75
+ and start Rails console as you do normally, with `rails c`. You should see the
76
+ Virb interface open, where you can interact with the Ralis console through a
77
+ Vim buffer and see its output in the other Vim buffer.
78
+
79
+ If you want to open a worksheet in Virb + Rails console, don't specify it on
80
+ the command line. Open it from within Vim using `:e [file]` after the Virb
81
+ session has started.
75
82
 
76
83
  If you want to use Virb with Pry and Rails console:
77
84
 
@@ -86,11 +93,23 @@ and start Rails console like this:
86
93
 
87
94
  VIRB=pry rails c
88
95
 
89
-
90
96
  ## Caveats
91
97
 
92
98
  The normal command line options for `irb` and `pry` do not work with `virb`.
93
99
 
100
+ Also, `irb` extensions and `.irbrc` settings that introduce output coloring may
101
+ garble the evaluated output in Virb. For best results, remove these extensions.
102
+
103
+ ## Issues
104
+
105
+ Please report issues [on the GitHub issue tracker](https://github.com/danchoi/virb/issues).
106
+
107
+ ## Tip
108
+
109
+ You may want try adding a Vim plugin called
110
+ [ri.vim](https://github.com/danchoi/ri.vim) to perform
111
+ Ruby documentation lookups from the Vim workspace. Virb and ri.vim are
112
+ compatible, and written by the same author.
94
113
 
95
114
  ## Author
96
115
 
data/Rakefile CHANGED
@@ -11,7 +11,7 @@ task :web => :build_webpage do
11
11
  puts "Building and pushing website"
12
12
  Dir.chdir "../project-webpages" do
13
13
  `scp out/virb.html zoe2@instantwatcher.com:~/danielchoi.com/public/software/`
14
- `rsync -avz out/images-virb zoe2@instantwatcher.com:~/danielchoi.com/public/software/`
14
+ `rsync -avz out/images zoe2@instantwatcher.com:~/danielchoi.com/public/software/`
15
15
  `rsync -avz out/stylesheets zoe2@instantwatcher.com:~/danielchoi.com/public/software/`
16
16
  `rsync -avz out/lightbox2 zoe2@instantwatcher.com:~/danielchoi.com/public/software/`
17
17
  end
@@ -0,0 +1,11 @@
1
+ #!/bin/bash
2
+
3
+ # scales an image file down to 75%
4
+
5
+ # an ad hoc script that can be adapted for future uses
6
+
7
+ # $1 name of an jpg image file
8
+
9
+ out=${1%.png}-sm.png
10
+ echo "$1 -> $out"
11
+ convert $1 -scale %75 $out
Binary file
Binary file
data/lib/virb/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Virb
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
data/lib/virb.vim CHANGED
@@ -43,6 +43,7 @@ wincmd p
43
43
  setlocal nu
44
44
  setlocal statusline=%!VirbStatusLine()
45
45
  command! -bar -range Virb :<line1>,<line2>call Virb()
46
+ set ft=ruby
46
47
 
47
48
  " main execution function
48
49
  func! Virb() range
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: virb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-24 00:00:00.000000000 Z
12
+ date: 2012-12-25 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A Vim shell for irb and rails console
15
15
  email:
@@ -25,7 +25,10 @@ files:
25
25
  - Rakefile
26
26
  - bin/virb
27
27
  - bin/virb-pry
28
+ - images/scaledown.sh
29
+ - images/virb1-sm.png
28
30
  - images/virb1.png
31
+ - images/virb2-sm.png
29
32
  - images/virb2.png
30
33
  - images/virb3.png
31
34
  - lib/virb.rb