Sublime Forum

Bold Italics and Underline

#1

Bold Italics er there doesn’t appear to be an underline button, drat !

I am writing a C++ program. I’d like to put some words in a very long comment // into bold or italics for clarity/ ease of reading.

(I’ve also put this text into a snippet as I use it often and it’s handy to have in whatever code I’m writing, this long comment)

doesn’t work, all that happens is i get the words “strong” and “/strong” wrapped around whatever text I highlight.

(Obvs I can’t actually write what gets wrapped round coz it’s html, and the word “and” just goes to bold. Both those “strongs” are missing "<"s and ">"s.

There’s some talk in various threads in this forum about Latex (?) but this seems vastly overkill (it seems to be a PDF functionality thing, excuse my technical lingo there…)

How do I highlight words permanently. In a word processor this is often achieved with crtl+b, which is the effect I’m looking for (<= e.g.)

Is there a simple solution, please?

Hope y’all OK, all the best, Lozminda

0 Likes

#2

If you mean you physically want Sublime to render some parts of your comment bold directly inside of itself while you’re editing things, that’s not possible.

Font styles (of bold or italic) are applied by your color scheme (and not by you directly) and can only be applied to an entire scope at once. What that means is you can have every comment across your whole file be wholly bold (or a particular color, or also italic) but not individual parts of it.

0 Likes

#3

ST is a plain text editor, so formatting “on demand” is not supported, obviously.

The only way you can get that effect is to modify syntax highlighting for the language(s) you use to do the formatting based on markers you insert in comments, but that might be quite involved.

0 Likes