history of multiline entries #571

Closed
juliantaylor opened this Issue Jul 13, 2011 · 5 comments

Comments

Projects
None yet
7 participants
@juliantaylor
Contributor

juliantaylor commented Jul 13, 2011

Repeating entries with multiple lines via the arrow-up key in 0.11 brings up every line separately which makes repeating them quite awkward due to the lack of operate-and-get-next support.
You have to use the %rep magic to get all lines all at once to edit
In 0.10 this was also done with the arrow-up key

Is there a configuration option to restore the old behavior?

0.11:
In [1]: for i in (1,2):
...: print i
...:
2*arrow-up
In [2]: for i in (1,2):

0.10:
In [1]: for i in (1,2):
...: print i
...:
arrow-up
In [2]: for i in (1,2):
print i

@takluyver

This comment has been minimized.

Show comment
Hide comment
@takluyver

takluyver Jul 23, 2011

Member

This is one of those things where whichever way it works, someone's always unhappy. The rationale behind using separate lines is that the terminal is a poor multiline editor, so getting a block of lines is just awkward (and the indentation looks off, because we can't put the ...: prefixes before each line). A config option isn't a bad idea, but hopefully it will be less of an issue as more people start using the Qt console.

Member

takluyver commented Jul 23, 2011

This is one of those things where whichever way it works, someone's always unhappy. The rationale behind using separate lines is that the terminal is a poor multiline editor, so getting a block of lines is just awkward (and the indentation looks off, because we can't put the ...: prefixes before each line). A config option isn't a bad idea, but hopefully it will be less of an issue as more people start using the Qt console.

@earl

This comment has been minimized.

Show comment
Hide comment
@earl

earl Aug 1, 2011

+1 for either restoring the old behaviour or at least making this configurable.

earl commented Aug 1, 2011

+1 for either restoring the old behaviour or at least making this configurable.

@chl

This comment has been minimized.

Show comment
Hide comment
@chl

chl Aug 1, 2011

The old behaviour was rather useful, at least for the kinds of short snippets that often occur in ad-hoc analytics. Please restore or make it a configuration option.

chl commented Aug 1, 2011

The old behaviour was rather useful, at least for the kinds of short snippets that often occur in ad-hoc analytics. Please restore or make it a configuration option.

@zeekay

This comment has been minimized.

Show comment
Hide comment
@zeekay

zeekay Aug 16, 2011

Also not a fan of this change. Please make this configurable!

zeekay commented Aug 16, 2011

Also not a fan of this change. Please make this configurable!

@hipertracker

This comment has been minimized.

Show comment
Hide comment
@hipertracker

hipertracker Sep 12, 2011

QT? Are you mad? If someone has access to X-Window he can use much better editors (there are a lot of IDEs). The problem is that now, there is nothing for pure terminal editing. That simple multiline history was useful for casual terminal users.

QT? Are you mad? If someone has access to X-Window he can use much better editors (there are a lot of IDEs). The problem is that now, there is nothing for pure terminal editing. That simple multiline history was useful for casual terminal users.

juliantaylor added a commit to juliantaylor/ipython that referenced this issue Oct 16, 2011

reenable multiline history for terminals
Add configuration variable InteractiveShell.multiline_history.
If it is True cells spanning multiple lines will be saved in history
as a single entry instead of one entry per line, as was the case in
ipython < 0.11.
closes gh-571

@fperez fperez closed this in bf4b2a0 Oct 18, 2011

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014

reenable multiline history for terminals
Add configuration variable InteractiveShell.multiline_history.
If it is True cells spanning multiple lines will be saved in history
as a single entry instead of one entry per line, as was the case in
ipython < 0.11.
closes gh-571

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014

Merge branch 'juliantaylor-multiline-history'
Restore multiline history (on by default) as it worked in the 0.10.x
series.  A new configuration variable
InteractiveShell.multiline_history can be set to control this behavior
for users who prefer not to have it on.

When True, cells spanning multiple lines will be saved in history as a
single entry instead of one entry per line

Closes gh-571.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment