GeezerVison is showing github.com — Block history · Issue #22 · bpython/bpython
Descriptioneggy 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.
Reacted by Robbie Clarken, Nikita Melentev, Rogério Almeida, leebobbitt, Dmitry Stepanov, Metin Yazici and Aristide Activityikanobori commented 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.

Original Comment By: ikanobori commented 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: ikanobori commented 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: ikanobori commented 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 ikanobori commented on Jul 4, 2014 ContributorAuthor More actions ikanobori commented 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 ikanobori commented 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 thomasballinger commented on Aug 10, 2014 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. thomasballinger commented on Jan 25, 2015 I'm once again excited about this, it would take some effort but I'm thinking about it now. rsalmei commented on Aug 11, 2016 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? thomasballinger commented on Aug 11, 2016 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 pohmelie commented on Aug 24, 2017 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
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|