What is the option that makes Sublime Text add whitespace at the left of wrapped lines?
sublimetext, sublimetext3
Solution
Well, that was fun. There's no easily accessible setting for this. But as you indicate, ST decides whether to add an extra indent when soft wrapping, from whether the syntax is considered code-like or plain text-like.
Being one or the other is up to the package defining the syntax to specify. So lacking a global setting from ST, you need to change your text packages. As an example, let's take `Text`. That contains `Plain text.tmLanguage`. In that you change
<key>scopeName</key>
<string>text.plain</string>
to
<key>scopeName</key>
<string>source.plain</string>
I'm unsure of whether there'll be ill effects from not keeping `.plain`.
One easy way to do this is to get the `PackageResourceViewer`package.
After install, do:
- cmdshiftp
- Type: `Open Resource`
- return
- Type: `Text`
- return
- Type: `Plain text.tmLanguage`
- Make your edit and save.
`PackageResourceViewer` will save the modified `Text` package to your Packages directory. And sublime will display files considered to have `Plain text`-syntax, like they are code.
The caveat is that you need to do this for every text-syntax you want to be considered code.
Problem
I want Sublime to treat my text files like they are source code files and show whitespace at the left of wrapped lines, like so: ``` beginning of long line blah blah blah, now it wraps and it keeps going after an automatic indent ``` I tried opening the console and setting the option manually: ``` view.settings().set('indent_subsequent_lines', True) ``` but nothing changes, any ideas?