README.md in robot-vim-0.0.1 vs README.md in robot-vim-0.1.0

- old
+ new

@@ -1,60 +1,46 @@ # RobotVim - Easy Vim Automation RobotVim is a Ruby gem that allows you to invoke Vim from inside of Ruby programs. It was designed to allow Vim developers to TDD/BDD their Vim plugins and scripts. -## Important -Right now there is no real code to this project. It's just this README. Code is coming soon. - ## Installation To install RobotVim run gem install robot-vim or clone this reposity and run rake install + ## Dependencies -RobotVim is developed with Ruby 1.9.2 and bundler. It has not been tested with older versions of Ruby. +RobotVim is developed with Vim 7.3, Ruby 1.9.2, and bundler. + ## Example Usage ### Initialization -Create an instance that will use your user's default Vim and vimrc file - robot = RobotVim.new() +Create an instance that will use your user's default Vim + robot = RobotVim::Runner.new() -Or create an instance with a specific Vim and/or vimrc file - robot = RobotVim.new(:vim_path => "~/bin/vim", - :vimrc_path => "examples/vimrc_with_weird_bindings") +Or create an instance with a specific Vim + robot = RobotVim::Runner.new(:vim => "/bin/vim") ### Running commands Commands are passed in as a string with one command per line. -Run commands against inline input commands = <<-COMMANDS RunSomeCoolCommand SomeOtherCoolCommand COMMANDS - input = <<-INPUT - This is a some sample - text that I can pass in as input. - I could also use a file fixture as my input. - See the examples folder for more examples. - INPUT + robot.run(:input_file => "some/file.txt", :commands => commands) - result = robot.run(:input_text => input, :commands => commands) - puts result.buffer_text +See spec/integration\_spec.rb for an example of sorting a file and saving the output. -Run a command against a test input file - command = "normal G|iTyping some text at the bottom of the buffer" - result = robot.run(:input_file => "examples/input1.txt", :commands => commands) - puts result.buffer_text -## The result object -The result of the RobotVim#run method has the following attributes - -- buffer\_text: the text of the buffer after the last command (not yet implemented) -- buffer\_name: the name of the buffer after the last command (not yet implemented) -- cursor\_location: the curson location after the last command(not yet implemented) +## TODO +- automatically save buffer to an output file after running the last command +- automatically close Vim after running the last command +- take a string for input and write out a temporary file that Vim will run against +- figure out if there is a way to specify a .vimrc file without disabling the normal Vim initialization process ## Author RobotVim is developed by Matt Margolis | mrmargolis | matt@mattmargolis.net