So I searched "settings" on the documentation, created the myLeoSettings.leo file in the .leo directory in my home, I opened the ctrl_b_i_u.py file which created a node for itself, saved the file and I am at the point where I am executing the script.
exception executing script > > File "/home/chris/.leo/scriptFile.py", line 9 > > <!DOCTYPE html> > > ^ > > SyntaxError: invalid syntax > > -------------------- > > line 8: > > * line 9: <!DOCTYPE html> > > line 10: <html> > > > line 11: <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# > githubog: http://ogp.me/ns/fb/githubog#"> > Chris On Monday, September 30, 2013 12:43:57 PM UTC-7, Chris George 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. > > 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]> 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]>wrote: >> >> > >> > > On Mon, 30 Sep 2013 12:51:08 -0500 >> > > Terry Brown <[email protected]> wrote: >> > > >> > > > On Mon, 30 Sep 2013 10:38:36 -0700 (PDT) >> > > > Chris George <[email protected]> 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]. >> > > 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.
