Skip to content

Added "Folding" Keybindings #4

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

Merged
merged 6 commits into from
May 19, 2020
Merged

Conversation

kmdalton
Copy link
Contributor

@kmdalton kmdalton commented Apr 25, 2020

I've added the following keybindings to hide and show code blocks analogous to vim folding.

  • Z, C hides the code in the selected cell
  • Z, O shows the code in the selected cell
  • Z, M hides the code in all cells
  • Z, R shows the code in all cells

I also bumped the version and added these shortcuts to README.md.

Kevin Dalton added 3 commits April 25, 2020 11:05
New keybindings
z-c : close selected cell code
z-o : open selected cell code
z-m : close all cell code
z-r : open all cell code
Copy link
Collaborator

@ianhi ianhi left a comment

Choose a reason for hiding this comment

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

I tried this out and it works, it's definitely a great addition!

I made suggestions for the documentation language as these commands are really working with cell objects rather than lines of code as in normal vim. But I think it could definitely be merged as is.

kmdalton and others added 2 commits April 29, 2020 20:07
Fixed language consistency.

Co-Authored-By: Ian Hunt-Isaak <[email protected]>
Fix language consistency

Co-Authored-By: Ian Hunt-Isaak <[email protected]>
@kmdalton
Copy link
Contributor Author

@ianhi , I approved your changes to make the language more clear.

Copy link
Collaborator

@ianhi ianhi left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Copy link
Collaborator

@axelfahy axelfahy left a comment

Choose a reason for hiding this comment

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

Thank you for the feature!

@axelfahy axelfahy merged commit 221bb3b into jupyterlab-contrib:master May 19, 2020
@ianhi
Copy link
Collaborator

ianhi commented May 19, 2020

@axelfahy thanks for adding! Does adding a new feature warrant a new release?

@axelfahy
Copy link
Collaborator

@ianhhi you're welcome. I am not sure what you mean by warrant, but to make the feature available easily (without cloning and compiling), a new release has to be made.

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.

3 participants