File size: 3,927 Bytes
745e7ed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
Type: Jupyter Notebook Extension
Name: Snippets Menu
Link: readme.md
Description: |
  Add a customizable menu item to insert code and markdown snippets.
  Comes with extensive defaults for popular python modules, including fairly
  complete listings of many important functions and constants, to save
  searching through documentation.
Main: main.js
Icon: thumbnail.png
Compatibility: 4.x, 5.x
Parameters:

- name: snippets.insert_as_new_cell
  description: "Insert snippets as new cells, rather than at cursor inside current cell"
  input_type: checkbox
  default: false

- name: snippets.include_custom_menu
  description: "Include custom menu content parsed from JSON string below"
  input_type: checkbox
  default: false

- name: snippets.custom_menu_content
  description: |
    JSON string parsed to define custom menus (only used if the option above is
    checked)
  input_type: textarea
  default: |
    {
        "name" : "My favorites",
        "sub-menu" : [
            {
                "name" : "Menu item text",
                "snippet" : ["import something",
                             "",
                             "new_command(3.14)",
                             "other_new_code_on_new_line('with a string!')",
                             "stringy(\"if you need them, escape double quotes with a single backslash\")",
                             "backslashy('This \\ appears as just one backslash in the output')",
                             "backslashy2('Here \\\\ are two backslashes')"]
            },
            {
                "name" : "TeX can be written in menu labels $\\alpha_W e\\int_0 \\mu \\epsilon$",
                "snippet" : ["another_new_command(2.78)"]
            }
        ]
    }

- name: snippets.sibling_selector
  description: |
    A JQuery selector for a sibling element next to whose parent element the
    new menu(s) will be inserted. Other suitable examples include '#file_menu',
    '#edit_menu', '#view_menu', '#insert_menu', '#cell_menu', and
    '#kernel_menu'. To append the new menu as a submenu to the 'insert' menu
    itself, you could use '#insert_menu>:last-child'.
  input_type: text
  default: '#help_menu'

- name: snippets.insert_before_sibling
  description: |
    Insert the new menu(s) before their sibling (the default value of false
    means they are inserted after the sibling)
  input_type: checkbox
  default: false

- name: snippets.top_level_submenu_goes_left
  description: |
    Snippets menus are often quite big, and positioned at the right side of the
    menu bar, so by default they open to the left of the menu. Set this to
    false to get them to open to the right as normal.
  input_type: checkbox
  default: true

- name: snippets.include_submenu.numpy
  description: "Include numpy sub-menu"
  input_type: checkbox
  default: true

- name: snippets.include_submenu.scipy
  description: "Include scipy sub-menu"
  input_type: checkbox
  default: true

- name: snippets.include_submenu.matplotlib
  description: "Include matplotlib sub-menu"
  input_type: checkbox
  default: true

- name: snippets.include_submenu.sympy
  description: "Include sympy sub-menu"
  input_type: checkbox
  default: true

- name: snippets.include_submenu.pandas
  description: "Include pandas sub-menu"
  input_type: checkbox
  default: true

- name: snippets.include_submenu.astropy
  description: "Include astropy sub-menu"
  input_type: checkbox
  default: true

- name: snippets.include_submenu.h5py
  description: "Include h5py sub-menu"
  input_type: checkbox
  default: true

- name: snippets.include_submenu.numba
  description: "Include numba sub-menu"
  input_type: checkbox
  default: true

- name: snippets.include_submenu.python
  description: "Include python sub-menu"
  input_type: checkbox
  default: true

- name: snippets.include_submenu.markdown
  description: "Include markdown sub-menu"
  input_type: checkbox
  default: true