Is it possible to style a texteditor view?


I would like to be able to do the following:

  • highlight some lines in one colour, while others in a different colour ( there is no regex rule to determine which lines would be which colour, so a grammar wouldn’t help )
  • have some kind of trigger words in the view , which if clicked would spawn some commands. As an example, imagine a it block in rspec, something like this:
it "should do something" do
  1.should == 1

so in this case, if i would double click on it, it could send the filename and the line number to zeus, for it to be ran.

The reason I’m asking if it’s possible to do these customizations to a text view, is that I would like to be able to search text inside the view, with the find and replace package.

If styling a text editor is not possible, could you suggest an alternative way of accomplishing this? Thank you!