how to make bullets easier - shift+* is so time consuming!

6 views
Skip to first unread message

M)

unread,
Jan 6, 2009, 11:45:25 AM1/6/09
to TiddlyWiki
Oh, how shift+* is the bane of my existence. Its just takes so long to
press the shift key then find the * !

What I have done many times is simply use a period to create a more
efficient bullet. E.g.,

. one
. two
. three

Am I crazy to request a tweak for using a period for a bullet? Is
there something out there that can do it for me?

Eric Shulman

unread,
Jan 6, 2009, 12:08:09 PM1/6/09
to TiddlyWiki
Well, you *could* tweak the bullet formatter to recognize "." in
addition to "*", but I don't recommend it: if you ever want to share a
tiddler using your custom bullet syntax, it would require that the
receiving document also have the same tweak, or the bullets will
simply be rendered as-is (i.e. dots without indentation).

Nonetheless, if this is decreased portability is acceptable for your
specific use-case, the following code (in a tiddler tagged with
'systemConfig') should do the trick:
---------------
var f=config.formatters[config.formatters.findByField('name','list')];
f.match="^(?:[\\.\\*#;:]+)";
f.lookaheadRegExp=/^(?:(?:(\.)|(\*)|(#)|(;)|(:))+)/mg;
---------------

All this does is to add "\\." to the match pattern, and (\.) to the
lookahead pattern. Don't forget to save-and-reload for the change to
take effect.

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios


M)

unread,
Jan 6, 2009, 12:55:41 PM1/6/09
to TiddlyWiki
You gotta love TW for its flexibility and simplicity. Thanks Eric.
You're a star yet again.

M)

alten

unread,
Jan 8, 2009, 12:54:50 AM1/8/09
to TiddlyWiki


On Jan 7, 5:45 am, "M)" <marc.bu...@gmail.com> wrote:
> Oh, how shift+* is the bane of my existence. Its just takes so long to
> press the shift key then find the * !
...[snip]...
> there something out there that can do it for me?

You COULD type just one '*'. Then copy to clipboard and paste it when
you want it. Using shift-insert for paste is easier IMO than cntrl-v

Daniel Baird

unread,
Jan 10, 2009, 8:55:43 AM1/10/09
to Tiddl...@googlegroups.com
On Wed, Jan 7, 2009 at 2:45 AM, M) <marc....@gmail.com> wrote:
>
> Oh, how shift+* is the bane of my existence. Its just takes so long to
> press the shift key then find the * !

Multitouch is less fun on a keyboard than a trackpad, isn't it :)

Assuming you're using a proper keyboard rather than a laptop, there's
usually a star over above the numeric keypad. It's also next to a
forward slash, which is great for typing /* comment indicators */
without messing around with the shift key.

So maybe you can get away without any fiddling around with code. Just
a thought.

;Daniel


--
Daniel Baird
I've tried going to the XHTML <bar /> a few times, but it's always closed.

Mark S.

unread,
Jan 10, 2009, 12:11:23 PM1/10/09
to TiddlyWiki
Take 10 minutes to learn to touch type the * very * fun * to * type *
asterisk * key. Left pinky on shift, second right hand finger taps the
number 8.

At least the asterisk key is in the same place on most keyboards
(shift-8). Unlike the various navigational keys added presumably for
the benefit of windows users.

> Using shift-insert for paste is easier IMO than cntrl-v

Maybe if you never change keyboards. There doesn't seem to be a
universal standard for those modern keys (del, ins, left, right, up,
down) and all bets are off if you are using a laptop or a keyboard for
a portable, small-footprint keyboard.

Meanwhile, 'control' is always in the corner, and 'v' is right below
the left home key.

-- Mark

On Jan 10, 5:55 am, "Daniel Baird" <danielba...@gmail.com> wrote:

M)

unread,
Jan 12, 2009, 4:31:46 PM1/12/09
to TiddlyWiki
> ---------------
> var f=config.formatters[config.formatters.findByField('name','list')];
> f.match="^(?:[\\.\\*#;:]+)";
> f.lookaheadRegExp=/^(?:(?:(\.)|(\*)|(#)|(;)|(:))+)/mg;
> ---------------

Eric, this turns the use of * into a numbered bullet. Is this a
problem on my side or the code above?

Eric Shulman

unread,
Jan 12, 2009, 6:49:02 PM1/12/09
to TiddlyWiki
> > var f=config.formatters[config.formatters.findByField('name','list')];
> > f.match="^(?:[\\.\\*#;:]+)";
> > f.lookaheadRegExp=/^(?:(?:(\.)|(\*)|(#)|(;)|(:))+)/mg;
>
> Eric, this turns the use of * into a numbered bullet.  Is this a
> problem on my side or the code above?

Nuts! Despite that power that regExp pattern matching provides, it's
precisely this kind of subtle stuff that makes it such as PITA to work
with!

The problem is that the parenthesized term: (\.) that was added to the
lookaheadRegExp shifted the index for the other parenthesized terms
that follow it, so that they no longer line up with the corresponding
handlers in the core code. As a result, * now produces a "numbered
list", while # erroneously results in a "definition list". To fix
this, change this:
f.lookaheadRegExp=/^(?:(?:(\.)|(\*)|(#)|(;)|(:))+)/mg;
to
f.lookaheadRegExp=/^(?:(?:([\*\.])|(#)|(;)|(:))+)/mg;

i.e., (\.)|(\*) becomes ([\*\.]), so that only a single set of
parentheses are used.

M)

unread,
Jan 12, 2009, 10:16:59 PM1/12/09
to TiddlyWiki
that did it. Thanks!
Reply all
Reply to author
Forward
0 new messages