Re: Using Prompt Toolkit to edit terminal inputs in a screen editor.
Carl Smith <[email protected]> Tue, 19 Jul 2016 18:12:47 +0100
| Newsgroups | gmane.comp.python.ipython.devel |
|---|---|
| Message-ID | <CAP-uhDcL1mj3fYN7JmZR8u0HsA6nU7JBDK7V0j4t7V0G147gdQ@mail.gmail.com> |
On 19 July 2016 at 18:01, Thomas Kluyver <[email protected]> wrote: > On 19 July 2016 at 17:58, Carl Smith <[email protected]> wrote: > >> The documented APIs for the inaccessible PT features involve passing >> stuff to their `parse` method, using named args, but there's no obvious way >> to attach the same stuff to a running instance. Any ideas would be >> appreciated. As a concrete example, how would an IPython user add a bottom >> toolbar: >> > > I think that's something we'd need to expose. I'm planning to investigate > adding a bottom toolbar for IPython 6. > Cool. It'd be nice if there was a way to define some of this stuff on a running instance, instead of you guys having to push each feature by hand, but I'm just being impatient really. Each new feature will need properly integrating into IPython anyway. On keys for the editor feature, users can do `from prompt_toolkit.keys import Keys`, then use stuff like `Keys.ControlV` easily. The PT API would make it pretty simple to take a user's Key subclass and set up their shortcut. I think only do it once per session though, like any event handler. Best, and thanks again Thomas. You do an awesome job with the Python community. _______________________________________________ IPython-dev mailing list [email protected] https://mail.scipy.org/mailman/listinfo/ipython-dev