Project

ruby-edit

0.0
No commit activity in last 3 years
No release in over 3 years
Edit grep results in one file
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 10.0
~> 3.0

Runtime

~> 0.7.2
~> 0.20.0
~> 0.4.2
~> 0.8.0
~> 0.2.0
~> 0.5.0
~> 0.4.0
~> 0.6.0
~> 0.2.0
~> 0.4.0
~> 0.11.0
~> 0.1.0
~> 0.16.1
~> 0.6.4
~> 0.8.0
~> 0.10.0
~> 0.1.0
~> 0.3.0
 Project Readme

Gem Version Build Status

RubyEdit

RubyEdit is a simple commandline app that allows you to edit grep results in one file.

Installation

Run this line in your terminal:

gem install ruby-edit

Usage

ruby-edit

Run:

ruby-edit -e my_expression -p ./path/to/file/

This will populate a tempfile with the grep results.

e.g.

./path/to/file/file.rb:4:  my_expression('string')
./path/to/file/file.rb:10:    def my_expression(string)
./path/to/file/file_spec.rb:7: expect { my_expression('string') }.to do

Perform your edits and then save your file.

Warning: Leave the path and line number alone, as this is used to find the respective file. The space between the line number and your text is your indentation. Removing it will affect the indentation of your text.

You'll then be prompted in the console:

Do you want to apply these changes? (Y/n)

Selecting 'Y' will insert your changes into their respective files.

configure

Run:

ruby-edit configure -e my_editor

This will set your default editor. Pass the command you use to start your editor, NOT the name of the editor. For example: if you use Sublime Text send subl not Sublime Text

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/finn-francis/ruby-edit. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Code of Conduct

Everyone interacting in the RubyEdit project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

Copyright

Copyright (c) 2018 finn-francis. See MIT License for further details.