Permalink
Browse files

Update README.md to mention Vimrunner.connect.

  • Loading branch information...
mudge committed Mar 3, 2013
1 parent 5303eec commit 33ad73186ff88fc92c8e16abb19c2b9df019f4b4
Showing with 11 additions and 1 deletion.
  1. +11 −1 README.md
View
@@ -12,7 +12,8 @@ contributions are very welcome on the
## Usage
-Vimrunner can be used in one of two main ways:
+If you don't already have a running Vim server, Vimrunner can be used in one
+of two main ways:
```ruby
# Vim will automatically be started and killed.
@@ -66,6 +67,15 @@ you can control Vim. For a full list of methods you can invoke on the remote
Vim instance, check out the [`Client`
documentation](http://rubydoc.info/gems/vimrunner/Vimrunner/Client).
+If you already have a remote-capable Vim server running, you can connect
+Vimrunner to it directly by using `Vimrunner.connect` like so:
+
+```ruby
+# Assuming a running Vim server called FOO...
+vim = Vimrunner.connect("FOO")
+vim.insert("Hello world!")
+```
+
## Testing
If you're using Vimrunner for testing vim plugins, take a look at the

0 comments on commit 33ad731

Please sign in to comment.