Sublime Forum

Background color by block

#1

Hello,

It would be an enormous help if one could change the background color from line x to y. I searched for quite a long time, but it seems that there is no such feature or plugin.

0 Likes

#2

Have you tried https://packagecontrol.io/packages/Text%20Highlighter ? it looks like it could do the job

0 Likes

#3

Thanks for the tip, but it could not be installed with package control.
(Package Control: Error downloading package. HTTP exception InvalidCertificateException (Host codeload.github. com returned an invalid certificate ([SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590))) downloading https://codeload.github.com/kdnk/sublime_text_highlighter/zip/v0.0.9.
error: Package Control)

However, I pasted the folder inside Sublime’s Packages folder and added the lines to the key bindings, but it still does nothing. As far as I understood the tool, it can only mark words, not whole parts.

I think this one would be nice, but I also can’t install it: https://packagecontrol.io/packages/Text%20Marker
(Error trying to parse file: Trailing comma before closing bracket in ~/Library/Application Support/Sublime Text 2/Packages/TextMarker-master/Default.sublime-keymap:2:56)

0 Likes

#4

You do this by editing the.tm.Theme file in your theme and changing the RGB# for the selection setting.
You may want to install the Color Picker package to help you with this. You may also want to install the Package Resource Viewer as well, but it isn’t strictly necessary. Some themes are very customizable, but this is a general solution. I have done this as the default selection color for my theme was charcoal on a black background (dark theme). Not the easiest to see.

0 Likes

#5

why on earth are you still using ST2 in 2019?!

0 Likes

#6

I would like to underline it forever, not only when I select it, to get some structure inside long documents.

0 Likes

#7

Because ST2 has everything that I need, except obviously underlining stuff

0 Likes

#8

Get serious!

0 Likes

#9

Just as a note, Sublime Text 2 is no longer officially supported, depends on a version of Python that Apple no longer ships, and uses a version of SSL that GitHub no longer accepts. That tends to mean that packages may or may not work properly, and you can no longer use Package Control to install anything or keep it up to date because it downloads files from GitHub, which is blocked by the SSL version restriction (as noted in the original post).

3 Likes

#10

Oh, okay, good to know. Text Marker works pretty well with ST3, but it unfortunately does not save the underlinings.
(How am I not being serious? Sorry if it seems like that)

0 Likes

#11

What you seem to want is a word processing function in a text editor, which is impossible if you are writing code… The best you can do is temporary marking or highlighting AFAIK. You would need a word processor for permanent changes.

0 Likes

#12

I could ask the same thing.
As the source code increases (in my case Lua), with several dozens of functions, it would be very interesting if each function had a different background color visually.
This would greatly facilitate visual navigation and the quick recognition of which part of the code is currently being viewed, without the need to read each part.
Any plugin that does that?

0 Likes