Sublime Forum

Informational Text

#1

Is there anyway in sublime to display informational text on top of the view that does not affect the current buffer?

If so, I can’t think of (or find) any plugins that do this.

I am NOT looking to:

  • add a box around text
  • change cursor
  • highlight text
  • change background color

I am looking for any way to convey information:

  • overlay text
  • overlay icons
  • alter background of view with an image (I’ve read this is not available in either ST2 or ST3)

Hacks welcome: I have already thought of completely changing the contents of the current buffer, or using run_command(‘clone_file’) and changing it there. Both of these scenarios leave with the changes in my undo stack (unacceptable). If anyone knows how to disable an edit from entering the undo stack I would greatly appreciate it. My particular plugin could get away with just changing the content and ignoring the edit. Of course still I’d prefer some sort of informational/presentational overlay.

0 Likes

#2

It’s gonna have to be a hack – these things are not possible in Sublime Text. And you can’t change the buffer without changing the undo stack.
The only thing I can think of is a floating window that you somehow try to align, but that sounds really hard because you can’t get screen or window coordinates of text.

0 Likes

#3

hmm, very disappointing because I have the rest of the plugin complete.

If there is a way, it definitely seems it would be to either ignore the undo buffer or some how replace it with the original…

Are there plans to add this functionality in sublime text 3 or 4? I can’t imagine this would be too catastrophic for the “lightweightness”

0 Likes

#4

Actually, I have a decent solution for my particular use case. Doesn’t handle all informational text scenarios by a long shot. Also, Ideally, I’d be able to have a smaller font / different colors for the labels.

github.com/DavidLGoldberg/jum.py
(alt + space) to activate it, if you want to try it out.

0 Likes