Yes, I've already put the setting into myLeoSettings.leo - it was a 
suggestion about consistency of the 'stock' settings.

FWIW here's the simple command I previously wrote to toggle the expand 
state. I had to make a small change, c.redraw() no longer accepts a 
'setFocus' keyword?

def toggleExpandState ():

""" Toggle the expand state of the current node

"""

trace = False and not g.unitTesting

# c = self; p = c.p

# set up the functions to call

if p.isExpanded():

fa = p.contract

frd = c.redraw_after_contract

else:

fa = p.expand

frd = c.redraw_after_expand

# perform the calls

fa()

if p.isCloned():

# if trace: g.trace('***redraw')

c.redraw()

else:

# frd(p,setFocus=True)

frd(p)

toggleExpandState()


On Tuesday, June 21, 2022 at 11:03:20 PM UTC+1 [email protected] wrote:

> Looks to me like an simple oversight.  In leoSettings.leo (where the base 
> key bindings are defined), Alt-[ is mapped to contract-node but only in 
> emacs mode.  Alt-] is mapped to expand-node in both regular and emacs 
> modes.  I didn't find any other mapping for Alt-[ that would conflict.
>
> I'd just go ahead and put it into your myLeoSettings.leo file if you 
> haven't already done so.
>
> On Monday, June 20, 2022 at 8:14:39 AM UTC-4 jkn wrote:
>
>> A couple of minor observations/questions.
>>
>> 1) Alt+] is mapped to 'expand node' by default. Any reason why Alt+[ is 
>> not mapped to 'contract-node' by default?
>>
>> 2) I would find it useful to have a 'toggle expand node' shortcut, so the 
>> same keystroke will toggle the expand state of the current node. I have a 
>> feelingthat I wrote such a command a long time ago. I will try to hunt it 
>> down, or re-create ... but would this be a good candidate to be a built-in 
>> 'primitive' within Leo?
>>
>> Thanks, Jon N
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/0e3b3092-bd07-4e33-ae05-232a71c94a75n%40googlegroups.com.

Reply via email to