Home

Awesome

Vimbot - test drive vim from ruby

Usage

Start up a vim application like this:

vim = Vimbot::Driver.new
vim.start

When you want to quit vim,

> vim.stop

By default, Vimbot will try to guess what vim application to use, and use an empty .vimrc and .gvimrc. If you want to specify a vim binary or some config files, you can do this:

> vim = Vimbot::Driver.new(
  :vim => "bin/my_vim",
  :vimrc => "~/.vimrc",
  :gvimrc => ".alternative_gvimrc"
)

From there, you can begin editing:

> vim.type "i", "Hey vim users,"
> vim.append "<CR><CR>", "Try testing your vim plugins with vimbot!"
> vim.command "%s/vim/best_editor_ever/g"

=> "2 substitutions on 2 lines"

API

editing

querying the state of the editor

configuration

Contributing

New convenience methods are easy to add, and pull requests are welcome!

Dependencies

Vimbot is developed with Vim 7.3 and Ruby 1.9.2.

Author

Vimbot is developed by Max Brunsfeld | @maxbrunsfeld | maxbrunsfeld@gmail.com