In '@settings' -> '@data contextmenu_commands', add the following lines:
----
delete-node Delete Node
copy-node Copy Node
paste-node Paste Node
cut-node Cut Node
----
The contextmenu.py plugin is your friend :)
-->Jake
On 11/24/2013 2:24 PM, Chris George wrote:
What a useful addition, Fidel. I don't know how many times I have
caught myself looking for those functions on a right click.
Chris
On Sunday, November 24, 2013 11:00:34 AM UTC-8, Fidel N wrote:
How can we suggest our optimizations into bzr?
I made changes on leopluggins.leo and now I can right-click
copy/paste/cut/clone nodes, but IDK how to suggest those changes
on bzr...
On Sunday, November 24, 2013 7:09:53 PM UTC+1, wgw wrote:
I'm not a developer (though I have some aspirations in that
direction), but I would say: this is great, and no distraction
at all. It is useful for me to see how code can be polished.
At the same time, to facilitate the incorporation of tweaks
into the code, you might consider setting up a bzr account.
That would make it a snap to fold your optimizations into Leo.
Best,
Bill
On Sunday, 24 November 2013 08:53:39 UTC-8, Reinhard Engel wrote:
Some other function: The second one is short and faster
than the first.
def computeLeadingWhitespaceWidth (s,tab_width):
w = 0
for ch in s:
if ch == ' ':
w += 1
elif ch == '\t':
w += (abs(tab_width) - (w % abs(tab_width)))
else:
break
return w
def computeLeadingWhitespaceWidth2(s, tab_width):
t = s.expandtabs(abs(tab_width))
return len(t) - len(t.lstrip())
I don't know - are such micro-optimizations welcome or
just a distraction?
--
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/groups/opt_out.
--
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/groups/opt_out.