Hi,
I'd like to disable soft wrapping for URLs when writing in markdown (I find it distracting when a long URL wraps, especially when it's forced to start on the next line).
I tried adding this settings item, scoped to 'text.html.markdown markup.underline.link':
{ softWrap = :false; }
...but the URLs still wrap. Is this a problem with my scope selector, or is there an errant settings item somewhere that might be overriding mine?
–Adam
On Feb 24, 2013, at 4:04 AM, Adam Sharp adsharp@me.com wrote:
[…] adding this settings item, scoped to 'text.html.markdown markup.underline.link' […] Is this a problem with my scope selector, or is there an errant settings item somewhere that might be overriding mine?
The problem is that soft wrap is determined on a line-by-line basis, so it consults the (scoped) settings using the first/last scope of the line (as left/right scope), rather than on a word-by-word basis.
For your use-case it might be more appropriate to indicate that the markup.underline.link is “one unit” as far as wrapping is concerned. It’s no simple change though, but I’ll keep it in mind: presently we do have the character class system for defining words, whitespace, and other things, and that’s used for word movement and selection. It seems wrapping is a natural fit here, but at the same time, we also need to perhaps have different unit definitions for the different things, for example the word completion also use the system, which isn’t desired in languages that use different prefixes for variables, depending on how they are being accessed.