How do I turn off line wrap?

Things I have tried

I’ve checked settings, the help site, and the v1.0 announcement, none of which acknolwedge the existence of line wrapping.

What I’m trying to do

I’m trying to turn line wrapping off completely, which is how I had Obsidian configured pre-v1.0, because forcing line wrapping on has broken the formatting and workflow for my entire vault.

1 Like

Have you tried disabling Editor > Readable line length?

Yes, that just controls how short the wrapped lines are.

What’s the behavior with the default theme, without any css snippet and plugins?

Line wrapping with no obvious way to turn it off.

I don’t remember there being a setting for this (maybe my memory is faulty). Were you using a CSS snippet that was broken by the recent theming update?

Did you ever find a solution? I’m have the exact same issue line wrap setting is just seemingly gone with no replacement to be found and it’s driving me up a wall.

No, there’s mostly just been a collective unawareness that turning off line wrap was even a thing. (Which is perhaps an insight into why Obsidian felt it could be ripped out without notice. :confused: )

That is unfortunate.

I can confirm that there’s a line wrap toggle before but seems to be missing from 1.0.0. honestly i don’t find it so useful because it makes all unwrapped. But some uses it have better code editing experience. If that’s what matter see post below

2 Likes

Thanks, wasn’t quite what I needed but did point me in the right direction.

For anyone else who finds this post later. I used the following css snippit and it worked for me.

/* Line wrap*/                                                                           
.cm-line {                                                                      
    white-space: pre;                                                           
}                                                                               
                                                                                
/* code block only - scrollbar. Editing & Reading */                            
.HyperMD-codeblock, .markdown-preview-view pre code {                           
    white-space: pre;                                                           
}    

Thank you, this seems to get the job done and it’ll make things a lot less aggravating.