Sublime Forum

Any way to set 'max wrap width'?

#1

I want my text to wrap but still have a maximum width so that if I have a really wide column I will have room, but if I make it really narrow it will start to wrap.

Is there any way to do this? It seems that if I set anything other than 0 for wrap_width it doesn’t matter that I have word_wrap set to true.

0 Likes

#2

I’m not really sure what you’re asking… Does “Word Wrap Column” not work for you?

0 Likes

#3

I want lines to wrap to the window but also have a maximum width.
If I set a wrap_width to anything, that is always used for wrapping even if the window is smaller.

What is “word wrap column”?

0 Likes

#4

Oh, I see - it doesn’t let you do that. You have to pick between wrapping at the window and wrapping at the column.
You could do it with a plugin, but it would be kind of kludgy - you could poll the window size and see if it’s smaller than so many columns.

0 Likes

#5

How do you get the current window size? I am trying to adjust the text displayed in the quick panel so it’s truncated better (or reduced enough not to truncate) but couldn’t figure out how to get the width of the window to do this better.

0 Likes