Skip to content

Commit c78a6a2

Browse files
committed
Added more descriptions to transition page.
1 parent f6c6ac2 commit c78a6a2

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

docs/user/transition.rst

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,51 @@ This script will concatenate and print out all of the json objects in a /snippet
9595
in a project. After running the script, copy the output and paste into the User Preferences
9696
panel in settings, similar to the single snippet upload.
9797

98+
NOTE: If adding objects to existing list of snippets in user preferences, change counter variable
99+
to n+1 where n is the ID of the last snippet stored in user preferences.
100+
101+
This script will print something like :
102+
103+
.. code::
104+
{"snippets": [
105+
106+
{
107+
"code": [
108+
"print(\"hello\")"
109+
],
110+
"description": "",
111+
"id": 0,
112+
"language": "Python",
113+
"name": "new_snippet_3",
114+
"tags": [
115+
"import statements"
116+
]
117+
},
118+
{
119+
"code": [
120+
"def most_frequent(list):",
121+
" return max(set(list), key = list.count)",
122+
" ",
123+
"",
124+
"numbers = [1,2,1,2,3,2,1,4,2]",
125+
"most_frequent(numbers) "
126+
],
127+
"description": "This method returns the most frequent element that appears in a list.",
128+
"id": 1,
129+
"language": "Python",
130+
"name": "most_frequent",
131+
"tags": []
132+
}
133+
]
134+
}
135+
136+
After generating this dictionary, one can simply delete the current contents of user preferences
137+
(Advanced Settings > Code Snippet Manager > User Preferences) and paste this dictionary instead.
138+
This will delete the current snippets at the endpoint (will be default snippets if extension freshly updated)
139+
and replace them with the old snippets.
140+
141+
NOTE: If adding objects onto an existing list of objects, make sure the ID numbers are all in sequential,
142+
ascending order.
98143

99144
Search and Tag Update
100145
---------------------
@@ -124,3 +169,7 @@ NOTE 3: When language tags are selected, only snippet tags in that language will
124169

125170
.. image:: ../../Design/smallPythonTagOnly.png
126171
:align: center
172+
173+
NOTE 4: If 2 of the same language tags appear in the Language Tags section this indicates that one of the snippets
174+
contains a snippet tag that matches the language name. To get rid of the duplicate tag, filter through snippets and
175+
untag any snippets that have that Language in their snippet tags.

0 commit comments

Comments
 (0)