Home Download Buy Blog Forum Support

Informational Text

Informational Text

Postby DavidLGoldberg on Sun Mar 17, 2013 4:44 pm

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.
DavidLGoldberg
 
Posts: 11
Joined: Sat Mar 16, 2013 2:57 pm

Re: Informational Text

Postby adzenith on Sun Mar 17, 2013 5:22 pm

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.
adzenith
 
Posts: 1214
Joined: Mon Oct 19, 2009 9:12 pm

Re: Informational Text

Postby DavidLGoldberg on Sun Mar 17, 2013 6:25 pm

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"
DavidLGoldberg
 
Posts: 11
Joined: Sat Mar 16, 2013 2:57 pm

Re: Informational Text

Postby DavidLGoldberg on Fri Mar 22, 2013 9:20 am

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.

https://github.com/DavidLGoldberg/jum.py
(alt + space) to activate it, if you want to try it out.
DavidLGoldberg
 
Posts: 11
Joined: Sat Mar 16, 2013 2:57 pm


Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 10 guests