Skip to content

Commit

Permalink
update pryrc
Browse files Browse the repository at this point in the history
  • Loading branch information
dennyabraham committed Oct 10, 2017
1 parent 75e2dfe commit 5059a42
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions pryrc
@@ -1,3 +1,5 @@
# taken from skwp/dotfiles
#
# === EDITOR ===
Pry.editor = 'vi'

Expand Down Expand Up @@ -93,3 +95,21 @@ CodeRay.scan("example", :ruby).term # just to load necessary files
# Token colors pulled from: https://github.com/rubychan/coderay/blob/master/lib/coderay/encoders/terminal.rb

$LOAD_PATH << File.dirname(File.realpath(__FILE__))

# In CodeRay >= 1.1.0 token colors are defined as pre-escaped ANSI codes
if Gem::Version.new(CodeRay::VERSION) >= Gem::Version.new('1.1.0')
require "escaped_colors"
else
require "unescaped_colors"
end

module CodeRay
module Encoders
class Terminal < Encoder
# override old colors
TERM_TOKEN_COLORS.each_pair do |key, value|
TOKEN_COLORS[key] = value
end
end
end
end

0 comments on commit 5059a42

Please sign in to comment.