{"id":19530158,"url":"https://github.com/tpope/pry-editline","last_synced_at":"2025-04-26T12:30:40.555Z","repository":{"id":56889442,"uuid":"2337099","full_name":"tpope/pry-editline","owner":"tpope","description":"C-x C-e to invoke an editor on the current pry (or irb) line","archived":false,"fork":false,"pushed_at":"2013-03-07T05:29:23.000Z","size":127,"stargazers_count":45,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T18:18:49.092Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://rubygems.org/gems/pry-editline","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tpope.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-09-06T20:18:15.000Z","updated_at":"2025-03-14T19:22:09.000Z","dependencies_parsed_at":"2022-08-20T23:40:28.953Z","dependency_job_id":null,"html_url":"https://github.com/tpope/pry-editline","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpope%2Fpry-editline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpope%2Fpry-editline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpope%2Fpry-editline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpope%2Fpry-editline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tpope","download_url":"https://codeload.github.com/tpope/pry-editline/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250986212,"owners_count":21518465,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T01:29:24.967Z","updated_at":"2025-04-26T12:30:40.284Z","avatar_url":"https://github.com/tpope.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pry-editline\n\nWhenever I'm using IRB or [Pry][], my editor always feels too far away.\nYes, there are [various gems](http://utilitybelt.rubyforge.org/) out\nthere that will let me spawn an editor and evaluate the result, but\nthat's not what I need.  Usually I'm about 80 characters or so into a\nhairy one-liner when I think, \"you know, I really wish I was in Vim\nright about now.\"  In Bash, one can load the current command line into\nan editor with `C-x C-e`.  And now, you can do the same in IRB and Pry.\n\nThe gem is named after [Pry][] so that it will be automatically loaded\nas a Pry plugin (and because, let's face it, that's a good train to\nhitch our wagon to).  But it also works in IRB if you add `require\n'pry-editline'` to your `.irbrc`.\n\n[Pry]: http://pry.github.com/\n\n## FAQ\n\n\u003e `C-x C-e` is too hard to type.\n\nYou can add an alias for it in `~/.inputrc`.  Observe:\n\n    $if Ruby\n      \"\\C-o\": \"\\C-x\\C-e\"\n    $endif\n\nActually, I already added `C-o` for you.  So don't add that one.  It\nalready works.  It stands for \"open\".\n\n\u003e What about vi Readline bindings?\n\nThey're supported, too.  In addition to `C-x C-e` and `C-o` in insert\nmode, you can use `o` or `v` in normal mode.\n\n\u003e It's not working in REE.\n\nREE seems to have an incomplete Readline implementation. See [this\nissue](https://github.com/tpope/pry-editline/pull/2).\n\n\u003e It's not working on OS X.\n\nOS X ships with the Readline replacement Editline rather than GNU Readline.\nIt's a horribly crippled replacement, and it won't work with pry-editline.\nThe simplest way to get a proper Readline is with [Homebrew][]:\n\n    brew install readline\n\nYou'll need to tell Ruby to use this Readline when configuring it.  If you're\ncompiling by hand, give it as an option to `./configure`:\n\n    ./configure --with-readline-dir=$(brew --prefix readline)\n\nIf you use rbenv, check out the [rbenv-readline][] plugin to automatically\npass this option when compiling.  If you're using RVM, you can set configure\noptions in your `.rvmrc`:\n\n    echo rvm_configure_flags=--with-readline-dir=$(brew --prefix readline) \\\n      \u003e\u003e ~/.rvmrc\n\n[Homebrew]: http://mxcl.github.com/homebrew/\n[rbenv-readline]: https://github.com/tpope/rbenv-readline\n\n\u003e It's not working with `rails console`/my Bundler setup.\n\nIf you can't/won't add it to your `Gemfile`, try this hack in your `.pryrc`:\n\n    Gem.path.each do |gemset|\n      $:.concat(Dir.glob(\"#{gemset}/gems/pry-*/lib\"))\n    end if defined?(Bundler)\n    $:.uniq!\n    require 'pry-editline'\n\nLet me know if you come up with something better.\n\n\u003e How does it work?\n\nWell first, it overrides `ENV['INPUTRC']` so it can do some magic.  And\nthen, it does some magic!\n\n## Self Promotion\n\nFollow [tpope](http://tpo.pe/) on [GitHub](https://github.com/tpope),\n[Twitter](http://twitter.com/tpope), and [Google+](http://tpo.pe/plus).\n\n## License\n\nCopyright (c) Tim Pope.  MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpope%2Fpry-editline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftpope%2Fpry-editline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpope%2Fpry-editline/lists"}