# Syntax highlighting in IRB

**URL:** <https://www.ruby-forum.com/t/syntax-highlighting-in-irb/194235>\
**Category:** Ruby\
**Created:** [September 1, 2010, 1:14pm UTC](https://www.ruby-forum.com/t/syntax-highlighting-in-irb/194235 "2010-09-01T13:14:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ceekays](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/5f9b8f/32.png) [@ceekays](https://www.ruby-forum.com/u/ceekays)\
**Post date:** [September 1, 2010, 1:14pm UTC](https://www.ruby-forum.com/t/syntax-highlighting-in-irb/194235/1 "2010-09-01T13:14:27Z")

</div>

I would like to know if there is a way of changing colors for IRB  
standard input ($stdin). What I am interested in “is having IRB  
highlighting syntax as I type”. Among other stuff, I would like to be  
able to:

```
* set its background colours
* have differing colours for strings, variables, keywords, e.t.c.

```

I do use Wirble and Term-ansicolor gems, and they are fine when it comes  
to output. But, I am interested in colouring irb terminal input, i.e.  
I’m looking forward to having something like “vim\_animated-irb”.

Ceekays

---

<div class="post-metadata">

**Author:** ![ceekays](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/5f9b8f/32.png) [@ceekays](https://www.ruby-forum.com/u/ceekays)\
**Post date:** [September 1, 2010, 1:37pm UTC](https://www.ruby-forum.com/t/syntax-highlighting-in-irb/194235/2 "2010-09-01T13:37:53Z")

</div>

Hi,

On Wed, Sep 1, 2010 at 7:14 AM, Edmond K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I’m looking forward to having something like “vim\_animated-irb”.
> 
> ## Ceekays
> 
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

IIRC Utility Belt may have what you’re looking for…  
[http://utilitybelt.rubyforge.org/](http://utilitybelt.rubyforge.org/)

Regards,  
Bob

---

<div class="post-metadata">

**Author:** ![ceekays](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/5f9b8f/32.png) [@ceekays](https://www.ruby-forum.com/u/ceekays)\
**Post date:** [September 1, 2010, 1:55pm UTC](https://www.ruby-forum.com/t/syntax-highlighting-in-irb/194235/3 "2010-09-01T13:55:08Z")

</div>

Bob N. wrote:

> Hi,
> 
> On Wed, Sep 1, 2010 at 7:14 AM, Edmond K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> wrote:
> 
> > I’m looking forward to having something like “vim\_animated-irb”.
> > 
> > ## Ceekays
> > 
> > Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> IIRC Utility Belt may have what you’re looking for…  
> [http://utilitybelt.rubyforge.org/](http://utilitybelt.rubyforge.org/)

Thanks Bob for your reply, but I have ever tried Utility Belt. It’s a  
cool gem, but it just does the same stuff as Wirble and Term-ansicolor.  
I am interested in colouring irb terminal input, not necessarily the  
terminal output.

> Regards,  
> Bob

---

<div class="post-metadata">

**Author:** ![ceekays](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/5f9b8f/32.png) [@ceekays](https://www.ruby-forum.com/u/ceekays)\
**Post date:** [September 1, 2010, 2:26pm UTC](https://www.ruby-forum.com/t/syntax-highlighting-in-irb/194235/4 "2010-09-01T14:26:29Z")

</div>

On Wed, Sep 1, 2010 at 2:14 PM, Edmond K. wrote:

> I am interested in colouring irb terminal input, i.e.  
> I’m looking forward to having something like “vim\_animated-irb”.

How about running Vim within IRB[1](http://vimcasts.org/episodes/running-vim-within-irb/)? Perhaps it is not “having IRB  
highlighting syntax as [you] type” in a direct way, but it’s as close  
as it gets.
