You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/user/features.rst
+23-10Lines changed: 23 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,30 +6,37 @@ Code Snippet Explorer
6
6
7
7
On the left side bar of the JupyterLab, you can click the snippet icon (</>) to open/close the code snippet explorer that contains all the saved snippets as below.
8
8
You can scroll/resize code snippet explorer, order the snippets with drag and drop, and manage and search the snippets efficiently.
1. Highlight lines of code and right click (or use keyboard shortcut (cmd-shift-A or ctrl-shift-A)) to save the code as a snippet. Or, you can select cell(s) and right click (or use keyboard shortcut (cmd-shift-A or ctrl-shift-A)) to save content as a snippet. Then, you will see the "Save As Code Snippet" option in JupyterLab context menu as below:
17
-
.. image:: ../../Design/right_click.png
18
-
:align:center
19
-
Then, clicking the option will open the dialog as below where you can input name, description, language, tags, and codes of a snippet.
2. More easily, just drag notebook cell(s) to the code snippet explorer on the left to create a new snippet. It will also open the dialog as above for your inputs.
23
-
.. image:: ../../Design/create_from_scratch.png
24
-
:align:center
28
+
29
+
.. image:: ../../Design/create_from_scratch.png
30
+
:align:center
25
31
26
32
3. Hit the plus button next to the search bar (refer to `Search of Code Snippets`_) to create a new snippet if you want to create a snippet not from the notebook cell.
27
33
28
34
Use of Code Snippets
29
35
--------------------
30
36
31
37
Click the three dots or right click anywhere on the snippet you want to use. It will open code snippet menu as below to insert, copy, edit, download, or delete the snippet.
32
-
.. image:: ../../Design/Code Snippet Menu.png
38
+
39
+
.. image:: ../../Design/CodeSnippetMenu.png
33
40
:align:center
34
41
35
42
Insert
@@ -40,34 +47,40 @@ Additionally, on hover with six dots on the left (refer to `Search of Code Snipp
40
47
Copy
41
48
^^^^
42
49
Click the copy option to copy. It will create a message on the bottom right corner as below.
50
+
43
51
.. image:: ../../Design/copy_snippet.png
44
52
:align:center
45
53
46
54
Edit
47
55
^^^^
48
56
Edit the saved snippets by clicking the edit option. It will open a code snippet editor as below.
57
+
49
58
.. image:: ../../Design/code_snippet_edit.png
50
59
:align:center
51
60
52
61
Download
53
62
^^^^^^^^
54
63
Download snippets and share them with others by clicking the download option. It will open a box as below to input **relative path** to download the snippets.
64
+
55
65
.. image:: ../../Design/download_snippets_box.png
56
66
:align:center
57
67
58
68
Delete
59
69
^^^^^^
60
70
Delete snippets by clicking delete option. It will open a warning box as below.
61
-
.. image:: ../../Design/delete snippet.png
71
+
72
+
.. image:: ../../Design/delete_snippet.png
62
73
:align:center
63
74
64
75
Search of Code Snippets
65
76
-----------------------
66
77
67
78
With the filter box as below, **search** snippets with name, language, and code with search bar or **filter** them with language/filter tags!
0 commit comments