Skip to content
This repository has been archived by the owner on Apr 16, 2018. It is now read-only.

code snippets for sage worksheets #23

Open
haraldschilly opened this issue Sep 29, 2013 · 1 comment
Open

code snippets for sage worksheets #23

haraldschilly opened this issue Sep 29, 2013 · 1 comment

Comments

@haraldschilly
Copy link
Member

Currently, the user has to know about the Sage commands in notebook prior to starting to work with it. A collection of templates for common tasks would be tremendously helpful, because it gives a head start for accomplishing a certain task.

Here is an outline how this could work:

  1. The UI contains a button "f(x)". When clicking on it, it opens up a dedicated dialog box.
  2. On the left is a tree (or two columns) of topics and explicit tasks
  3. The user navigates to a certain entry - e.g. Calculus > Limit Example No. 1 - sees a preview of the code and a description of what it is.
  4. After pressing "insert", a new input cell below the one where the cursor is, is inserted and contains this working example.

The scope of examples could range from simple one-liners up to several lines of more complicated code. In any case, the user is then free to play around with the provided example to tailor it for the specific needs.

Extensions:

  • A template system, where these snippets are parametrized by variables and functions.
  • Assigning custom keyboard shortcuts to ones favourite templates.
  • A "quick-search", where you just hit a keyboard shortcut that brings up this dialog with a focused search box. Type in roughly what you want and select the snippet via a single click or via keyboard cursors.
  • A way to collect submissions for new entries with a review. (that could be done right here as an issue)

Related:

@haraldschilly
Copy link
Member Author

this idea is partially implemented in page/wizard.coffee

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

No branches or pull requests

1 participant