@@ -8,6 +8,8 @@ One side effect of this change is that snippets created in the previous version
88this extension will not be supported. The /snippets folder will continue to be available
99if previously created in a project folder.
1010
11+ In addition, the searching/tag feature has been expanded as well.
12+
1113
1214Transferring Single Snippets
1315----------------------------
@@ -78,15 +80,42 @@ script to help with the transition:
7880 counter+=1
7981
8082 snippets.sort(key=extract_id)
83+ print('{"snippets": [\n')
8184 for snip in snippets:
8285 if not('tags' in snip):
8386 snip["tags"] = []
8487 if snippets.index(snip) == len(snippets)-1:
85- print(snip)
88+ print(json.dumps( snip, indent=4, sort_keys=True) )
8689 else:
87- print(snip, end=",\n")
90+ print(json.dumps(snip, indent=4, sort_keys=True), end=",\n")
91+ print("]\n}\n")
8892
8993
9094 This script will concatenate and print out all of the json objects in a /snippets folder
9195in a project. After running the script, copy the output and paste into the User Preferences
9296panel in settings, similar to the single snippet upload.
97+
98+
99+ Search and Tag Update
100+ ---------------------
101+ .. image :: ../Design/unselectedTags.png
102+ :align: center
103+
104+ NOTE: Snippet tags function on an OR basis, as in when the "data analytics" tag and the "import statements" tag are selected together,
105+ the panel displays any tags that are tagged as import statements OR tagged as "data analytics."
106+ ex) Snippet tags selected together:
107+ .. image :: ../Design/snippetTagsSelected.png
108+ :align: center
109+
110+ ex) Language tags selected together:
111+ .. image :: ../Design/languageTagsSelected.png
112+ :align: center
113+
114+ NOTE 2: Language tags and snippets tags have an AND relationship. As in when the "Python" tag and the "data analytics" tags are selected together,
115+ only snippets that are both in the language Python AND tagged as data analytics will appear.
116+ .. image :: ../Design/langAndSnippetTag.png
117+ :align: center
118+
119+ NOTE 3: When language tags are selected, only snippet tags in that language will appear for ease of selection.
120+ .. image :: ../Design/pythonTagOnly.png
121+ :align: center
0 commit comments