xit-sublime icon indicating copy to clipboard operation
xit-sublime copied to clipboard

Word-wrap only works when unchecked

Open ianobermiller opened this issue 2 years ago • 4 comments

I like that wrapped lines are automatically indented, but it seems to break when you check the item.

image

ianobermiller avatar Apr 02 '22 19:04 ianobermiller

Could you describe the steps you are doing?

How it actually should work is if you press ENTER it should start a new item (i.e. a new line with a checkbox), and if you press SHIFT+ENTER it should continue the description on the next line (with indentation). Below a quick video on how that behaves on my end:

https://user-images.githubusercontent.com/3618384/161398478-847be8c4-4a18-433b-b016-ffa11197f214.mov

jotaen avatar Apr 02 '22 19:04 jotaen

Sorry that wasn't clear. I'm not talking about hitting enter or shift enter. I'm talking about when the task soft-wraps to the next line. I noticed that when xit was active, the line will soft wrap with a 4 space indentation so it aligns nicely, but that only works for unchecked tasks.

ianobermiller avatar Apr 02 '22 20:04 ianobermiller

Ah I see, I didn’t even know it did that. I’ll see whether the word wrap behaviour can be configured at all in Sublime.

jotaen avatar Apr 02 '22 20:04 jotaen

So what I found out is that this has to do with the syntax scope. Checked and obsolete items have the comment scope assigned to them, which obviously alters the word wrapping behaviour.

I’ve filed a thread on the Sublime Forum, maybe someone with more knowledge about the Sublime innards may help out.

Another option would be to assign a different scope to these items, but I found none that has equal styling than comment.

jotaen avatar Aug 25 '22 11:08 jotaen