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

Documenting codemirror shorcuts. #4591

Merged
merged 6 commits into from Nov 26, 2013
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
87 changes: 87 additions & 0 deletions docs/source/interactive/cm_keyboard.rst
@@ -0,0 +1,87 @@
.. _cm_keyboard:

Some additional Codemirror keyboard shortcuts
=============================================

Because each cell of the IPython notebook is powered by Codemirror,
you can actually use a set of predetermined keyboard shortcuts to
write and manipulate your content in an easier way.
Copy link
Member

Choose a reason for hiding this comment

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

'an easier way' than what? Maybe just "...and manipulate your content easily"

Copy link
Member Author

Choose a reason for hiding this comment

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

he he... yes "easier" is comparative... it would be "easier" in Spanish... 😉


Below, you will find three tables listing the available shortcuts:
Copy link
Member

Choose a reason for hiding this comment

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

This seems unnecessarily complex. What about one table, with columns for 'PC shortcut' and 'Mac shortcut'?

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree, I will do the change...


* Basic, with the most common and used shortcuts.

* pcDefault, with a list of shortcuts specifically available for pc users.

* macDefault, with a list of shortcuts specifically available for mac users.

Basic
-----

============ ==========================
**Shortcut** **Action**
Copy link
Member

Choose a reason for hiding this comment

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

IIRC, Sphinx should style this as a table header row, without needing extra **.

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, great!

------------ --------------------------
Left go char left
Right go char right
Up go line up
Down go line down
End go line end
Home go line start
PageUp go begin cell
PageDown go end cell
Delete del char after
Backspace del char before
Enter newline and indent
Insert toggle overwrite
============ ==========================

pcDefault
---------

============ ==========================
**Shortcut** **Action**
------------ --------------------------
Ctrl-A select all
Ctrl-D delete line
Ctrl-Z undo
Shift-Ctrl-Z redo
Ctrl-Y redo
Ctrl-Home go begin cell
Copy link
Member

Choose a reason for hiding this comment

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

All of the 'go' need to be 'go to'. Also, 'begin cell' -> 'beginning of cell' / 'start of cell' / 'cell start' (the last sounds a bit awkward, but it's shortest). Likewise, 'end cell' -> 'end of cell' / 'cell end'.

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, go to will be... and I will take cell start/end because it is the shortest.

Alt-Up go begin cell
Ctrl-End go end cell
Ctrl-Down go end cell
Ctrl-Left go word left
Ctrl-Right go word right
Copy link
Member

Choose a reason for hiding this comment

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

When I said "all of the 'go'", that doesn't include these two. But I might phrase them 'go one word left/right'.

Copy link
Member Author

Choose a reason for hiding this comment

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

go one will be...

Alt-Left go line start
Alt-Right go line end
Ctrl-Back del word before
Ctrl-Delete del word after
Ctrl-[ indent less
Ctrl-] indent more
Copy link
Member

Choose a reason for hiding this comment

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

These are normally called 'indent' and 'unindent' / 'dedent'. I'd also switch the order round, to list indent before unindent.

Copy link
Member Author

Choose a reason for hiding this comment

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

OK

============ ==========================

macDefault
----------

============ ==========================
**Shortcut** **Action**
------------ --------------------------
Cmd-A select all
Cmd-D delete line
Cmd-Z undo
Shift-Cmd-Z redo
Cmd-Y redo
Cmd-Up go begin cell
Cmd-End go end cell
Cmd-Down go end cell
Alt-Left go word left
Alt-Right go word right
Cmd-Left go line start
Cmd-Right go line end
Alt-Back del word before
Ctrl-Alt-Back del word after
Alt-Delete del word after
Cmd-[ indent less
Cmd-] indent more
============ ==========================

1 change: 1 addition & 0 deletions docs/source/interactive/index.rst
Expand Up @@ -11,6 +11,7 @@ Using IPython for interactive work
shell
qtconsole
notebook
cm_keyboard
nbconvert
public_server

Expand Down
4 changes: 3 additions & 1 deletion docs/source/interactive/notebook.rst
Expand Up @@ -394,7 +394,9 @@ Ctrl-m . restart kernel
Ctrl-m h show keyboard shortcuts
============ ==========================


.. seealso::

:ref:`Some additional Codemirror keyboard shortcuts <cm_keyboard>`



Expand Down