Hi Terry, That works great. Thanks for doing this for me. Now I can spend time being productive and learning Leo at the same time.
Chris On Monday, September 30, 2013 2:22:15 PM UTC-7, Terry wrote: > > On Mon, 30 Sep 2013 13:51:06 -0700 (PDT) > Chris George <[email protected] <javascript:>> wrote: > > > Terry, > > > > How difficult would a plugin be? > > Easy enough I guess, included in revision 6083, just pushed. > > So, completely forget all previous instructions, particularly the bits > about getting code from github and executing it in a node. What's > needed now is: > > - create a myLeoSettings.leo file (done that, you can open existing > with Help -> myLeoSettings.leo) > - under @settings-->@keys-->@shortcuts put > > markup-inline-bold ! body = Ctrl-B > markup-inline-italic ! body = Ctrl-I > markup-inline-underline ! body = Ctrl-U > > - IMPORTANT: previously markup_inline_bold, now markup-inline-bold > etc. > - Use Help -> leoSettings.leo to open leoSettings.leo, and copy > the @enabled-plugins node > - paste this node into your myLeoSettings.leo as a child of the > @settings node > - just before the line in @enabled-plugins where it says > "# Alphabetical list of all Leo plugins" add a line: > > markup_inline.py > > - restart Leo > > That should be it, should work in all Leo files now. > > Cheers -Terry > > > > I would like to start putting together everything that it would take to > > make Leo the default choice for writers on Linux. If it works for me, > it'll > > work for many others. > > > > Chris > > > > > > > > On Monday, September 30, 2013 1:45:19 PM UTC-7, Terry wrote: > > > > > > On Mon, 30 Sep 2013 12:43:57 -0700 (PDT) > > > Chris George <[email protected] <javascript:>> wrote: > > > > > > > Hi Terry, > > > > > > > > I am probably about to appear very stupid, but myLeoSettings.leo > does > > > not > > > > exist on my computer. And myLeoSettings.leo does not appear in any > of > > > the > > > > Leo documentation or at least none that is searchable from the > website > > > > search box. > > > > > > Heh - for a while it seemed the Subject: line was wrong for this > > > thread, but I guess it's spot on after all :-) > > > > > > The web site's search function is somewhat limited, > "myLeoSettings.leo" > > > produces no hits, "myLeoSettings" produces many. > > > > > > Also, it's under the Help menu in Leo (not the first place you might > > > think to look for settings). And finally, > > > > > > https://bugs.launchpad.net/leo-editor/+bug/555014 > > > > > > the menu option does nothing if the file doesn't already exist. > > > > > > Cheers -Terry > > > > > > > > > > I searched using all caps, all lowercase and the camelcase you > provided. > > > > Nothing. > > > > > > > > Chris > > > > > > > > On Monday, September 30, 2013 12:29:41 PM UTC-7, Terry wrote: > > > > > > > > > > On Mon, 30 Sep 2013 12:05:23 -0700 > > > > > Chris George <[email protected] <javascript:>> wrote: > > > > > > > > > > > Hi Terry, > > > > > > > > > > > > I am now running rev. 6082. I have downloaded the ctrl_b_i_u.py > > > file. > > > > > > > > > > > > Now what? > > > > > > > > > > In you myLeoSettings.leo file, under > @settings-->@keys-->@shortcuts, > > > > > add the shrotcuts (in the body text of the '@shortcuts' node: > > > > > > > > > > markup_inline_bold ! body = Ctrl-B > > > > > markup_inline_italic ! body = Ctrl-I > > > > > markup_inline_underline ! body = Ctrl-U > > > > > > > > > > restart Leo > > > > > > > > > > Put the downloaded code in a node, and run it... normally you'd do > > > that > > > > > by hitting Ctrl-B, but we just redefined that :-) So use alt-x > > > > > execute-script instead. > > > > > > > > > > Now in the body you should be able to get > > > > > > > > > > **bold** *italic* :ul:`underline` > > > > > > > > > > with the expected keys. It should be fairly predictable when > there's > > > a > > > > > selection active. When there isn't, it just opens or closes the > > > markup > > > > > type depending on whether the last action was an open or close, so > I > > > > > guess nesting would be problem, but rst doesn't understand nesting > > > > > inline markup anyway. > > > > > > > > > > The difference between open and close only applies to underline, > where > > > > > the beginning and end delimiters are different - more a demo than > > > > > anything. > > > > > > > > > > To make the code active without the execute-script step it could > be > > > > > placed in a node which starts with @script, although you need > > > > > @bool scripting-at-script-nodes = True > > > > > under your @settings node then. > > > > > > > > > > Ideally it would be in a plugin (although it seems heavy to put > > > > > essentially one function in a plugin) or core, so it didn't need > its > > > > > own node in the target outline or @settings. > > > > > > > > > > Cheers -Terry > > > > > > > > > > > Chris > > > > > > > > > > > > > > > > > > On Mon, Sep 30, 2013 at 11:48 AM, Terry Brown < > [email protected]<javascript:>>wrote: > > > > > > > > > > > > > > > > > > > > > On Mon, 30 Sep 2013 12:51:08 -0500 > > > > > > > Terry Brown <[email protected] <javascript:>> wrote: > > > > > > > > > > > > > > > On Mon, 30 Sep 2013 10:38:36 -0700 (PDT) > > > > > > > > Chris George <[email protected] <javascript:>> wrote: > > > > > > > > > > > > > > > > > Hi Terry, > > > > > > > > > > > > > > > > > > I guess it does. > > > > > > > > > > > > > > > > > > It may seem silly, as I could just type the *, but Shift-8 > > > isn't > > > > > baked > > > > > > > into > > > > > > > > > muscle memory, Ctrl-b is. > > > > > > > > > > > > > > > > Sure, I was just confirming that was what you meant. I > haven't > > > used > > > > > > > > Emacs for years and years, but I still shift-ctrl-% for > > > find/replace > > > > > > > > (was that emacs? or something else?) and sometimes ctrl-x c > for > > > > > save? > > > > > > > > I don't remember, only my fingers do. > > > > > > > > > > > > > > > > Will try and find time to suss out those bindings. > > > > > > > > > > > > > > Quick stab at > > > > > > > > https://github.com/leo-editor/snippets/blob/master/ctrl_b_i_u.py > > > > > > > not very tested. > > > > > > > > > > > > > > Let me know if that works at all. > > > > > > > > > > > > > > But... it only works with today's Leo :-} i.e. it uses the > just > > > added > > > > > > > c.user_dict, so either you need to pull from bzr or wait until > > > > > tomorrow > > > > > > > and grab from http://www.greygreen.org/leo/ > > > > > > > > > > > > > > Cheers -Terry > > > > > > > > > > > > > > > Cheers -Terry > > > > > > > > > > > > > > > > > It boils down to being able to replicate those standard > word > > > > > processing > > > > > > > > > shortcuts in the edit pane and having them not conflict > with > > > other > > > > > key > > > > > > > > > combos in Leo. Abstracting it to other markup languages > would > > > be > > > > > cool > > > > > > > as > > > > > > > > > well, some people like RST, some people like Markdown. > > > Everyone > > > > > can use > > > > > > > > > Ctrl-b. > > > > > > > > > > > > > > > > > > Ckeditor looks interesting, but it isn't the buttons that > > > matter. > > > > > I > > > > > > > rarely > > > > > > > > > use the mouse for marking up text. > > > > > > > > > > > > > > > > > > Chris > > > > > > > > > > > > > > > > > > On Monday, September 30, 2013 10:12:01 AM UTC-7, Terry > wrote: > > > > > > > > > > > > > > > > > > > > On Mon, 30 Sep 2013 09:55:04 -0700 > > > > > > > > > > Chris George <[email protected] <javascript:>> wrote: > > > > > > > > > > > > > > > > > > > > > Hi Terry, > > > > > > > > > > > > > > > > > > > > > > Almost. That plus the ability to be writing along and > hit > > > > > Ctrl-b s > > > > > > > u d d > > > > > > > > > > e > > > > > > > > > > > n l y Ctrl-b and continue on. > > > > > > > > > > > > > > > > > > > > Which boils down to Ctrl-b inserting '*' if there's no > > > > > selection? > > > > > > > > > > > > > > > > > > > > Cheers -Terry > > > > > > > > > > > > > > > > > > > > > I had Leo working to the extent that I could type > suddenly > > > > > > > Ctrl-Alt-b > > > > > > > > > > and > > > > > > > > > > > have it retroactively add the markup but it was simply > too > > > > > much of > > > > > > > a > > > > > > > > > > leap > > > > > > > > > > > to change my work habits. Body memory takes years to > > > develop > > > > > and > > > > > > > is not > > > > > > > > > > > trivial to attempt to change. > > > > > > > > > > > > > > > > > > > > > > A set of keybindings that mimic the standard word > > > processing > > > > > key > > > > > > > > > > bindings > > > > > > > > > > > that then markup the text using RST or Markdown would > be a > > > > > huge > > > > > > > step > > > > > > > > > > > forward for me in using Leo. Right now I try to find > time > > > to > > > > > > > fiddle and > > > > > > > > > > > play with it, but that has been going on for almost > two > > > years > > > > > now > > > > > > > and I > > > > > > > > > > > have yet to commit to any serious work in Leo. > > > > > > > > > > > > > > > > > > > > > > Chris > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Mon, Sep 30, 2013 at 9:40 AM, Terry Brown < > > > > > [email protected] > > > > > > > <javascript:>>wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Mon, 30 Sep 2013 09:31:25 -0700 > > > > > > > > > > > > Chris George <[email protected] <javascript:>> > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > I need basic text formatting at the standard hot > key > > > > > level. ie. > > > > > > > > > > Ctrl-B > > > > > > > > > > > > for > > > > > > > > > > > > > bold, Ctrl-I for italic etc. while in the edit > window. > > > > > > > > > > > > > > > > > > > > > > > > [...] > > > > > > > > > > > > > > > > > > > > > > > > > I don't > > > > > > > > > > > > > need WSIWYG, RST markup works fine as it gives me > lots > > > of > > > > > > > output > > > > > > > > > > options. > > > > > > > > > > > > > > > > > > > > > > > > So Leo has support for CKEditor > > > http://ckeditor.com/demobuild > > > > > > > in > > > > > > > > > > now, > > > > > > > > > > > > although there are probably key binding conflicts > for > > > some > > > > > of > > > > > > > the keys > > > > > > > > > > > > you mention. > > > > > > > > > > > > > > > > > > > > > > > > But I'm wondering if wondering if what you're > saying, if > > > > > you're > > > > > > > ok > > > > > > > > > > > > using RST, is that you want to editing text and have > > > > > > > > > > > > > > > > > > > > > > > > ...then, suddenly, the... > > > > > > > > > > > > > > > > > > > > > > > > highlight 'suddenly', hit Ctrl-B, and have it become > > > > > > > > > > > > > > > > > > > > > > > > ...then, *suddenly*, the... > > > > > > > > > > > > > > > > > > > > > > > > i.e. RST markup for "bold". Is that the goal? > > > > > > > > > > > > > > > > > > > > > > > > Cheers -Terry > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > > > > > 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]<javascript:>. > > > > > > > > > > > > To post to this group, send email to > > > > > [email protected] > > > > > > > <javascript:>. > > > > > > > > > > > > > > > > > > > > > > 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] <javascript:>. > > > > > > > To post to this group, send email to > > > > > > > [email protected]<javascript:>. > > > > > > > > > > > > > > > > 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.
