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

Ipython Notebook: Improved code editing functions #5422

Open
palob opened this issue Mar 24, 2014 · 6 comments
Open

Ipython Notebook: Improved code editing functions #5422

palob opened this issue Mar 24, 2014 · 6 comments
Labels
Milestone

Comments

@palob
Copy link

palob commented Mar 24, 2014

While I'm an enthusiastic Ipython user I want to point out some usability restraints of the IPython Notebook editor:

  • There is no 'Find/Replace' method for code editing.
  • For there are no universal Comment/Uncomment , Indent/Unindent keyboard shortcuts: what about toolbar buttons for this functions?
  • A 'toggle line numbers' applying to all cells keyboard shortcut/button would be helpful. By the same token a way to show the current column number would be helpful.
  • When doing extensive inline plotting and using multiple cells in one document things can get confusing. What about a folding feature for code cells as well as for cell output?
  • I propose adding basic shortcuts (e.g. Undo/Redo --> Ctrl+Z/Y) to the shortcut help.
@minrk minrk added this to the wishlist milestone Mar 24, 2014
@jdfreder
Copy link
Member

Hi @palob,

Thanks for the feedback. In the context of IPython 2.0rc:

There is no 'Find/Replace' method for code editing.

See
#3270

For there are no universal Comment/Uncomment , Indent/Unindent keyboard shortcuts: what about toolbar buttons for this functions?

These shortcuts already exist:
ctrl-/ toggles comments.
tab and shift-tab indents and unindents blocks of text.

However, we do not have toolbar buttons for them yet.

A 'toggle line numbers' applying to all cells keyboard shortcut/button would be helpful. By the same token a way to show the current column number would be helpful.

This doesn't exist yet, but I hope you are aware of l in command mode, which toggles line numbers in the selected cell.

When doing extensive inline plotting and using multiple cells in one document things can get confusing. What about a folding feature for code cells as well as for cell output?

See:
#2284
#4211

I propose adding basic shortcuts (e.g. Undo/Redo --> Ctrl+Z/Y) to the shortcut help.

x, c, and v are already in the keyboard shortcut help for command mode. They do not exist in the help for edit mode because of the same reason insert, page-up, etc are not included.

Cheers,
Jon

@juhasch
Copy link
Contributor

juhasch commented Mar 26, 2014

For codefolding in CodeMirror, you could try the extension here:
https://github.com/ipython-contrib/IPython-notebook-extensions/wiki/Codefolding

@jdfreder
Copy link
Member

@juhasch that is a really cool extension you wrote! I wasn't aware of it, thanks for pointing it out. I'll probably start using it myself.

@juhasch
Copy link
Contributor

juhasch commented Mar 26, 2014

Thanks, I hope you will like it. I use it every day and it works quite well for me. There is also a preprocessor for nbconvert to export folded code in notebooks.

@palob
Copy link
Author

palob commented Mar 28, 2014

Thanks @juhasch, that is exactly what I was looking for. As for the output scroll/unscroll/hide function: at least in 1.2.1 the left side toggle bar can be overlain by pyplot outputs.
As a result there is only a tiny frame left accessible.

@juhasch
Copy link
Contributor

juhasch commented Mar 29, 2014

@palob You might want to open an issue here:
https://github.com/ipython-contrib/IPython-notebook-extensions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants