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

Implemented Split Cell for multicursor #4824

merged 3 commits into from Jun 3, 2020


Copy link

I took the current split cell functionality and made it work for multicursor. The help message for split cell is also updated to imply multicursor splitting is possible.

This can be done by putting the cursor at multiple locations (Alt+Drag/Ctrl+Click) and pressing Ctrl+Shift+Minus. The result should be new cells split at each of the cursors.

Additionally, this PR now makes cell splitting handles selections, so if you select a piece of code/text, then hit Ctrl+Shift+Minus, it'll put the selected text in a new cell with the text before/after the text going into their own cells. It is able to handle a combination of cursors and selections.

I retained the functionality of removing newlines at the beginning and end of the created cells, so the original single cursor behavior remains the same.

Copy link

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@blink1073 blink1073 added this to the 6.1 milestone Jun 3, 2020
@blink1073 blink1073 merged commit cf5cb64 into jupyter:master Jun 3, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants