Skip to content

Commit

Permalink
Merge pull request #26 from DocLock17/master
Browse files Browse the repository at this point in the history
Adding the '.' Prefix
  • Loading branch information
ericsia authored Jan 18, 2024
2 parents 40e5fbb + cb1d5ab commit fb564a4
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 83 deletions.
22 changes: 11 additions & 11 deletions snippets/dict_snippets.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"clear -dict": {
"prefix": "clear -dict",
"prefix": ".clear -dict",
"body": ".clear()",
"description": "Removes all the elements from the dictionary"
},
Expand All @@ -18,7 +18,7 @@
"description": "An example for using clear"
},
"copy -dict": {
"prefix": "copy -dict",
"prefix": ".copy -dict",
"body": ".copy()",
"description": "Return a copy of the dictionary"
},
Expand All @@ -36,7 +36,7 @@
"description": "An example for using copy"
},
"fromkeys": {
"prefix": "fromkeys -dict",
"prefix": ".fromkeys -dict",
"body": ".fromkeys(${1:key}, ${2:value})",
"description": "Return a dictionary with the specified keys and values"
},
Expand All @@ -60,7 +60,7 @@
"description": "An example for using fromkeys"
},
"get": {
"prefix": "get -dict",
"prefix": ".get -dict",
"body": ".get(${1:key})",
"description": "Return the value of the specified key"
},
Expand Down Expand Up @@ -91,7 +91,7 @@
"description": "An example for using get"
},
"items": {
"prefix": "items -dict",
"prefix": ".items -dict",
"body": ".items()",
"description": "Return a list containing the a tuple for each key value pair"
},
Expand Down Expand Up @@ -123,7 +123,7 @@
"description": "An example for using items"
},
"keys": {
"prefix": "keys -dict",
"prefix": ".keys -dict",
"body": ".keys()",
"description": "Return a list containing the dictionary's keys"
},
Expand Down Expand Up @@ -155,7 +155,7 @@
"description": "An example for using keys"
},
"pop -dict": {
"prefix": "pop -dict",
"prefix": ".pop -dict",
"body": ".pop(${1:key})",
"description": "Removes the element with the specified key"
},
Expand All @@ -173,7 +173,7 @@
"description": "An example for using pop"
},
"popitem": {
"prefix": "popitem -dict",
"prefix": ".popitem -dict",
"body": ".popitem()",
"description": "Removes the last inserted key-value pai"
},
Expand All @@ -191,7 +191,7 @@
"description": "An example for using popitem"
},
"setdefault": {
"prefix": "setdefault -dict",
"prefix": ".setdefault -dict",
"body": ".setdefault(${1:key}, ${2:value})",
"description": "Return the value of the specified key. If the key does not exist: insert the key, with the specified value"
},
Expand Down Expand Up @@ -222,7 +222,7 @@
"description": "An example for using setdefault"
},
"update -dict": {
"prefix": "update -dict",
"prefix": ".update -dict",
"body": ".update(${1:key}, ${2:value})",
"description": "Updates the dictionary with the specified key-value pairs"
},
Expand All @@ -240,7 +240,7 @@
"description": "An example for using update"
},
"values": {
"prefix": "values -dict",
"prefix": ".values -dict",
"body": ".values()",
"description": "Return a list of all the values in the dictionary"
},
Expand Down
22 changes: 11 additions & 11 deletions snippets/list_snippets.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"append": {
"prefix": "append -list",
"prefix": ".append -list",
"body": ".append(${1:item})",
"description": "Adds an element at the end of the list"
},
Expand All @@ -24,7 +24,7 @@
"description": "An example for using append"
},
"clear -list": {
"prefix": "clear -list",
"prefix": ".clear -list",
"body": ".clear()",
"description": "Removes all the elements from the list"
},
Expand All @@ -38,7 +38,7 @@
"description": "An example for using clear"
},
"copy -list": {
"prefix": "copy -list",
"prefix": ".copy -list",
"body": ".copy()",
"description": "Return a copy of the list"
},
Expand All @@ -52,7 +52,7 @@
"description": "An example for using copy"
},
"count -list": {
"prefix": "count -list",
"prefix": ".count -list",
"body": ".count()",
"description": "Return the number of elements with the specified value"
},
Expand All @@ -75,7 +75,7 @@
"description": "An example for using count"
},
"extend": {
"prefix": "extend -list",
"prefix": ".extend -list",
"body": ".extend(${1:iterable})",
"description": "Add the elements of a list (or any iterable), to the end of the current list"
},
Expand All @@ -90,7 +90,7 @@
"description": "An example for using extend"
},
"index -list": {
"prefix": "index -list",
"prefix": ".index -list",
"body": ".index(${1:element})",
"description": "Return the index of the first element with the specified value"
},
Expand All @@ -113,7 +113,7 @@
"description": "An example for using index"
},
"insert": {
"prefix": "insert -list",
"prefix": ".insert -list",
"body": ".insert(${1:element})",
"description": "Adds an element at the specified position"
},
Expand All @@ -127,7 +127,7 @@
"description": "An example for using insert"
},
"pop -list": {
"prefix": "pop -list",
"prefix": ".pop -list",
"body": ".pop()",
"description": "Removes the element at the specified position"
},
Expand All @@ -141,7 +141,7 @@
"description": "An example for using pop"
},
"remove -list": {
"prefix": "remove -list",
"prefix": ".remove -list",
"body": ".remove(${1:element})",
"description": "Removes the first item with the specified value"
},
Expand All @@ -155,7 +155,7 @@
"description": "An example for using remove"
},
"reverse": {
"prefix": "reverse -list",
"prefix": ".reverse -list",
"body": ".reverse()",
"description": "Reverses the order of the list"
},
Expand All @@ -169,7 +169,7 @@
"description": "An example for using reverse"
},
"sort": {
"prefix": "sort -list",
"prefix": ".sort -list",
"body": ".sort()",
"description": "Sorts the list"
},
Expand Down
34 changes: 17 additions & 17 deletions snippets/sets_snippets.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"add": {
"prefix": "add -set",
"prefix": ".add -set",
"body": ".add(${1:element})",
"description": "Adds an element to the set"
},
Expand All @@ -14,7 +14,7 @@
"description": "An example for using add"
},
"clear -sets": {
"prefix": "clear -sets",
"prefix": ".clear -sets",
"body": ".clear()",
"description": "Removes all the elements from the set"
},
Expand All @@ -28,7 +28,7 @@
"description": "An example for using clear"
},
"copy -set": {
"prefix": "copy -set",
"prefix": ".copy -set",
"body": ".copy()",
"description": "Return a copy of the set"
},
Expand All @@ -42,7 +42,7 @@
"description": "An example for using copy"
},
"difference": {
"prefix": "difference -set",
"prefix": ".difference -set",
"body": ".difference(${1:set})",
"description": "Return a set containing the difference between two or more sets"
},
Expand All @@ -67,7 +67,7 @@
"description": "An example for using difference"
},
"difference_update": {
"prefix": "difference_update -set",
"prefix": ".difference_update -set",
"body": ".difference_update(${1:set})",
"description": "Removes the items in this set that are also included in another, specified set"
},
Expand All @@ -82,7 +82,7 @@
"description": "An example for using difference_update"
},
"discard": {
"prefix": "discard -set",
"prefix": ".discard -set",
"body": ".discard(${1:item})",
"description": "Remove the specified item"
},
Expand All @@ -96,7 +96,7 @@
"description": "An example for using discard"
},
"intersection": {
"prefix": "intersection -set",
"prefix": ".intersection -set",
"body": ".intersection(${1:set})",
"description": "Return a set, that is the intersection of two other sets"
},
Expand All @@ -122,7 +122,7 @@
"description": "An example for using intersection"
},
"intersection_update": {
"prefix": "intersection_update -set",
"prefix": ".intersection_update -set",
"body": ".intersection_update(${1:set})",
"description": "Removes the items in this set that are not present in other, specified set(s)"
},
Expand All @@ -148,7 +148,7 @@
"description": "An example for using intersection_update"
},
"isdisjoint": {
"prefix": "isdisjoint -set",
"prefix": ".isdisjoint -set",
"body": ".isdisjoint(${1:set})",
"description": "Return whether two sets have a intersection or not"
},
Expand All @@ -173,7 +173,7 @@
"description": "An example for using isdisjoint"
},
"issubset": {
"prefix": "issubset -set",
"prefix": ".issubset -set",
"body": ".issubset(${1:set})",
"description": "Return whether another set contains this set or not"
},
Expand All @@ -198,7 +198,7 @@
"description": "An example for using issubset"
},
"issuperset": {
"prefix": "issuperset -set",
"prefix": ".issuperset -set",
"body": ".issuperset(${1:set})",
"description": "Return whether this set contains another set or not"
},
Expand All @@ -223,7 +223,7 @@
"description": "An example for using issuperset"
},
"pop -set": {
"prefix": "pop -set",
"prefix": ".pop -set",
"body": ".pop()",
"description": "Removes the specified element"
},
Expand All @@ -237,7 +237,7 @@
"description": "An example for using pop"
},
"remove -set": {
"prefix": "remove -set",
"prefix": ".remove -set",
"body": ".remove(${1:item})",
"description": "Removes the specified element"
},
Expand All @@ -251,7 +251,7 @@
"description": "An example for using remove"
},
"symmetric_difference": {
"prefix": "symmetric_difference -set",
"prefix": ".symmetric_difference -set",
"body": ".symmetric_difference(${1:set})",
"description": "Return a set with the symmetric differences of two sets"
},
Expand All @@ -266,7 +266,7 @@
"description": "An example for using symmetric_difference"
},
"symmetric_difference_update": {
"prefix": "symmetric_difference_update -set",
"prefix": ".symmetric_difference_update -set",
"body": ".symmetric_difference_update(${1:set})",
"description": "inserts the symmetric differences from this set and another"
},
Expand All @@ -281,7 +281,7 @@
"description": "An example for using symmetric_difference_update"
},
"union": {
"prefix": "union -set",
"prefix": ".union -set",
"body": ".union(${1:set})",
"description": "Return a set containing the union of sets"
},
Expand All @@ -307,7 +307,7 @@
"description": "An example for using union"
},
"update -set": {
"prefix": "update -set",
"prefix": ".update -set",
"body": ".update(${1:set})",
"description": "Update the set with the union of this set and others"
},
Expand Down
Loading

0 comments on commit fb564a4

Please sign in to comment.