GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Block history · Issue #22 · bpython/bpython

Block history #22

New issue
Copy link
New issue
Copy link
Open
Open
Block history#22
Copy link
Labels
bug

Description

@ikanobori
ikanobori
opened on Jul 4, 2014
Issue body actions

eggy has suggested we have block history. I agree it's a good idea, but I just don't know how to do it without it sucking.

I think that what we're going to have to do is allow the user to move up and down within a block, which means things might get pretty complicated. Also would be a good idea to allow inserting a new line inside the block.

If anyone has any ideas how to do this cleanly please post comments here.


  • Bitbucket: https://bitbucket.org/bobf/bpython/issue/22
  • Originally Reported By:
  • Originally Created At: 2009-06-10T14:08:15.077
Reacted by Robbie Clarken, Nikita Melentev, Rogério Almeida, leebobbitt, Dmitry Stepanov, Metin Yazici and Aristide

Activity

  1. ikanobori commented on Jul 4, 2014

    @ikanobori
    ikanobori
    on Jul 4, 2014
    ContributorAuthor
    More actions

    bpython-curtsies has a "send-to-editor" key that somewhat substitutes for this - but it's the entire history, not just one block command.

    demo


    Original Comment By:

  2. ikanobori commented on Jul 4, 2014

    @ikanobori
    ikanobori
    on Jul 4, 2014
    ContributorAuthor
    More actions

    For an example of this done well, see the Julia repl - I'm not a big fan of block history, but it treats it nicely. There is of course still the issue of hitting up and getting a block when you wanted a line, for which I guess we'd still need a block mode you could turn off.


    Original Comment By:

    Reacted by Lasse
  3. ikanobori commented on Jul 4, 2014

    @ikanobori
    ikanobori
    on Jul 4, 2014
    ContributorAuthor
    More actions

    how about, browsing history normally and if history entry is multiline pressing enter would enter edit mode for that block, exiting from it can be normal exiting from multiline block or ctrl+enter


    Original Comment By:

  4. ikanobori commented on Jul 4, 2014

    @ikanobori
    ikanobori
    on Jul 4, 2014
    ContributorAuthor
    More actions

    Block history and block editing is the last thing needed to make me switch from ipython to bpython. Ipython's block editing is not great, but it is better than line-by-line history. It is tedious and ineffective to change a funciton or class by re-adding it line by line.


    Original Comment By: David Fendrich

    Reacted by Hunter xue, William Lee, Abraham Murciano, Martin Thoma, Joshua Bronson and Šimon Mandlík
  5. ikanobori commented on Jul 4, 2014

    @ikanobori
    ikanobori
    on Jul 4, 2014
    ContributorAuthor
    More actions

    Issue #111 was marked as a duplicate of this issue.


    Original Comment By: Andreas Stührk

  6. ikanobori commented on Jul 4, 2014

    @ikanobori
    ikanobori
    on Jul 4, 2014
    ContributorAuthor
    More actions

    I do not like this suggestion. In fact I do not like block history at all, but if we decide to do this we should need a shortcut to go into and out of block mode.


    Original Comment By: Simon de Vlieger

  7. ikanobori commented on Jul 4, 2014

    @ikanobori
    ikanobori
    on Jul 4, 2014
    ContributorAuthor
    More actions

    have a separate keypress for browsing up and down blocks.
    ctrl-alt-p, ctrl-alt-n ?


    Original Comment By: Anonymous

  8. thomasballinger commented on Aug 10, 2014

    @thomasballinger
    thomasballinger
    on Aug 10, 2014
    Member
    More actions

    What about a separate "block browser" mode? View previous blocks, edit them in an external editor, then plunk one down? Otherwise the thing that makes the most sense to me is a separate key for block history - displaying the entries will be icky (should be entered into the buffer each time), but possible. Along with the new "edit current block" key (ctrl-x by default (yes this isn't a great keybinding)) being able to change the current buffer could be possible.

  9. thomasballinger commented on Jan 25, 2015

    @thomasballinger
    thomasballinger
    on Jan 25, 2015
    Member
    More actions

    I'm once again excited about this, it would take some effort but I'm thinking about it now.

  10. rsalmei commented on Aug 11, 2016

    @rsalmei
    rsalmei
    on Aug 11, 2016
    More actions

    Hello, please, are there any news in this regard?
    I think bpython is great, but I'm really missing block editing. It is really important for some projects, where we need to modify classes and functions often. Line-by-line is a no go in all but a few pretty simple cases, with no more then 2 or 3 lines.
    Please?

    Reacted by Lasse
  11. thomasballinger commented on Aug 11, 2016

    @thomasballinger
    thomasballinger
    on Aug 11, 2016
    Member
    More actions

    rsalmei, there aren't any immediate plans to implement this that I know of. I suggest the following workarounds:

    • ctrl-x opens the current block in a text editor
    • F7 opens the entire session in a text editor, then reruns on closing the text editor
    • a two-terminal workflow where you reload a module by pressing F6
    • with the optional dependency of watchdog installed, automatically reload modules when they change (F5 toggles this feature)
    Reacted by Rogério Almeida, Walter Simson, Martin Patz, Moa Raji, Raul Vítor da Silva Barreto, Avi Mehenwal and leebobbitt
    Reacted by Avi Mehenwal
  12. pohmelie commented on Aug 24, 2017

    @pohmelie
    pohmelie
    on Aug 24, 2017
    More actions

    This is really good feature. Sometimes you have typo, sometimes you missed x = [] before appending in cycle, so block edit inside(!) bpython is must have, I think. Edit file and reload is boring, this does not differs from bpython -i tmp.py. Also, lack of this feature force me to use ugly one-liners, because I keep in mind, that I can have mistakes in code.

    Reacted by Nikola Toshev, Martin Patz, Moa Raji, William Lee, Dmitry Stepanov and Lasse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.