Sublime Forum

This is a new twist on sometning not documented previos

#1

I have looked through many previously posted questions on wrapping. Unfortunately, I have not found the information I am looking for.

Wrapping is working fine in one window, but in the windows with open .sql files, the wrap is not happening. Usually not a problem, but now, pasting in a block of data is running the width of the text out half a mile (figuratively).

This is how the wrapping is working in a new window just opened and not yet saved as a file
(please see figure 1 in the attached image)

That text contains no hard line endings.

Pasting that text into a window editing a .sql file, it looks like this.
(please see figure 2 in the attached image)

It scrolls way out to the right (hard to see unless expanded to full size).
(please see figure 3 in the attached image)

I looked in preferences, and found these settings
(please see figure 4 in the attached image)

I am stuck. How is wrapping enabled in a window editing sql?

0 Likes

#2

maybe set "word_wrap": true, if you always want word wrap enabled? You may need to do it in the syntax specific settings for SQL depending on where you have it set.
With a SQL file open, Preferences menu -> Syntax Specific will take you to the settings specific to files opened with SQL syntax.

0 Likes

#3

"word_wrap": "auto" will not wrap source code, which is why it’s applying in figure 1 since that’s still treated as plain text. You can set it to true to always wrap regardless of if it’s source code, or choose to only apply it to files with SQL syntax as mentioned above.

0 Likes

#4

I did not think word wrap applied to this scenario, because there are spaces between data items in the long list. I thought word wrap applies to strings without spaces.

Well, I thought wrong. Setting word wrap to true instead of auto enabled wrapping at the width of the window

Thank you for the soiution.

0 Likes