Commit Graph

4162 Commits

Author SHA1 Message Date
Paul Ivanov
38e440c0a9 Merge pull request #5346 from hmeine/custom_js_docs
give hint on where to find custom.js
2014-03-20 00:50:42 -07:00
Thomas Kluyver
8e1146c6d1 Merge pull request #5357 from minrk/smb-fails
catch exception in copystat
2014-03-19 15:13:14 -07:00
MinRK
62061f0294 only catch errors in copystat 2014-03-19 12:22:33 -07:00
Min RK
d88b2ccc4a Merge pull request #5310 from ivanov/fix-5238
remove raw cell placeholder on focus, closes #5238
2014-03-19 12:21:03 -07:00
Min RK
5c5139b65d Merge pull request #5332 from ivanov/semantic-icons
semantic names for indicator icons
2014-03-19 12:20:07 -07:00
Paul Ivanov
c54ced12e5 Merge pull request #5360 from minrk/monospace
remove some redundant font-family: monospace
2014-03-19 11:25:12 -07:00
Paul Ivanov
2e4036fd4f raw cell placeholder text as one line 2014-03-19 10:42:11 -07:00
Paul Ivanov
37852baa6d render on focus out, always pad raw cells 2014-03-19 10:37:59 -07:00
Paul Ivanov
8a623dbcc4 fab css 2014-03-18 12:06:06 -07:00
Paul Ivanov
955d239d07 rename css class names to be consistent with current style 2014-03-18 12:03:43 -07:00
Fernando Perez
5f086fded2 Merge pull request #5372 from minrk/no-close-strings
Don't autoclose strings, because CodeMirror's behavior makes it confusing and awkward to type triple-quoted strings (and these are very common in Python).

An issue about this was filed in CodeMirror itself: https://github.com/marijnh/CodeMirror/issues/2385
2014-03-18 11:14:24 -07:00
MinRK
3c1fe84f52 Don't autoclose strings
CodeMirror doesn't do the right thing with triple-quoted strings,
so don't let it try.
2014-03-18 11:11:28 -07:00
Min RK
e64c2cb5d8 Merge pull request #5296 from ivanov/more-shortcuts
unify keyboard shortcut and codemirror interaction
2014-03-18 09:46:07 -07:00
Paul Ivanov
0c366861c5 brief key event desription 2014-03-17 21:09:51 -07:00
Paul Ivanov
6d6e0fb007 fix up and down arrows in the top and bottom cells 2014-03-17 20:11:33 -07:00
Paul Ivanov
09866e0ee1 go to the beginning of the line when entering cell 2014-03-17 17:41:44 -07:00
Paul Ivanov
96848748de restore master behavior
up arrow at the top line first goes to char 0, and only goes to the cell
above if already on char 0. Same with down arrow on the bottom line:
transition cursor to the end of the line, and only go down a cell if
already at the end of the last line.

this makes for an unhappy experience in code-mirror's vim mode  for j
and k keys, but we'll fix that in the next commit
2014-03-17 16:21:23 -07:00
Paul Ivanov
8f17444c27 go to appropriate line when coming from another cell
Sets the cursor on the last line of the cell when moved up from the top
of the cell below, and sets the cursors to the first line when moving
down from the bottom of a last line.

Here, we retain the character that the cursor was on, so that users
wishing to have up-down functionality like one document can still use
this shortcut handler and simple adjust the at_top and at_bottom methods
2014-03-17 15:48:36 -07:00
MinRK
8e5937e993 remove some redundant font-family: monospace
`pre`, `code` tags already set the font-family in these contexts.
Setting it again in the surrounding context is redundant,
and causes inconsistency when embedding notebooks in HTML
(e.g. nbviewer).
2014-03-14 11:43:11 -07:00
MinRK
caee63f413 fallback on copy, copyfile if copy2 fails
in notebook manager
2014-03-14 10:06:02 -07:00
Paul Ivanov
61b47695e4 renamed 'use_shortcut' method to 'handles' 2014-03-13 16:44:19 -07:00
Paul Ivanov
d8287466d0 another doc fix 2014-03-13 16:40:37 -07:00
Paul Ivanov
f68dcc3e57 it's only half true that I'm anal about semicolons 2014-03-13 16:30:58 -07:00
Paul Ivanov
67fd905421 minor fixes to docs to address PR feedback 2014-03-13 16:29:28 -07:00
Paul Ivanov
469c70fd10 more semicolons 2014-03-13 16:23:27 -07:00
Paul Ivanov
05838b7c2e Merge pull request #5340 from minrk/btcss
install bootstrap-tour css
2014-03-13 14:31:52 -07:00
Paul Ivanov
1dc113a9cb closes #5336 2014-03-13 14:30:32 -07:00
MinRK
07b8b93e96 install bootstrap-tour css 2014-03-13 14:30:32 -07:00
Hans Meine
b771250c7e give hint on where to find custom.js 2014-03-13 07:53:57 +01:00
Paul Ivanov
4142911ac7 better fix for starting with Command Mode icon 2014-03-11 18:58:46 -07:00
Paul Ivanov
12139b4d6e ensure ipython-command-mode icon displayed on load 2014-03-11 18:48:21 -07:00
Paul Ivanov
f0ae836f5f semantic names for kernel status indicator 2014-03-11 18:37:35 -07:00
Paul Ivanov
f5a02a02dd semantic names for indicator icons
For all of the discussion that we had about what kind of icons should
and should not be used to indicate what mode the notebook is in, we
never went through to make it possible to override it.

With this change, it is now possible to override what icons are
displayed for Command and Edit Modes.

For example, @minrk liked the fighter-jet icon for Command Mode, so he
can put this in his custom.css

.ipython-command-mode:before {
     content: "\f0fb";
}
2014-03-11 18:22:03 -07:00
Brian E. Granger
ccae2287d2 Merge pull request #5325 from minrk/notary-config
add NotebookNotary to NotebookApp's class list
2014-03-10 16:16:58 -07:00
MinRK
f9758dd453 add NotebookNotary to NotebookApp's class list
adds it to help output and config files
2014-03-10 15:21:11 -07:00
Brian E. Granger
3eb654bd86 Merge pull request #5295 from minrk/no-append-prototype
OutputArea.append_type functions are not prototype methods
2014-03-10 14:13:14 -07:00
MinRK
a24595d16b call append_text from append_map 2014-03-10 11:44:00 -07:00
MinRK
abe2dce926 back to dev 2014-03-09 21:58:09 -07:00
Paul Ivanov
cd38181438 remove raw cell placeholder on focus, closes #5238 2014-03-09 11:41:25 -07:00
MinRK
4d1f9b21c4 append functions are not prototype methods 2014-03-07 17:57:37 -08:00
Paul Ivanov
54409a196d dem semicolons 2014-03-07 17:48:34 -08:00
Paul Ivanov
19c7189b15 no need to special-case Escape anymore 2014-03-07 17:48:34 -08:00
Paul Ivanov
6a2c4121f9 up and down keys no longer need special casing 2014-03-07 17:48:34 -08:00
Paul Ivanov
2c9ff376a2 added new use_shortcut method to shortcuts
this way, you can ask if a particular event will be handled by the
shortcuts system. This takes away the need to special-case many
different possible keys which should be ignored by codemirror by
ignoring them en masse.
2014-03-07 17:48:34 -08:00
Paul Ivanov
b9e448b160 DRY: refactor common keyboard handling to Cell
Our edit mode keyboard shortcuts don't distinguish between being in a
code cell or in a text cell, so it makes sense to handle both in one
place. This is a first step in that direction.
2014-03-07 17:48:34 -08:00
Paul Ivanov
15f4345ba3 typo, use keycodes object instead of magic numbers 2014-03-07 17:48:34 -08:00
Paul Ivanov
bf3ecdb35f DRY: factor out common handle_keyevent method
This method was identical in both CodeCell and TextCell
2014-03-07 17:48:34 -08:00
Paul Ivanov
71d4c427c9 refactor to improve cell switching in edit mode
This code was repeated in both CodeCell and TextCell, both of which are
extensions of Cell, so this just unifies the logic in Cell.

TextCell had logic here to check if the cell was rendered or not, but I
don't believe it is possible to end up triggering such a code path.
(Should that be required, I can always just add back these methods to
TextCell, performing the .rendered==True check, and calling the Cell

prior to this, code mirror at_top would only return true on if the
cursor was at the first character of the top line. Now, pressing up
arrow on any character on the top line will take you to the cell above.

The same applies for the bottom line. Pressing down arrow would only go
to the next cell if the cursor was at a location *after* the last
character (something that is only possible to achieve in vim mode if the
last line is empty, for example). Now, down arrow on any character of
the last line will go to the next cell.
2014-03-07 17:48:34 -08:00
Paul Ivanov
8889a7581c start better keyboard handling 2014-03-07 17:48:34 -08:00
MinRK
3face719e8 setup jsversion 2014-03-07 15:54:55 -08:00