CodeMirror: Wrap line on indent. Is it possible?

62 views
Skip to first unread message

Reet Pandher

unread,
Jun 6, 2020, 4:54:43 AM6/6/20
to TiddlyWiki
Hi,

In the codemirror editor the line wraps at the beginning of the editor rather than at the tab indent. Is there any way to fix it?
But i have no idea what they have done to make it work and how to do it in TW.
Any help would be appreciated.

PMario

unread,
Jun 6, 2020, 2:59:33 PM6/6/20
to TiddlyWiki
Hi,

What is the intention of a tab at the beginning in source text? ... It won't show up in the rendered text.

-m

PMario

unread,
Jun 6, 2020, 4:02:48 PM6/6/20
to TiddlyWiki
Hi,

I did have a closer look. As some text in the link stated, the code is a bit hacky. ... AND it seems to use a function, that is not part of the CM-version we use in the plugin.

So at the moment it's not that easy to implement behaviour like this.

It's also not clear, which tiddler-type you want to use. ... Or should it be a global behaviour?

-mario

Reet Pandher

unread,
Jun 6, 2020, 8:26:50 PM6/6/20
to TiddlyWiki
Hi Pmario,

I wanted it to be a global behaviour. I use codemirror specifically because the ability to indent using a tab indent allows me to rely less and less on the preview pane; it becomes really easy to see which line is the heading, sub-heading, main text etc. Very helpful in long typing sessions.
That's why the lines not wrapping at indent is a bit of nuisance as it takes away the clean look of the document. But if it can't be helped I'll make do with what i have.
I think I'll raise a request on Github anyway. Hopefully in the next versions of the plugin it'll be fixed!!

Thanks

Reply all
Reply to author
Forward
0 new messages