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

Make 'Paste Above' the default paste behavior. #2572

Merged
merged 4 commits into from Nov 22, 2012
Merged

Make 'Paste Above' the default paste behavior. #2572

merged 4 commits into from Nov 22, 2012

Conversation

dwf
Copy link
Contributor

@dwf dwf commented Nov 12, 2012

Destructive paste mapped to Ctrl-M V is a surprising choice given that there was no drag-to-select on the area being replaced (there is a weaker notion of "selected cell" but this does not map to will-be-replaced-
by-paste in the minds of participants in an unscientific poll at PyConCA).

Destructive paste is still available as the last paste option in the Edit menu, qualified as "Paste Cell Replace".

Destructive paste mapped to Ctrl-M V is a surprising choice given that
there was no drag-to-select on the area being replaced (there is a
weaker notion of "selected cell" but this does not map to will-be-replaced-
by-paste in the minds of participants in an unscientific poll at
PyConCA).

Destructive paste is still available as the last paste option in the
Edit menu, qualified as "Paste Cell Replace".
<li id="paste_cell_above" class="ui-state-disabled"><a href="#">Paste Cell Above</a></li>
<li id="paste_cell_below" class="ui-state-disabled"><a href="#">Paste Cell Below</a></li>
<li id="paste_cell_replace" class="ui-state-disabled"><a href="#">Paste Cell Replace</a></li>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe say Paste Cell & Replace?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@fperez
Copy link
Member

fperez commented Nov 13, 2012

I'm on board with this idea, I've been bitten by the destructiveness of the default paste behavior of paste enough that I'm now convinced it's really not the best UI.

Let's leave this one here for a bit longer to give other people a chance to look at it too and comment.

@dwf
Copy link
Contributor Author

dwf commented Nov 13, 2012

One justification for paste-above vs. paste-below: pasting at a cursor position in a text editor displaces content forward.

Also this is how vim does full-line pastes via 'p' (if you e.g. yank via "-v y")

@Carreau
Copy link
Member

Carreau commented Nov 13, 2012

+1 . I'm sure this discussion is also somewhere else, but I don't find it.
Above or below, as long as it is not configurable, SO will complain.

@Carreau
Copy link
Member

Carreau commented Nov 13, 2012

@ellisonbg no objection on making past above the default ?

@ivanov
Copy link
Member

ivanov commented Nov 13, 2012

Hi David!

Slightly OT, I'm fine with either default behavior, but you wrote:

Also this is how vim does full-line pastes via 'p'

That's not the behaviour of 'p'

                            *p* *put* 
["x]p       Put the text [from register x] after the cursor
            [count] times.  {Vi: no count}

                            *P*
["x]P       Put the text [from register x] before the cursor
            [count] times.  {Vi: no count}

and this remains true for linewise changes (if you do a yy to yank a line, then edit that line to be something else, and press p, you'll see the original line pasted below)

@dwf
Copy link
Contributor Author

dwf commented Nov 13, 2012

Hmm, you're right. I guess I imagined that.

On Tue, Nov 13, 2012 at 6:30 PM, Paul Ivanov notifications@github.comwrote:

Hi David!

Slightly OT, I'm fine with either default behavior, but you wrote:

Also this is how vim does full-line pastes via 'p'

That's not the behaviour of 'p'

                        *p* *put*

["x]p Put the text [from register x] after the cursor
[count] times. {Vi: no count}

                        *P*

["x]P Put the text [from register x] before the cursor
[count] times. {Vi: no count}

and this remains true for linewise changes (if you do a yy to yank a
line, then edit that line to be something else, and press p, you'll see
the original line pasted below)


Reply to this email directly or view it on GitHubhttps://github.com//pull/2572#issuecomment-10348751.

[image: Web Bug from
https://github.com/notifications/beacon/V4WeLnGyQaVRVkc2bSJLzmSyzDafggi5JdoKbHu6EwvEirCrhqjHVYw6cqo9sG1j.gif]

@ellisonbg
Copy link
Member

I agree that the destructive paste is not a good default, but my initial intuition would be to have paste below as the default.

@dwf
Copy link
Contributor Author

dwf commented Nov 14, 2012

I'm not terribly picky. I tried out paste-above and it felt kinda natural,
so I ran with it. Anyone have an objection to changing it around to
paste-below?

On Tue, Nov 13, 2012 at 7:19 PM, Brian E. Granger
notifications@github.comwrote:

I agree that the destructive paste is not a good default, but my initial
intuition would be to have paste below as the default.


Reply to this email directly or view it on GitHubhttps://github.com//pull/2572#issuecomment-10350094.

[image: Web Bug from
https://github.com/notifications/beacon/V4WeLnGyQaVRVkc2bSJLzmSyzDafggi5JdoKbHu6EwvEirCrhqjHVYw6cqo9sG1j.gif]

@Carreau
Copy link
Member

Carreau commented Nov 16, 2012

I've no objection, it seems that nobody have. I'll let you change and I'll merge.

@Carreau
Copy link
Member

Carreau commented Nov 22, 2012

@dwf, I send you a pr that change default to past below.
After that I think we can merge.

@dwf
Copy link
Contributor Author

dwf commented Nov 22, 2012

Done. Sorry I didn't see it.

On Thu, Nov 22, 2012 at 7:42 AM, Bussonnier Matthias <
notifications@github.com> wrote:

@dwf https://github.com/dwf, I send you a pr that change default to
past below.
After that I think we can merge.


Reply to this email directly or view it on GitHubhttps://github.com//pull/2572#issuecomment-10633287.

[image: Web Bug from
https://github.com/notifications/beacon/J6T91GIPIyhU-8ti4GCGPyC60RZ_08dBF1RFh49nH6DtHVH7YmGgIfwvHJw3mRPK.gif]

@Carreau
Copy link
Member

Carreau commented Nov 22, 2012

no problem.

Seeing that travis failure are du to timeout of 0min (??) and that we don't test the js yet. I'll go forward and merge.

Thanks !

Carreau added a commit that referenced this pull request Nov 22, 2012
Make 'Paste Below' the default paste behavior in notebook.
@Carreau Carreau merged commit c161745 into ipython:master Nov 22, 2012
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
Make 'Paste Below' the default paste behavior in notebook.
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 this pull request may close these issues.

None yet

5 participants