Skip to content

Instantly share code, notes, and snippets.

@jvmvik
Created May 10, 2018 19:20
Show Gist options
  • Select an option

  • Save jvmvik/9ae1112a9fda502dbe1d02ad4ee858ff to your computer and use it in GitHub Desktop.

Select an option

Save jvmvik/9ae1112a9fda502dbe1d02ad4ee858ff to your computer and use it in GitHub Desktop.
ruby setup / irb
# IRBRC tweaking for better productivity with Ruby 2+
# edit: ~/.irbrc
# save IRB history
require 'irb/ext/save-history'
#History configuration
IRB.conf[:SAVE_HISTORY] = 100
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history"
# enable autocompletion
require 'irb/completion'
IRB.conf[:AUTO_INDENT] = true
IRB.conf[:USE_READLINE] = true
IRB.conf[:LOAD_MODULES] = [] unless IRB.conf.key?(:LOAD_MODULES)
unless IRB.conf[:LOAD_MODULES].include?('irb/completion')
IRB.conf[:LOAD_MODULES] << 'irb/completion'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment