You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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
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.
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.
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.
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?
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
Activity
ikanobori commentedon Jul 4, 2014
bpython-curtsieshas 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 commentedon Jul 4, 2014
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 commentedon Jul 4, 2014
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 commentedon Jul 4, 2014
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
ikanobori commentedon Jul 4, 2014
Issue #111 was marked as a duplicate of this issue.
Original Comment By: Andreas Stührk
ikanobori commentedon Jul 4, 2014
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 commentedon Jul 4, 2014
have a separate keypress for browsing up and down blocks.
ctrl-alt-p, ctrl-alt-n ?
Original Comment By: Anonymous
thomasballinger commentedon 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 commentedon Jan 25, 2015
I'm once again excited about this, it would take some effort but I'm thinking about it now.
rsalmei commentedon 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 commentedon Aug 11, 2016
rsalmei, there aren't any immediate plans to implement this that I know of. I suggest the following workarounds:
pohmelie commentedon 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 frombpython -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.