New goody for Stroll - outliner

260 views
Skip to first unread message

David Gifford

unread,
Aug 13, 2020, 10:41:44 AM8/13/20
to TiddlyWiki

Hi all

Saq created a plugin called Editor AutoLists. It is so good that I am now promoting it on my Goodies for Stroll site as a great add-on. It makes TiddlyWiki feel more like an outliner program like Dynalist or Roam.

Start the first line of an unordered (bulleted) list with an asterisk as usual.
Hit enter for a new line with an asterisk in place.
Hit tab to enter another asterisk (i.e., indent the line)
Hit enter again, and you have a new line with **
Backspace twice to go up to remove the extra * and return to the higher level list
Hit enter twice to exit the unordered list and write normally.


A personal word: I can't tell you how much it improved my writing. I created a 40 page static HTML in three short mornings, including the research. https://giffmex.org/ast/convenciones.literarias.html. This has changed the game for me. Give it a try.

Blessings, Dave

HioHio Jio

unread,
Aug 13, 2020, 11:39:31 AM8/13/20
to TiddlyWiki
Yeah, it does great help to me.
Thanks for sharing!


Saq Imtiaz

unread,
Aug 13, 2020, 1:41:08 PM8/13/20
to TiddlyWiki
I think shift-tab decreases the indent level as well. This was the product of a fun Reddit thread.

bimlas

unread,
Aug 13, 2020, 2:07:55 PM8/13/20
to TiddlyWiki
Honestly, this solution is more handy for me now than Streams, because I can handle list items the same way in a single tiddler as I do in Streams.

One feature is missing from me: indenting / deindenting the selected text. If multiple rows are selected at once, I like to change their indentation at the touch of a button. Is it possible or hard to implement?

Saq Imtiaz

unread,
Aug 13, 2020, 2:42:08 PM8/13/20
to TiddlyWiki
@bimlas I expected that this would be preferred over Streams by some, and that's a good thing. Streams shouldn't be used just for easier indenting/unindenting lists.

This was a very quick regexp based hack as a result of a reddit thread I came across where they had tried to implement something similar by means of buttons: https://www.reddit.com/r/TiddlyWiki5/comments/hufvs9/automatically_continue_bullet_list/

The actual code is here:

Its rough and not pretty. But I do think this could be extended to handle indenting selected lines. From what I remember I just ignored the selection when I wrote this.

Feel free to give it a go if you feel like it bimlas, otherwise I'll try to clean up the code and implement this when I can find the time.
Cheers,

Saq

JD

unread,
Aug 13, 2020, 3:31:34 PM8/13/20
to TiddlyWiki
Oh, this will be great! Select multiple rows, press tab, and they all gain an indent!

I hope you guys can give this an update ^^,

-jd

Saq Imtiaz

unread,
Aug 13, 2020, 5:14:23 PM8/13/20
to TiddlyWiki
@bimlas @JD

Assuming the following selection, would you expect the line that does not start with a * or # to be indented as well?

# It's a fez.
# I wear a fez now.
# Fezzes are cool.
Bow ties are cool.

Similarly should the following be indented on tab, or not:

It's a fez.
I wear a fez now.

My feeling is that any line selected should be indented/unindented, regardless of whether it is already part of a list. But what should the default list type be, * for unordered list?


On Thursday, August 13, 2020 at 8:07:55 PM UTC+2, bimlas wrote:

Stobot

unread,
Aug 13, 2020, 8:00:36 PM8/13/20
to TiddlyWiki
Wow, super excited for this as well! Fwiw I'd say yes and yes to your questions.

TW Tones

unread,
Aug 13, 2020, 8:20:04 PM8/13/20
to TiddlyWiki
David,

Thanks for helping us keep up with Saq's prolific work.

Saq,

I would see adding "tabs" into the editors and wikification process of tiddlywiki a great improvement. 
Of course the handling of tabs is almost identical to this bullet solution just they are invisible. 
Deciding on a standard tab size in view and edit or allow customisation? Using https://www.w3schools.com/cssref/css3_pr_tab-size.asp css may be sufficient.

The question now is how do we do this given tab is used for bullets in this solution?

Perhaps a smart tab, if # * etc proceeds it add/remove a # *
If no character or tab then add/remove an actual tab?

Regards
Tony

E Browns

unread,
Aug 13, 2020, 8:40:21 PM8/13/20
to tiddl...@googlegroups.com
Hi Saq! 

Yes, my expectation will be that it will be like giving /any/ row selected an * , even if it doesn't have one yet, but will add # if that's what the row currently has. 

Great stuff! 

-jd


--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/IGBYnK6PMH4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/b5cd60a7-32cf-4f21-9f11-ce859f8fbb0ao%40googlegroups.com.

E Browns

unread,
Aug 13, 2020, 9:04:30 PM8/13/20
to tiddl...@googlegroups.com
Ooh, but a plus on what Tony said, of a smarter detection. 

Maybe... 

`
# item
# item
object
`

When row 2 and 3 are selected then [tab] will produce

`
# item
## item
# object
`

But a linebreak separation will default it to an asterisk? Where the selection of row 2, [linebreak] and row4 here: 

`
# item
# item

object
`

Will produce

`
# item
## item

 * object
`

The  expected will be that [tab] will consider the row above it, defaulting to * if the above row is blank, and defaulting to [linebreak] * if the above row is not blank but does not contain (# or *)... Where [linebreak] will facilitate list wikification.

So how it considers what to add when above row begins with (# or *)... Maybe like this? 

Samples on row2 and row3 selection... 

`
# item
#* item
object
`

Becomes

`
# item
#** item
# object
`

And

`
# item
#* item
#* object
`

Becomes

`
# item
#** item
#** object
`
I wonder if others have the same expectations? 

-jd


On Fri, Aug 14, 2020, 05:14 Saq Imtiaz, <saq.i...@gmail.com> wrote:
--

TW Tones

unread,
Aug 13, 2020, 9:58:23 PM8/13/20
to TiddlyWiki
JD,

Almost correct I think.

  • There already is a button to add "*" to selected lines. 
  • Please don't add * to selected "blank" lines with a tab.
  • I want "a tab on a blank line to, 'add a tab' ", this is more intuitive anyway. Then Saq's solution would mean enter gives the next line with the same number of tabs on the previous line, just as it does with one or more * or #

Regards
Tony


On Friday, August 14, 2020 at 10:40:21 AM UTC+10, JD wrote:
Hi Saq! 

Yes, my expectation will be that it will be like giving /any/ row selected an * , even if it doesn't have one yet, but will add # if that's what the row currently has. 

Great stuff! 

-jd


On Fri, Aug 14, 2020, 05:14 Saq Imtiaz, <saq....@gmail.com> wrote:
@bimlas @JD

Assuming the following selection, would you expect the line that does not start with a * or # to be indented as well?

# It's a fez.
# I wear a fez now.
# Fezzes are cool.
Bow ties are cool.

Similarly should the following be indented on tab, or not:

It's a fez.
I wear a fez now.

My feeling is that any line selected should be indented/unindented, regardless of whether it is already part of a list. But what should the default list type be, * for unordered list?

On Thursday, August 13, 2020 at 8:07:55 PM UTC+2, bimlas wrote:
Honestly, this solution is more handy for me now than Streams, because I can handle list items the same way in a single tiddler as I do in Streams.

One feature is missing from me: indenting / deindenting the selected text. If multiple rows are selected at once, I like to change their indentation at the touch of a button. Is it possible or hard to implement?

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/IGBYnK6PMH4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddl...@googlegroups.com.

E Browns

unread,
Aug 13, 2020, 10:17:04 PM8/13/20
to tiddl...@googlegroups.com
Hi Tony, please see my reply detailing my expectation on selection of multiple lines  ^^,

I expect a different behavior when a linebreak or blank is between two rows. 

-jd


To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/31cdb128-63e8-44f8-84b3-31df7e9c1b69o%40googlegroups.com.

clutterstack

unread,
Aug 14, 2020, 10:15:10 AM8/14/20
to TiddlyWiki
This is really neat. Have only played briefly with it, since most of my TW writing is macros at the moment. But I can appreciate it nonetheless. It's fun!

bimlas

unread,
Aug 15, 2020, 4:15:56 AM8/15/20
to TiddlyWiki
Saq,

I think it's plenty enough to add a same character if the line starts with * or #, otherwise a tab (or two spaces; the indent type should be optional). Edge cases, when * and both "plain text" are within a paragraph, should be handled by the user instead of an overly complicated algorithm.

Thinking about how the plugin works, it is starting to look like CodeMirror, which works in a simple textarea instead of a "dedicated" div. Isn't there a ready-made solution for this already where the knowledge of the textarea is supplemented excluding the syntax highlight?

Saq Imtiaz

unread,
Aug 15, 2020, 4:32:57 AM8/15/20
to TiddlyWiki
@bimlas

Adding multiline support is easy if its limited to just ordered or unordered lists, that is: not a combination of both. When you start mixing the two it quickly becomes rather complicated to figure out what character to be adding to indent, with needing to look behind for several lines.

This was written as a quick solution to address an immediate and limited in scope request on reddit. So not a lot of thought has been put into larger architecture. However, I don't think there are any existing solutions that don't add a lot more complexity (and more lines of code).

Arguably you could write a core mirror plugin that handled this as well as other things as link autocompletion.
Reply all
Reply to author
Forward
0 new messages