Paste-able mode in terminal #995

Closed
takluyver opened this Issue Nov 13, 2011 · 5 comments

Comments

Projects
None yet
3 participants
@takluyver
Owner

takluyver commented Nov 13, 2011

%paste isn't very helpful using IPython in an SSH session, as it pastes from the server clipboard. (SO question)

I suggest we add a mode that:

  • Disables autoindenting
  • Prepends if True:\n to cells, so that indented code will work

I think this could be done in an extension.

@minrk

This comment has been minimized.

Show comment Hide comment
@minrk

minrk Nov 18, 2011

Owner

Isn't this what %cpaste is for?

Owner

minrk commented Nov 18, 2011

Isn't this what %cpaste is for?

@takluyver

This comment has been minimized.

Show comment Hide comment
@takluyver

takluyver Nov 18, 2011

Owner

It is, but I think there are still advantages to having a paste mode. You wouldn't need extra typing to go between pasting and executing, and code you'd pasted would appear in history.

Dropping priority to low.

Owner

takluyver commented Nov 18, 2011

It is, but I think there are still advantages to having a paste mode. You wouldn't need extra typing to go between pasting and executing, and code you'd pasted would appear in history.

Dropping priority to low.

@bfroehle

This comment has been minimized.

Show comment Hide comment
@bfroehle

bfroehle Aug 12, 2012

Contributor

It is, but I think there are still advantages to having a paste mode. You wouldn't need extra typing to go between pasting and executing, and code you'd pasted would appear in history.

But, you would need extra typing to go between "regular" mode and "paste" mode. This doesn't seem like any less work than typing %cpaste. The history saving issue is already being tracked in #1384.

I suggest we close this issue.

Contributor

bfroehle commented Aug 12, 2012

It is, but I think there are still advantages to having a paste mode. You wouldn't need extra typing to go between pasting and executing, and code you'd pasted would appear in history.

But, you would need extra typing to go between "regular" mode and "paste" mode. This doesn't seem like any less work than typing %cpaste. The history saving issue is already being tracked in #1384.

I suggest we close this issue.

@takluyver

This comment has been minimized.

Show comment Hide comment
@takluyver

takluyver Aug 12, 2012

Owner

It's being tracked, but not worked on - the subject of #1384 doesn't fit in our current architecture (we store history before executing a cell). This would be rather easier to implement.

Owner

takluyver commented Aug 12, 2012

It's being tracked, but not worked on - the subject of #1384 doesn't fit in our current architecture (we store history before executing a cell). This would be rather easier to implement.

@takluyver

This comment has been minimized.

Show comment Hide comment
@takluyver

takluyver Mar 11, 2014

Owner

I think this can now be closed - code with leading whitespace works again (although through input transformations, not by prepending if True:), and autoindent can be toggled on and off with the %autoindent magic.

Owner

takluyver commented Mar 11, 2014

I think this can now be closed - code with leading whitespace works again (although through input transformations, not by prepending if True:), and autoindent can be toggled on and off with the %autoindent magic.

@takluyver takluyver closed this Mar 11, 2014

@minrk minrk modified the milestones: 2.0, wishlist Mar 11, 2014

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