There are a couple of solutions online but they are either 10 years old and no longer work or are written in objective C (And also very outdated). One solution involved AttributedText and changing the line break style every single time the content is updated, which for me would be hundreds of calls every few minutes. Surely this can't be the best way. I must be missing something here, there must be a way to set an NSTextView to wrap by char permanently.

I've tried this but it doesn't work and continues to wrap by word:

```
consoleTextView.textContainer?.lineBreakMode = NSLineBreakMode.byCharWrapping

```

I've also tried using the attributes inspector in xcode. I finally found the option for it but clicking it does nothing, it just continues to say 'empty selection' in the 'line breaking' field:

[![enter image description here](https://i.stack.imgur.com/e7Mv8.png)](https://i.stack.imgur.com/e7Mv8.png)