28 lines
1.1 KiB
JSON
28 lines
1.1 KiB
JSON
{
|
|
"variables": {
|
|
"pythonversion": "python3",
|
|
"encoding": "utf-8"
|
|
},
|
|
"python": {
|
|
"snippets": {
|
|
"py3": "#!/usr/bin/${pythonversion}\n# -*- coding: ${encoding} -*-\n\n\n${cursor}\n\n\ndef main():\n\tpass\n\n\nif __name__ == \"__main__\":\n\tmain()\n",
|
|
"fopen" : "def openfile(filepath):\n\twith open(filepath, \"r\", encoding=\"${encoding}\") as currentfile:\n\t\treturn currentfile.readlines()\n\n\n",
|
|
"fsave" : "def savefile(filepath, newcontent):\n\twith open(filepath, \"w\", encoding=\"${encoding}\") as currentfile:\n\t\tcurrentfile.writelines(newcontent)\n\n\n",
|
|
"basepath" : "",
|
|
"parameter": "",
|
|
"class": "",
|
|
"config": "def openconfig(configfile):\n\twith open(configfile, \"r\", encoding=\"utf-8\") as currentconfigfile:\n\t\treturn json.load(currentconfigfile)\n\n\ndef saveconfig(configfile, newcontent):\n\twith open(configfile, \"w\", encoding=\"utf-8\") as currentconfigfile:\n\t\tjson.dump(newcontent, currentconfigfile, indent=4, sort_keys=True)"}
|
|
},
|
|
"java": {
|
|
"snippets": {
|
|
"class": ""
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|