Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paste-able mode in terminal #995

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

Paste-able mode in terminal #995

takluyver opened this issue Nov 13, 2011 · 5 comments
Milestone

Comments

@takluyver
Copy link
Member

%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
Copy link
Member

minrk commented Nov 18, 2011

Isn't this what %cpaste is for?

@takluyver
Copy link
Member Author

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
Copy link
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.

@takluyver
Copy link
Member Author

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
Copy link
Member Author

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.

@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
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants